@sap/ux-ui5-tooling 1.10.4 → 1.10.5
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/CHANGELOG.md +5 -0
- package/README.md +2 -0
- package/dist/cli/index.js +2477 -1688
- package/dist/markdowns/deploy/deploy.en.md +3 -1
- package/dist/markdowns/undeploy/undeploy.en.md +2 -0
- package/dist/middlewares/fiori-tools-appreload.js +11 -827
- package/dist/middlewares/fiori-tools-preview.js +1822 -1293
- package/dist/middlewares/fiori-tools-proxy.js +26131 -24714
- package/dist/middlewares/fiori-tools-servestatic.js +4 -3
- package/dist/tasks/cf-deploy/index.js +1035 -1049
- package/dist/tasks/deploy/index.js +2388 -1601
- package/package.json +11 -10
- package/ui5.yaml +5 -5
|
@@ -25,287 +25,116 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
25
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
27
|
|
|
28
|
-
// ../lib/telemetry/dist/src/
|
|
28
|
+
// ../lib/telemetry/dist/src/system/system.js
|
|
29
29
|
var require_system = __commonJS({
|
|
30
|
-
"../lib/telemetry/dist/src/
|
|
30
|
+
"../lib/telemetry/dist/src/system/system.js"(exports2) {
|
|
31
31
|
"use strict";
|
|
32
32
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
33
|
-
exports2.
|
|
34
|
-
var
|
|
35
|
-
const matchPaths = matchingPaths;
|
|
36
|
-
matchPaths.forEach((matchingPath) => {
|
|
37
|
-
matchingPath.patterns = matchingPath.patterns.map((pattern) => new RegExp(`[\\w\\s-./:@!]+${pattern}`, "gi"));
|
|
38
|
-
});
|
|
39
|
-
return matchPaths;
|
|
33
|
+
exports2.TelemetrySystem = void 0;
|
|
34
|
+
var TelemetrySystem = class {
|
|
40
35
|
};
|
|
41
|
-
exports2.
|
|
36
|
+
exports2.TelemetrySystem = TelemetrySystem;
|
|
42
37
|
}
|
|
43
38
|
});
|
|
44
39
|
|
|
45
|
-
// ../lib/telemetry/dist/
|
|
46
|
-
var
|
|
47
|
-
"../lib/telemetry/dist/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
40
|
+
// ../lib/telemetry/dist/package.json
|
|
41
|
+
var require_package = __commonJS({
|
|
42
|
+
"../lib/telemetry/dist/package.json"(exports2, module2) {
|
|
43
|
+
module2.exports = {
|
|
44
|
+
name: "@sap/ux-telemetry",
|
|
45
|
+
version: "1.10.5",
|
|
46
|
+
description: "SAP Fiori tools telemetry library",
|
|
47
|
+
main: "dist/src/index.js",
|
|
48
|
+
author: "SAP SE",
|
|
49
|
+
license: "MIT",
|
|
50
|
+
private: true,
|
|
51
|
+
azureInstrumentationKey: "0a65e45d-6bf4-421d-b845-61e888c50e9e",
|
|
52
|
+
azureProdKey: "0a65e45d-6bf4-421d-b845-61e888c50e9e",
|
|
53
|
+
scripts: {
|
|
54
|
+
"pre-commit": "lint-staged --quiet",
|
|
55
|
+
"clean:dist": "rimraf ./dist ./generators *.tsbuildinfo",
|
|
56
|
+
clean: "rimraf ./reports",
|
|
57
|
+
build: "ts-node ./build-script/ && yarn run clean && tsc --build ./",
|
|
58
|
+
test: "cross-env SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY=false jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
|
|
59
|
+
lint: "eslint . --ext .ts",
|
|
60
|
+
"lint:summary": "eslint . --ext .ts -f summary",
|
|
61
|
+
"lint:fix": "eslint --fix",
|
|
62
|
+
"lint:fix:all": "eslint . --ext .ts --fix",
|
|
63
|
+
"lint:report": "eslint . --ext .ts -f multiple ",
|
|
64
|
+
"format:fix": "prettier --write --loglevel silent --ignore-path ../../../.prettierignore",
|
|
65
|
+
"format:fix:all": "prettier --write '**/*.{css,scss,html,js,json,ts,tsx,yaml,yml}' '!**/{out,dist,node_modules}/**' '!**/*.{svg,png,xml}' --ignore-path ../../../.prettierignore",
|
|
66
|
+
madge: "madge --warning --circular --extensions ts ./"
|
|
67
|
+
},
|
|
68
|
+
dependencies: {
|
|
69
|
+
"@sap-ux/store": "0.3.8",
|
|
70
|
+
"@sap/ux-cds": "1.10.5",
|
|
71
|
+
"@sap/ux-common-utils": "1.10.5",
|
|
72
|
+
"@sap/ux-feature-toggle": "1.10.5",
|
|
73
|
+
"@sap/ux-project-access": "1.10.5",
|
|
74
|
+
applicationinsights: "1.4.1",
|
|
75
|
+
axios: "0.26.0",
|
|
76
|
+
"performance-now": "2.1.0",
|
|
77
|
+
yaml: "2.2.2"
|
|
78
|
+
},
|
|
79
|
+
devDependencies: {
|
|
80
|
+
memfs: "3.4.13",
|
|
81
|
+
"ts-jest": "29.1.1",
|
|
82
|
+
"ts-node": "8.5.2",
|
|
83
|
+
typescript: "4.9.5",
|
|
84
|
+
unionfs: "4.4.0"
|
|
85
|
+
},
|
|
86
|
+
files: [
|
|
87
|
+
"dist/"
|
|
88
|
+
],
|
|
89
|
+
jestSonar: {
|
|
90
|
+
reportPath: "reports/test/unit",
|
|
91
|
+
reportFile: "test-report.xml"
|
|
92
|
+
},
|
|
93
|
+
"eslint-formatter-multiple": {
|
|
94
|
+
formatters: [
|
|
95
|
+
{
|
|
96
|
+
name: "stylish",
|
|
97
|
+
output: "console"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "json",
|
|
101
|
+
output: "file",
|
|
102
|
+
path: "reports/lint/eslint.json"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "checkstyle",
|
|
106
|
+
output: "file",
|
|
107
|
+
path: "reports/lint/eslint.checkstyle.xml"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
63
110
|
}
|
|
64
111
|
};
|
|
65
|
-
exports2.debug = debug;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// ../lib/common-utils/dist/appStudio.js
|
|
70
|
-
var require_appStudio = __commonJS({
|
|
71
|
-
"../lib/common-utils/dist/appStudio.js"(exports2) {
|
|
72
|
-
"use strict";
|
|
73
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
74
|
-
exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = exports2.ENV = void 0;
|
|
75
|
-
var ENV;
|
|
76
|
-
(function(ENV2) {
|
|
77
|
-
ENV2["PROXY_URL"] = "HTTP_PROXY";
|
|
78
|
-
ENV2["H2O_URL"] = "H2O_URL";
|
|
79
|
-
})(ENV = exports2.ENV || (exports2.ENV = {}));
|
|
80
|
-
function isAppStudio2() {
|
|
81
|
-
return !!process.env[ENV.H2O_URL];
|
|
82
|
-
}
|
|
83
|
-
exports2.isAppStudio = isAppStudio2;
|
|
84
|
-
function getAppStudioBaseURL() {
|
|
85
|
-
return process.env[ENV.H2O_URL];
|
|
86
|
-
}
|
|
87
|
-
exports2.getAppStudioBaseURL = getAppStudioBaseURL;
|
|
88
|
-
function getAppStudioProxyURL() {
|
|
89
|
-
return process.env[ENV.PROXY_URL];
|
|
90
|
-
}
|
|
91
|
-
exports2.getAppStudioProxyURL = getAppStudioProxyURL;
|
|
92
112
|
}
|
|
93
113
|
});
|
|
94
114
|
|
|
95
|
-
// ../lib/
|
|
96
|
-
var
|
|
97
|
-
"../lib/
|
|
98
|
-
"use strict";
|
|
99
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
100
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
101
|
-
};
|
|
102
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
103
|
-
exports2.toPosixPath = void 0;
|
|
104
|
-
var path_1 = __importDefault(require("path"));
|
|
105
|
-
function toPosixPath(dirPath) {
|
|
106
|
-
return path_1.default.normalize(dirPath).split(/[\\/]/g).join(path_1.default.posix.sep);
|
|
107
|
-
}
|
|
108
|
-
exports2.toPosixPath = toPosixPath;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// ../lib/common-utils/dist/promise.js
|
|
113
|
-
var require_promise = __commonJS({
|
|
114
|
-
"../lib/common-utils/dist/promise.js"(exports2) {
|
|
115
|
+
// ../lib/telemetry/dist/src/client/client.js
|
|
116
|
+
var require_client = __commonJS({
|
|
117
|
+
"../lib/telemetry/dist/src/client/client.js"(exports2) {
|
|
115
118
|
"use strict";
|
|
116
119
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117
|
-
exports2.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
exports2.Client = void 0;
|
|
121
|
+
var Client = class {
|
|
122
|
+
constructor() {
|
|
123
|
+
this.applicationKey = "";
|
|
124
|
+
this.extensionName = "";
|
|
125
|
+
this.extensionVersion = "";
|
|
121
126
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return new Promise((resolve) => {
|
|
125
|
-
promises2.forEach(async (promise, index) => {
|
|
126
|
-
try {
|
|
127
|
-
const result2 = await Promise.resolve(promise);
|
|
128
|
-
results[index] = { status: "fulfilled", value: result2 };
|
|
129
|
-
count++;
|
|
130
|
-
if (count === promises2.length) {
|
|
131
|
-
resolve(results);
|
|
132
|
-
}
|
|
133
|
-
} catch (err) {
|
|
134
|
-
results[index] = { status: "rejected", reason: err };
|
|
135
|
-
count++;
|
|
136
|
-
if (count === promises2.length) {
|
|
137
|
-
resolve(results);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
exports2.allSettled = allSettled;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
// ../lib/common-utils/dist/regexp.js
|
|
148
|
-
var require_regexp = __commonJS({
|
|
149
|
-
"../lib/common-utils/dist/regexp.js"(exports2) {
|
|
150
|
-
"use strict";
|
|
151
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
152
|
-
exports2.escapeRegExp = void 0;
|
|
153
|
-
function escapeRegExp(s) {
|
|
154
|
-
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
155
|
-
}
|
|
156
|
-
exports2.escapeRegExp = escapeRegExp;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
// ../lib/common-utils/dist/help/helpTopics.js
|
|
161
|
-
var require_helpTopics = __commonJS({
|
|
162
|
-
"../lib/common-utils/dist/help/helpTopics.js"(exports2) {
|
|
163
|
-
"use strict";
|
|
164
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
165
|
-
exports2.getHelpUrl = exports2.GUIDED_ANSWERS_LAUNCH_CMD_ID = exports2.GUIDED_ANSWERS_EXTENSION_ID = exports2.HELP_NODES = exports2.HELP_TREE = void 0;
|
|
166
|
-
var HELP_TREE;
|
|
167
|
-
(function(HELP_TREE2) {
|
|
168
|
-
HELP_TREE2[HELP_TREE2["FIORI_TOOLS"] = 3046] = "FIORI_TOOLS";
|
|
169
|
-
})(HELP_TREE = exports2.HELP_TREE || (exports2.HELP_TREE = {}));
|
|
170
|
-
exports2.HELP_NODES = {
|
|
171
|
-
FIORI_TOOLS: 45995,
|
|
172
|
-
DEV_PLATFORM: 45996,
|
|
173
|
-
FIORI_APP_GENERATOR: 48363,
|
|
174
|
-
BAS_CATALOG_SERVICES_REQUEST_FAILED: 48366,
|
|
175
|
-
APPLICATION_PREVIEW: 52881,
|
|
176
|
-
CERTIFICATE_ERROR: 53643,
|
|
177
|
-
DESTINATION_MISCONFIGURED: 54336,
|
|
178
|
-
DESTINATION_UNAVAILABLE: 51208,
|
|
179
|
-
DESTINATION_NOT_FOUND: 51208,
|
|
180
|
-
BAD_GATEWAY: 48366,
|
|
181
|
-
DESTINATION_BAD_GATEWAY_503: 52526
|
|
182
|
-
};
|
|
183
|
-
exports2.GUIDED_ANSWERS_EXTENSION_ID = "saposs.sap-guided-answers-extension";
|
|
184
|
-
exports2.GUIDED_ANSWERS_LAUNCH_CMD_ID = "sap.ux.guidedAnswer.openGuidedAnswer";
|
|
185
|
-
var GUIDED_ANSWERS_SUPPORT_BASE_URL = "https://ga.support.sap.com/dtp/viewer/index.html";
|
|
186
|
-
function getHelpUrl(treeId, nodeIds) {
|
|
187
|
-
let actions = "";
|
|
188
|
-
if (nodeIds.length > 0) {
|
|
189
|
-
actions = `/actions/${nodeIds.join(":")}`;
|
|
127
|
+
getApplicationKey() {
|
|
128
|
+
return this.applicationKey;
|
|
190
129
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
// ../lib/common-utils/dist/index.js
|
|
198
|
-
var require_dist = __commonJS({
|
|
199
|
-
"../lib/common-utils/dist/index.js"(exports2) {
|
|
200
|
-
"use strict";
|
|
201
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
202
|
-
if (k2 === void 0)
|
|
203
|
-
k2 = k;
|
|
204
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
205
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
206
|
-
desc = { enumerable: true, get: function() {
|
|
207
|
-
return m[k];
|
|
208
|
-
} };
|
|
130
|
+
getExtensionVersion() {
|
|
131
|
+
return this.extensionVersion;
|
|
132
|
+
}
|
|
133
|
+
getExtensionName() {
|
|
134
|
+
return this.extensionName;
|
|
209
135
|
}
|
|
210
|
-
Object.defineProperty(o, k2, desc);
|
|
211
|
-
} : function(o, m, k, k2) {
|
|
212
|
-
if (k2 === void 0)
|
|
213
|
-
k2 = k;
|
|
214
|
-
o[k2] = m[k];
|
|
215
|
-
});
|
|
216
|
-
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
217
|
-
for (var p in m)
|
|
218
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p))
|
|
219
|
-
__createBinding(exports3, m, p);
|
|
220
|
-
};
|
|
221
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
222
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
223
|
-
};
|
|
224
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
225
|
-
exports2.filterReferenceUri = exports2.getFioriToolsDirectory = exports2.FioriToolsSettings = exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = void 0;
|
|
226
|
-
var os_1 = require("os");
|
|
227
|
-
var path_1 = __importDefault(require("path"));
|
|
228
|
-
var appStudio_1 = require_appStudio();
|
|
229
|
-
Object.defineProperty(exports2, "isAppStudio", { enumerable: true, get: function() {
|
|
230
|
-
return appStudio_1.isAppStudio;
|
|
231
|
-
} });
|
|
232
|
-
Object.defineProperty(exports2, "getAppStudioBaseURL", { enumerable: true, get: function() {
|
|
233
|
-
return appStudio_1.getAppStudioBaseURL;
|
|
234
|
-
} });
|
|
235
|
-
Object.defineProperty(exports2, "getAppStudioProxyURL", { enumerable: true, get: function() {
|
|
236
|
-
return appStudio_1.getAppStudioProxyURL;
|
|
237
|
-
} });
|
|
238
|
-
__exportStar(require_file(), exports2);
|
|
239
|
-
__exportStar(require_promise(), exports2);
|
|
240
|
-
__exportStar(require_regexp(), exports2);
|
|
241
|
-
__exportStar(require_helpTopics(), exports2);
|
|
242
|
-
var FioriToolsSettings;
|
|
243
|
-
(function(FioriToolsSettings2) {
|
|
244
|
-
FioriToolsSettings2["dir"] = ".fioritools";
|
|
245
|
-
})(FioriToolsSettings = exports2.FioriToolsSettings || (exports2.FioriToolsSettings = {}));
|
|
246
|
-
var getFioriToolsDirectory = () => {
|
|
247
|
-
return path_1.default.join((0, os_1.homedir)(), FioriToolsSettings.dir);
|
|
248
136
|
};
|
|
249
|
-
exports2.
|
|
250
|
-
function filterReferenceUri(metadata) {
|
|
251
|
-
return metadata == null ? void 0 : metadata.replace(/ Uri="(http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[0])/g, ` Uri=".`);
|
|
252
|
-
}
|
|
253
|
-
exports2.filterReferenceUri = filterReferenceUri;
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
// ../lib/telemetry/dist/src/client/model/EventName.js
|
|
258
|
-
var require_EventName = __commonJS({
|
|
259
|
-
"../lib/telemetry/dist/src/client/model/EventName.js"(exports2) {
|
|
260
|
-
"use strict";
|
|
261
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
262
|
-
exports2.EventName = void 0;
|
|
263
|
-
var EventName2;
|
|
264
|
-
(function(EventName3) {
|
|
265
|
-
EventName3["Test"] = "test";
|
|
266
|
-
EventName3["TELEMETRY_SETTINGS_INIT_FAILED"] = "TELEMETRY_SETTINGS_INIT_FAILED";
|
|
267
|
-
EventName3["DISABLE_TELEMETRY"] = "DISABLE_TELEMETRY";
|
|
268
|
-
EventName3["GD_GUIDE_ACTION"] = "GUIDE_ACTION";
|
|
269
|
-
EventName3["GD_PANEL_LOAD"] = "PANEL_LOAD";
|
|
270
|
-
EventName3["GD_LAUNCH"] = "LAUNCH_GD";
|
|
271
|
-
EventName3["GD_SIDE_BY_SIDE"] = "GD_SIDE_BY_SIDE";
|
|
272
|
-
EventName3["GD_WIZARD"] = "GD_WIZARD";
|
|
273
|
-
EventName3["GD_DESCMODE"] = "GD_DESCMODE";
|
|
274
|
-
EventName3["GD_PROJECTVIEW"] = "GD_PROJECTVIEW";
|
|
275
|
-
EventName3["PAGEMAP"] = "PAGEMAP";
|
|
276
|
-
EventName3["APP_ACTIONS"] = "ACTIONS";
|
|
277
|
-
EventName3["PAGE_EDITOR"] = "PAGE_EDITOR";
|
|
278
|
-
EventName3["PAGEMAP_STARTUP_TIME"] = "PAGEMAP_STARTUP_TIME";
|
|
279
|
-
EventName3["APPLICATION_PREVIEW"] = "APPLICATION_PREVIEW";
|
|
280
|
-
EventName3["APP_INFO_COMMAND_STARTED"] = "APP_INFO_COMMAND_STARTED";
|
|
281
|
-
EventName3["APP_INFO_LINK_CLICKED"] = "APP_INFO_LINK_CLICKED";
|
|
282
|
-
EventName3["APP_INFO_STARTUP_TIME"] = "APP_INFO_STARTUP_TIME";
|
|
283
|
-
EventName3["SERVICE_MODELER_EVENT"] = "SERVICE_MODELER_EVENT";
|
|
284
|
-
EventName3["ANNOTATION_FILE_MANAGER_EVENT"] = "ANNOTATION_FILE_MANAGER_EVENT";
|
|
285
|
-
EventName3["ANNOTATION_LSP_XML_LOAD"] = "ANNOTATION_LSP_XML_LOAD";
|
|
286
|
-
EventName3["ANNOTATION_LSP_USAGE_TERM"] = "ANNOTATION_LSP_USAGE_TERM";
|
|
287
|
-
EventName3["ANNOTATION_LSP_CODE_COMPLETION"] = "ANNOTATION_LSP_CODE_COMPLETION";
|
|
288
|
-
EventName3["MIGRATION_ACTIVATED"] = "MIGRATION_ACTIVATED";
|
|
289
|
-
EventName3["MIGRATION_BACKEND_LOAD"] = "MIGRATION_BACKEND_LOAD";
|
|
290
|
-
EventName3["MIGRATION_REFRESH_BACKEND_LOAD"] = "MIGRATION_REFRESH_BACKEND_LOAD";
|
|
291
|
-
EventName3["MIGRATION_BACK_BACKEND_LOAD"] = "MIGRATION_BACK_BACKEND_LOAD";
|
|
292
|
-
EventName3["MIGRATION_COMPLETED"] = "MIGRATION_COMPLETED";
|
|
293
|
-
EventName3["MIGRATION_SUCCESS"] = "MIGRATION_SUCCESS";
|
|
294
|
-
EventName3["MIGRATION_FAILED"] = "MIGRATION_FAILED";
|
|
295
|
-
EventName3["MIGRATION_SHOW_INFO_PAGE"] = "MIGRATION_SHOW_INFO_PAGE";
|
|
296
|
-
EventName3["MIGRATION_ADD_PROJECT"] = "MIGRATION_ADD_PROJECT";
|
|
297
|
-
EventName3["DEPLOY_CONFIG"] = "DEPLOY_CONFIG";
|
|
298
|
-
EventName3["DEPLOY"] = "DEPLOY";
|
|
299
|
-
EventName3["DEPLOY_FAIL"] = "DEPLOY_FAIL";
|
|
300
|
-
EventName3["UNDEPLOY"] = "UNDEPLOY";
|
|
301
|
-
EventName3["UNDEPLOY_FAIL"] = "UNDEPLOY_FAIL";
|
|
302
|
-
EventName3["DATA_EDITOR_EVENT"] = "DATA_EDITOR_EVENT";
|
|
303
|
-
EventName3["CPE_EVENT"] = "CONTROL_PROPERTY_EDITOR_EVENT";
|
|
304
|
-
EventName3["SYSTEM_DETAILS_VIEW_EVENT"] = "SYSTEM_DETAILS_VIEW_EVENT";
|
|
305
|
-
EventName3["SERVICE_INQUIRER_BAS_SUCCESS"] = "SERVICE_INQUIRER_BAS_SUCCESS";
|
|
306
|
-
EventName3["SERVICE_INQUIRER_BAS_ERROR"] = "SERVICE_INQUIRER_BAS_ERROR";
|
|
307
|
-
EventName3["LIB_REFERENCE_ADDED"] = "LIB_REFERENCE_ADDED";
|
|
308
|
-
})(EventName2 = exports2.EventName || (exports2.EventName = {}));
|
|
137
|
+
exports2.Client = Client;
|
|
309
138
|
}
|
|
310
139
|
});
|
|
311
140
|
|
|
@@ -2810,7 +2639,7 @@ var require_patchRequire = __commonJS({
|
|
|
2810
2639
|
});
|
|
2811
2640
|
|
|
2812
2641
|
// ../../node_modules/diagnostic-channel/package.json
|
|
2813
|
-
var
|
|
2642
|
+
var require_package2 = __commonJS({
|
|
2814
2643
|
"../../node_modules/diagnostic-channel/package.json"(exports2, module2) {
|
|
2815
2644
|
module2.exports = {
|
|
2816
2645
|
name: "diagnostic-channel",
|
|
@@ -2868,7 +2697,7 @@ var require_channel = __commonJS({
|
|
|
2868
2697
|
};
|
|
2869
2698
|
var ContextPreservingEventEmitter = function() {
|
|
2870
2699
|
function ContextPreservingEventEmitter2() {
|
|
2871
|
-
this.version =
|
|
2700
|
+
this.version = require_package2().version;
|
|
2872
2701
|
this.subscribers = {};
|
|
2873
2702
|
this.contextPreservationFunction = function(cb) {
|
|
2874
2703
|
return cb;
|
|
@@ -3473,7 +3302,7 @@ var require_pg_pub = __commonJS({
|
|
|
3473
3302
|
function postgres6PatchFunction(originalPg, originalPgPath) {
|
|
3474
3303
|
var originalClientQuery = originalPg.Client.prototype.query;
|
|
3475
3304
|
var diagnosticOriginalFunc = "__diagnosticOriginalFunc";
|
|
3476
|
-
originalPg.Client.prototype.query = function query(
|
|
3305
|
+
originalPg.Client.prototype.query = function query(config, values, callback) {
|
|
3477
3306
|
var data2 = {
|
|
3478
3307
|
query: {},
|
|
3479
3308
|
database: {
|
|
@@ -3515,15 +3344,15 @@ var require_pg_pub = __commonJS({
|
|
|
3515
3344
|
}
|
|
3516
3345
|
}
|
|
3517
3346
|
try {
|
|
3518
|
-
if (typeof
|
|
3347
|
+
if (typeof config === "string") {
|
|
3519
3348
|
if (values instanceof Array) {
|
|
3520
3349
|
data2.query.preparable = {
|
|
3521
|
-
text:
|
|
3350
|
+
text: config,
|
|
3522
3351
|
args: values
|
|
3523
3352
|
};
|
|
3524
3353
|
callback = patchCallback(callback);
|
|
3525
3354
|
} else {
|
|
3526
|
-
data2.query.text =
|
|
3355
|
+
data2.query.text = config;
|
|
3527
3356
|
if (callback) {
|
|
3528
3357
|
callback = patchCallback(callback);
|
|
3529
3358
|
} else {
|
|
@@ -3531,28 +3360,28 @@ var require_pg_pub = __commonJS({
|
|
|
3531
3360
|
}
|
|
3532
3361
|
}
|
|
3533
3362
|
} else {
|
|
3534
|
-
if (typeof
|
|
3535
|
-
data2.query.plan =
|
|
3536
|
-
} else if (
|
|
3363
|
+
if (typeof config.name === "string") {
|
|
3364
|
+
data2.query.plan = config.name;
|
|
3365
|
+
} else if (config.values instanceof Array) {
|
|
3537
3366
|
data2.query.preparable = {
|
|
3538
|
-
text:
|
|
3539
|
-
args:
|
|
3367
|
+
text: config.text,
|
|
3368
|
+
args: config.values
|
|
3540
3369
|
};
|
|
3541
3370
|
} else {
|
|
3542
|
-
data2.query.text =
|
|
3371
|
+
data2.query.text = config.text;
|
|
3543
3372
|
}
|
|
3544
3373
|
if (callback) {
|
|
3545
3374
|
callback = patchCallback(callback);
|
|
3546
3375
|
} else if (values) {
|
|
3547
3376
|
values = patchCallback(values);
|
|
3548
3377
|
} else {
|
|
3549
|
-
|
|
3378
|
+
config.callback = patchCallback(config.callback);
|
|
3550
3379
|
}
|
|
3551
3380
|
}
|
|
3552
3381
|
} catch (e) {
|
|
3553
3382
|
return originalClientQuery.apply(this, arguments);
|
|
3554
3383
|
}
|
|
3555
|
-
arguments[0] =
|
|
3384
|
+
arguments[0] = config;
|
|
3556
3385
|
arguments[1] = values;
|
|
3557
3386
|
arguments[2] = callback;
|
|
3558
3387
|
arguments.length = arguments.length > 3 ? arguments.length : 3;
|
|
@@ -3564,7 +3393,7 @@ var require_pg_pub = __commonJS({
|
|
|
3564
3393
|
function postgres7PatchFunction(originalPg, originalPgPath) {
|
|
3565
3394
|
var originalClientQuery = originalPg.Client.prototype.query;
|
|
3566
3395
|
var diagnosticOriginalFunc = "__diagnosticOriginalFunc";
|
|
3567
|
-
originalPg.Client.prototype.query = function query(
|
|
3396
|
+
originalPg.Client.prototype.query = function query(config, values, callback) {
|
|
3568
3397
|
var _this = this;
|
|
3569
3398
|
var callbackProvided = !!callback;
|
|
3570
3399
|
var data2 = {
|
|
@@ -3608,16 +3437,16 @@ var require_pg_pub = __commonJS({
|
|
|
3608
3437
|
}
|
|
3609
3438
|
}
|
|
3610
3439
|
try {
|
|
3611
|
-
if (typeof
|
|
3440
|
+
if (typeof config === "string") {
|
|
3612
3441
|
if (values instanceof Array) {
|
|
3613
3442
|
data2.query.preparable = {
|
|
3614
|
-
text:
|
|
3443
|
+
text: config,
|
|
3615
3444
|
args: values
|
|
3616
3445
|
};
|
|
3617
3446
|
callbackProvided = typeof callback === "function";
|
|
3618
3447
|
callback = callbackProvided ? patchCallback(callback) : callback;
|
|
3619
3448
|
} else {
|
|
3620
|
-
data2.query.text =
|
|
3449
|
+
data2.query.text = config;
|
|
3621
3450
|
if (callback) {
|
|
3622
3451
|
callbackProvided = typeof callback === "function";
|
|
3623
3452
|
callback = callbackProvided ? patchCallback(callback) : callback;
|
|
@@ -3627,15 +3456,15 @@ var require_pg_pub = __commonJS({
|
|
|
3627
3456
|
}
|
|
3628
3457
|
}
|
|
3629
3458
|
} else {
|
|
3630
|
-
if (typeof
|
|
3631
|
-
data2.query.plan =
|
|
3632
|
-
} else if (
|
|
3459
|
+
if (typeof config.name === "string") {
|
|
3460
|
+
data2.query.plan = config.name;
|
|
3461
|
+
} else if (config.values instanceof Array) {
|
|
3633
3462
|
data2.query.preparable = {
|
|
3634
|
-
text:
|
|
3635
|
-
args:
|
|
3463
|
+
text: config.text,
|
|
3464
|
+
args: config.values
|
|
3636
3465
|
};
|
|
3637
3466
|
} else {
|
|
3638
|
-
data2.query.text =
|
|
3467
|
+
data2.query.text = config.text;
|
|
3639
3468
|
}
|
|
3640
3469
|
if (callback) {
|
|
3641
3470
|
callbackProvided = typeof callback === "function";
|
|
@@ -3644,14 +3473,14 @@ var require_pg_pub = __commonJS({
|
|
|
3644
3473
|
callbackProvided = typeof values === "function";
|
|
3645
3474
|
values = callbackProvided ? patchCallback(values) : values;
|
|
3646
3475
|
} else {
|
|
3647
|
-
callbackProvided = typeof
|
|
3648
|
-
|
|
3476
|
+
callbackProvided = typeof config.callback === "function";
|
|
3477
|
+
config.callback = callbackProvided ? patchCallback(config.callback) : config.callback;
|
|
3649
3478
|
}
|
|
3650
3479
|
}
|
|
3651
3480
|
} catch (e) {
|
|
3652
3481
|
return originalClientQuery.apply(this, arguments);
|
|
3653
3482
|
}
|
|
3654
|
-
arguments[0] =
|
|
3483
|
+
arguments[0] = config;
|
|
3655
3484
|
arguments[1] = values;
|
|
3656
3485
|
arguments[2] = callback;
|
|
3657
3486
|
arguments.length = arguments.length > 3 ? arguments.length : 3;
|
|
@@ -4651,7 +4480,7 @@ var require_next_tick = __commonJS({
|
|
|
4651
4480
|
});
|
|
4652
4481
|
|
|
4653
4482
|
// ../../node_modules/async-hook-jl/patches/promise.js
|
|
4654
|
-
var
|
|
4483
|
+
var require_promise = __commonJS({
|
|
4655
4484
|
"../../node_modules/async-hook-jl/patches/promise.js"(exports2, module2) {
|
|
4656
4485
|
"use strict";
|
|
4657
4486
|
function PromiseWrap() {
|
|
@@ -4788,7 +4617,7 @@ var require_timers = __commonJS({
|
|
|
4788
4617
|
});
|
|
4789
4618
|
|
|
4790
4619
|
// ../../node_modules/async-hook-jl/package.json
|
|
4791
|
-
var
|
|
4620
|
+
var require_package3 = __commonJS({
|
|
4792
4621
|
"../../node_modules/async-hook-jl/package.json"(exports2, module2) {
|
|
4793
4622
|
module2.exports = {
|
|
4794
4623
|
name: "async-hook-jl",
|
|
@@ -4834,7 +4663,7 @@ var require_async_hook = __commonJS({
|
|
|
4834
4663
|
var TIMERWRAP = asyncWrap.Providers.TIMERWRAP;
|
|
4835
4664
|
var patchs = {
|
|
4836
4665
|
"nextTick": require_next_tick(),
|
|
4837
|
-
"promise":
|
|
4666
|
+
"promise": require_promise(),
|
|
4838
4667
|
"timers": require_timers()
|
|
4839
4668
|
};
|
|
4840
4669
|
var ignoreUIDs = /* @__PURE__ */ new Set();
|
|
@@ -4909,7 +4738,7 @@ var require_async_hook = __commonJS({
|
|
|
4909
4738
|
function AsyncHook() {
|
|
4910
4739
|
this._state = new State();
|
|
4911
4740
|
this._hooks = new Hooks();
|
|
4912
|
-
this.version =
|
|
4741
|
+
this.version = require_package3().version;
|
|
4913
4742
|
this.providers = asyncWrap.Providers;
|
|
4914
4743
|
for (const key of Object.keys(patchs)) {
|
|
4915
4744
|
patchs[key].call(this);
|
|
@@ -4943,7 +4772,7 @@ var require_async_hook = __commonJS({
|
|
|
4943
4772
|
});
|
|
4944
4773
|
|
|
4945
4774
|
// ../../node_modules/stack-chain/package.json
|
|
4946
|
-
var
|
|
4775
|
+
var require_package4 = __commonJS({
|
|
4947
4776
|
"../../node_modules/stack-chain/package.json"(exports2, module2) {
|
|
4948
4777
|
module2.exports = {
|
|
4949
4778
|
name: "stack-chain",
|
|
@@ -5018,7 +4847,7 @@ var require_stack_chain = __commonJS({
|
|
|
5018
4847
|
this.extend = new TraceModifier();
|
|
5019
4848
|
this.filter = new TraceModifier();
|
|
5020
4849
|
this.format = new StackFormater();
|
|
5021
|
-
this.version =
|
|
4850
|
+
this.version = require_package4().version;
|
|
5022
4851
|
}
|
|
5023
4852
|
var SHORTCIRCUIT_CALLSITE = false;
|
|
5024
4853
|
stackChain.prototype.callSite = function collectCallSites(options2) {
|
|
@@ -5142,7 +4971,7 @@ var require_stack_chain = __commonJS({
|
|
|
5142
4971
|
var require_stack_chain2 = __commonJS({
|
|
5143
4972
|
"../../node_modules/stack-chain/index.js"(exports2, module2) {
|
|
5144
4973
|
if (global._stackChain) {
|
|
5145
|
-
if (global._stackChain.version ===
|
|
4974
|
+
if (global._stackChain.version === require_package4().version) {
|
|
5146
4975
|
module2.exports = global._stackChain;
|
|
5147
4976
|
} else {
|
|
5148
4977
|
throw new Error("Conflicting version of stack-chain found");
|
|
@@ -5159,7 +4988,7 @@ var require_async_hook_jl = __commonJS({
|
|
|
5159
4988
|
"use strict";
|
|
5160
4989
|
var AsyncHook = require_async_hook();
|
|
5161
4990
|
if (global._asyncHook) {
|
|
5162
|
-
if (global._asyncHook.version ===
|
|
4991
|
+
if (global._asyncHook.version === require_package3().version) {
|
|
5163
4992
|
module2.exports = global._asyncHook;
|
|
5164
4993
|
} else {
|
|
5165
4994
|
throw new Error("Conflicting version of async-hook-jl found");
|
|
@@ -8053,7 +7882,7 @@ var require_Util = __commonJS({
|
|
|
8053
7882
|
}
|
|
8054
7883
|
}
|
|
8055
7884
|
};
|
|
8056
|
-
Util2.makeRequest = function(
|
|
7885
|
+
Util2.makeRequest = function(config, requestUrl, requestOptions, requestCallback) {
|
|
8057
7886
|
if (requestUrl && requestUrl.indexOf("//") === 0) {
|
|
8058
7887
|
requestUrl = "https:" + requestUrl;
|
|
8059
7888
|
}
|
|
@@ -8061,10 +7890,10 @@ var require_Util = __commonJS({
|
|
|
8061
7890
|
var options2 = __assign({}, requestOptions, { host: requestUrlParsed.hostname, port: requestUrlParsed.port, path: requestUrlParsed.pathname });
|
|
8062
7891
|
var proxyUrl = void 0;
|
|
8063
7892
|
if (requestUrlParsed.protocol === "https:") {
|
|
8064
|
-
proxyUrl =
|
|
7893
|
+
proxyUrl = config.proxyHttpsUrl || void 0;
|
|
8065
7894
|
}
|
|
8066
7895
|
if (requestUrlParsed.protocol === "http:") {
|
|
8067
|
-
proxyUrl =
|
|
7896
|
+
proxyUrl = config.proxyHttpUrl || void 0;
|
|
8068
7897
|
}
|
|
8069
7898
|
if (proxyUrl) {
|
|
8070
7899
|
if (proxyUrl.indexOf("//") === 0) {
|
|
@@ -8079,10 +7908,10 @@ var require_Util = __commonJS({
|
|
|
8079
7908
|
}
|
|
8080
7909
|
}
|
|
8081
7910
|
var isHttps = requestUrlParsed.protocol === "https:" && !proxyUrl;
|
|
8082
|
-
if (isHttps &&
|
|
8083
|
-
options2.agent =
|
|
8084
|
-
} else if (!isHttps &&
|
|
8085
|
-
options2.agent =
|
|
7911
|
+
if (isHttps && config.httpsAgent !== void 0) {
|
|
7912
|
+
options2.agent = config.httpsAgent;
|
|
7913
|
+
} else if (!isHttps && config.httpAgent !== void 0) {
|
|
7914
|
+
options2.agent = config.httpAgent;
|
|
8086
7915
|
} else if (isHttps) {
|
|
8087
7916
|
options2.agent = Util2.tlsRestrictedAgent;
|
|
8088
7917
|
}
|
|
@@ -8181,8 +8010,8 @@ var require_CorrelationIdManager = __commonJS({
|
|
|
8181
8010
|
var CorrelationIdManager = function() {
|
|
8182
8011
|
function CorrelationIdManager2() {
|
|
8183
8012
|
}
|
|
8184
|
-
CorrelationIdManager2.queryCorrelationId = function(
|
|
8185
|
-
var appIdUrlString =
|
|
8013
|
+
CorrelationIdManager2.queryCorrelationId = function(config, callback) {
|
|
8014
|
+
var appIdUrlString = config.profileQueryEndpoint + "/api/profiles/" + config.instrumentationKey + "/appId";
|
|
8186
8015
|
if (CorrelationIdManager2.completedLookups.hasOwnProperty(appIdUrlString)) {
|
|
8187
8016
|
callback(CorrelationIdManager2.completedLookups[appIdUrlString]);
|
|
8188
8017
|
return;
|
|
@@ -8200,7 +8029,7 @@ var require_CorrelationIdManager = __commonJS({
|
|
|
8200
8029
|
disableAppInsightsAutoCollection: true
|
|
8201
8030
|
};
|
|
8202
8031
|
Logging.info(CorrelationIdManager2.TAG, requestOptions);
|
|
8203
|
-
var req = Util.makeRequest(
|
|
8032
|
+
var req = Util.makeRequest(config, appIdUrlString, requestOptions, function(res) {
|
|
8204
8033
|
if (res.statusCode === 200) {
|
|
8205
8034
|
var appId_1 = "";
|
|
8206
8035
|
res.setEncoding("utf-8");
|
|
@@ -8222,7 +8051,7 @@ var require_CorrelationIdManager = __commonJS({
|
|
|
8222
8051
|
CorrelationIdManager2.completedLookups[appIdUrlString] = void 0;
|
|
8223
8052
|
delete CorrelationIdManager2.pendingLookups[appIdUrlString];
|
|
8224
8053
|
} else {
|
|
8225
|
-
setTimeout(fetchAppId,
|
|
8054
|
+
setTimeout(fetchAppId, config.correlationIdRetryIntervalMs);
|
|
8226
8055
|
}
|
|
8227
8056
|
});
|
|
8228
8057
|
if (req) {
|
|
@@ -8234,8 +8063,8 @@ var require_CorrelationIdManager = __commonJS({
|
|
|
8234
8063
|
};
|
|
8235
8064
|
setTimeout(fetchAppId, 0);
|
|
8236
8065
|
};
|
|
8237
|
-
CorrelationIdManager2.cancelCorrelationIdQuery = function(
|
|
8238
|
-
var appIdUrlString =
|
|
8066
|
+
CorrelationIdManager2.cancelCorrelationIdQuery = function(config, callback) {
|
|
8067
|
+
var appIdUrlString = config.profileQueryEndpoint + "/api/profiles/" + config.instrumentationKey + "/appId";
|
|
8239
8068
|
var pendingLookups = CorrelationIdManager2.pendingLookups[appIdUrlString];
|
|
8240
8069
|
if (pendingLookups) {
|
|
8241
8070
|
CorrelationIdManager2.pendingLookups[appIdUrlString] = pendingLookups.filter(function(cb) {
|
|
@@ -9449,12 +9278,12 @@ var require_QuickPulseEnvelopeFactory = __commonJS({
|
|
|
9449
9278
|
var QuickPulseEnvelopeFactory = function() {
|
|
9450
9279
|
function QuickPulseEnvelopeFactory2() {
|
|
9451
9280
|
}
|
|
9452
|
-
QuickPulseEnvelopeFactory2.createQuickPulseEnvelope = function(metrics, documents,
|
|
9281
|
+
QuickPulseEnvelopeFactory2.createQuickPulseEnvelope = function(metrics, documents, config, context) {
|
|
9453
9282
|
var machineName = os && typeof os.hostname === "function" && os.hostname() || "Unknown";
|
|
9454
9283
|
var instance = context.tags && context.keys && context.keys.cloudRoleInstance && context.tags[context.keys.cloudRoleInstance] || machineName;
|
|
9455
9284
|
var envelope = {
|
|
9456
9285
|
Documents: documents.length > 0 ? documents : null,
|
|
9457
|
-
InstrumentationKey:
|
|
9286
|
+
InstrumentationKey: config.instrumentationKey || "",
|
|
9458
9287
|
Metrics: metrics.length > 0 ? metrics : null,
|
|
9459
9288
|
InvariantVersion: 1,
|
|
9460
9289
|
Timestamp: "/Date(" + Date.now() + ")/",
|
|
@@ -9600,8 +9429,8 @@ var require_QuickPulseSender = __commonJS({
|
|
|
9600
9429
|
subscribed: "x-ms-qps-subscribed"
|
|
9601
9430
|
};
|
|
9602
9431
|
var QuickPulseSender = function() {
|
|
9603
|
-
function QuickPulseSender2(
|
|
9604
|
-
this._config =
|
|
9432
|
+
function QuickPulseSender2(config) {
|
|
9433
|
+
this._config = config;
|
|
9605
9434
|
this._consecutiveErrors = 0;
|
|
9606
9435
|
}
|
|
9607
9436
|
QuickPulseSender2.prototype.ping = function(envelope, done) {
|
|
@@ -10193,8 +10022,8 @@ var require_Sender = __commonJS({
|
|
|
10193
10022
|
var AutoCollectHttpDependencies = require_HttpDependencies();
|
|
10194
10023
|
var Util = require_Util();
|
|
10195
10024
|
var Sender = function() {
|
|
10196
|
-
function Sender2(
|
|
10197
|
-
this._config =
|
|
10025
|
+
function Sender2(config, onSuccess, onError) {
|
|
10026
|
+
this._config = config;
|
|
10198
10027
|
this._onSuccess = onSuccess;
|
|
10199
10028
|
this._onError = onError;
|
|
10200
10029
|
this._enableDiskRetryMode = false;
|
|
@@ -10589,7 +10418,7 @@ var require_EnvelopeFactory = __commonJS({
|
|
|
10589
10418
|
var EnvelopeFactory = function() {
|
|
10590
10419
|
function EnvelopeFactory2() {
|
|
10591
10420
|
}
|
|
10592
|
-
EnvelopeFactory2.createEnvelope = function(telemetry, telemetryType, commonProperties, context,
|
|
10421
|
+
EnvelopeFactory2.createEnvelope = function(telemetry, telemetryType, commonProperties, context, config) {
|
|
10593
10422
|
var data2 = null;
|
|
10594
10423
|
switch (telemetryType) {
|
|
10595
10424
|
case Contracts.TelemetryType.Trace:
|
|
@@ -10625,7 +10454,7 @@ var require_EnvelopeFactory = __commonJS({
|
|
|
10625
10454
|
}
|
|
10626
10455
|
data2.baseData.properties = Util.validateStringMap(data2.baseData.properties);
|
|
10627
10456
|
}
|
|
10628
|
-
var iKey =
|
|
10457
|
+
var iKey = config ? config.instrumentationKey || "" : "";
|
|
10629
10458
|
var envelope = new Contracts.Envelope();
|
|
10630
10459
|
envelope.data = data2;
|
|
10631
10460
|
envelope.iKey = iKey;
|
|
@@ -10633,7 +10462,7 @@ var require_EnvelopeFactory = __commonJS({
|
|
|
10633
10462
|
envelope.tags = this.getTags(context, telemetry.tagOverrides);
|
|
10634
10463
|
envelope.time = new Date().toISOString();
|
|
10635
10464
|
envelope.ver = 1;
|
|
10636
|
-
envelope.sampleRate =
|
|
10465
|
+
envelope.sampleRate = config ? config.samplingPercentage : 100;
|
|
10637
10466
|
if (telemetryType === Contracts.TelemetryType.Metric) {
|
|
10638
10467
|
envelope.sampleRate = 100;
|
|
10639
10468
|
}
|
|
@@ -10845,17 +10674,17 @@ var require_TelemetryClient = __commonJS({
|
|
|
10845
10674
|
var TelemetryClient = function() {
|
|
10846
10675
|
function TelemetryClient2(iKey) {
|
|
10847
10676
|
this._telemetryProcessors = [];
|
|
10848
|
-
var
|
|
10849
|
-
this.config =
|
|
10677
|
+
var config = new Config(iKey);
|
|
10678
|
+
this.config = config;
|
|
10850
10679
|
this.context = new Context();
|
|
10851
10680
|
this.commonProperties = {};
|
|
10852
10681
|
var sender = new Sender(this.config);
|
|
10853
10682
|
this.channel = new Channel(function() {
|
|
10854
|
-
return
|
|
10683
|
+
return config.disableAppInsights;
|
|
10855
10684
|
}, function() {
|
|
10856
|
-
return
|
|
10685
|
+
return config.maxBatchSize;
|
|
10857
10686
|
}, function() {
|
|
10858
|
-
return
|
|
10687
|
+
return config.maxBatchIntervalMs;
|
|
10859
10688
|
}, sender);
|
|
10860
10689
|
}
|
|
10861
10690
|
TelemetryClient2.prototype.trackTrace = function(telemetry) {
|
|
@@ -11220,363 +11049,6 @@ var require_applicationinsights = __commonJS({
|
|
|
11220
11049
|
}
|
|
11221
11050
|
});
|
|
11222
11051
|
|
|
11223
|
-
// ../lib/telemetry/dist/package.json
|
|
11224
|
-
var require_package4 = __commonJS({
|
|
11225
|
-
"../lib/telemetry/dist/package.json"(exports2, module2) {
|
|
11226
|
-
module2.exports = {
|
|
11227
|
-
name: "@sap/ux-telemetry",
|
|
11228
|
-
version: "1.10.4",
|
|
11229
|
-
description: "SAP Fiori tools telemetry library",
|
|
11230
|
-
main: "dist/src/index.js",
|
|
11231
|
-
author: "SAP SE",
|
|
11232
|
-
license: "MIT",
|
|
11233
|
-
private: true,
|
|
11234
|
-
azureInstrumentationKey: "0a65e45d-6bf4-421d-b845-61e888c50e9e",
|
|
11235
|
-
azureProdKey: "0a65e45d-6bf4-421d-b845-61e888c50e9e",
|
|
11236
|
-
scripts: {
|
|
11237
|
-
"pre-commit": "lint-staged --quiet",
|
|
11238
|
-
"clean:dist": "rimraf ./dist ./generators *.tsbuildinfo",
|
|
11239
|
-
clean: "rimraf ./reports",
|
|
11240
|
-
build: "ts-node ./build-script/ && yarn run clean && tsc --build ./",
|
|
11241
|
-
test: "cross-env SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY=false jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
|
|
11242
|
-
lint: "eslint . --ext .ts",
|
|
11243
|
-
"lint:summary": "eslint . --ext .ts -f summary",
|
|
11244
|
-
"lint:fix": "eslint --fix",
|
|
11245
|
-
"lint:fix:all": "eslint . --ext .ts --fix",
|
|
11246
|
-
"lint:report": "eslint . --ext .ts -f multiple ",
|
|
11247
|
-
"format:fix": "prettier --write --loglevel silent --ignore-path ../../../.prettierignore",
|
|
11248
|
-
"format:fix:all": "prettier --write '**/*.{css,scss,html,js,json,ts,tsx,yaml,yml}' '!**/{out,dist,node_modules}/**' '!**/*.{svg,png,xml}' --ignore-path ../../../.prettierignore",
|
|
11249
|
-
madge: "madge --warning --circular --extensions ts ./"
|
|
11250
|
-
},
|
|
11251
|
-
dependencies: {
|
|
11252
|
-
"@sap-ux/store": "0.3.8",
|
|
11253
|
-
"@sap/ux-cds": "1.10.4",
|
|
11254
|
-
"@sap/ux-common-utils": "1.10.4",
|
|
11255
|
-
"@sap/ux-feature-toggle": "1.10.4",
|
|
11256
|
-
"@sap/ux-project-access": "1.10.4",
|
|
11257
|
-
applicationinsights: "1.4.1",
|
|
11258
|
-
axios: "0.26.0",
|
|
11259
|
-
"performance-now": "2.1.0",
|
|
11260
|
-
yaml: "2.2.2"
|
|
11261
|
-
},
|
|
11262
|
-
devDependencies: {
|
|
11263
|
-
memfs: "3.4.13",
|
|
11264
|
-
"ts-jest": "29.1.1",
|
|
11265
|
-
"ts-node": "8.5.2",
|
|
11266
|
-
typescript: "4.9.5",
|
|
11267
|
-
unionfs: "4.4.0"
|
|
11268
|
-
},
|
|
11269
|
-
files: [
|
|
11270
|
-
"dist/"
|
|
11271
|
-
],
|
|
11272
|
-
jestSonar: {
|
|
11273
|
-
reportPath: "reports/test/unit",
|
|
11274
|
-
reportFile: "test-report.xml"
|
|
11275
|
-
},
|
|
11276
|
-
"eslint-formatter-multiple": {
|
|
11277
|
-
formatters: [
|
|
11278
|
-
{
|
|
11279
|
-
name: "stylish",
|
|
11280
|
-
output: "console"
|
|
11281
|
-
},
|
|
11282
|
-
{
|
|
11283
|
-
name: "json",
|
|
11284
|
-
output: "file",
|
|
11285
|
-
path: "reports/lint/eslint.json"
|
|
11286
|
-
},
|
|
11287
|
-
{
|
|
11288
|
-
name: "checkstyle",
|
|
11289
|
-
output: "file",
|
|
11290
|
-
path: "reports/lint/eslint.checkstyle.xml"
|
|
11291
|
-
}
|
|
11292
|
-
]
|
|
11293
|
-
}
|
|
11294
|
-
};
|
|
11295
|
-
}
|
|
11296
|
-
});
|
|
11297
|
-
|
|
11298
|
-
// ../lib/telemetry/dist/src/util/telemetryClientConfig.js
|
|
11299
|
-
var require_telemetryClientConfig = __commonJS({
|
|
11300
|
-
"../lib/telemetry/dist/src/util/telemetryClientConfig.js"(exports2) {
|
|
11301
|
-
"use strict";
|
|
11302
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11303
|
-
exports2.configAzureTelemetryClient = void 0;
|
|
11304
|
-
function configAzureTelemetryClient(client) {
|
|
11305
|
-
client.channel.setUseDiskRetryCaching(true);
|
|
11306
|
-
client.addTelemetryProcessor((envelope) => {
|
|
11307
|
-
envelope.tags["ai.location.ip"] = "0.0.0.0";
|
|
11308
|
-
envelope.tags["ai.cloud.roleInstance"] = "masked";
|
|
11309
|
-
envelope.tags["ai.cloud.role"] = "masked";
|
|
11310
|
-
envelope.tags["ai.device.type"] = "masked";
|
|
11311
|
-
return true;
|
|
11312
|
-
});
|
|
11313
|
-
}
|
|
11314
|
-
exports2.configAzureTelemetryClient = configAzureTelemetryClient;
|
|
11315
|
-
}
|
|
11316
|
-
});
|
|
11317
|
-
|
|
11318
|
-
// ../lib/telemetry/dist/src/util/reporting.js
|
|
11319
|
-
var require_reporting = __commonJS({
|
|
11320
|
-
"../lib/telemetry/dist/src/util/reporting.js"(exports2) {
|
|
11321
|
-
"use strict";
|
|
11322
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
11323
|
-
if (k2 === void 0)
|
|
11324
|
-
k2 = k;
|
|
11325
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11326
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11327
|
-
desc = { enumerable: true, get: function() {
|
|
11328
|
-
return m[k];
|
|
11329
|
-
} };
|
|
11330
|
-
}
|
|
11331
|
-
Object.defineProperty(o, k2, desc);
|
|
11332
|
-
} : function(o, m, k, k2) {
|
|
11333
|
-
if (k2 === void 0)
|
|
11334
|
-
k2 = k;
|
|
11335
|
-
o[k2] = m[k];
|
|
11336
|
-
});
|
|
11337
|
-
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
11338
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11339
|
-
} : function(o, v) {
|
|
11340
|
-
o["default"] = v;
|
|
11341
|
-
});
|
|
11342
|
-
var __importStar = exports2 && exports2.__importStar || function(mod) {
|
|
11343
|
-
if (mod && mod.__esModule)
|
|
11344
|
-
return mod;
|
|
11345
|
-
var result2 = {};
|
|
11346
|
-
if (mod != null) {
|
|
11347
|
-
for (var k in mod)
|
|
11348
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
11349
|
-
__createBinding(result2, mod, k);
|
|
11350
|
-
}
|
|
11351
|
-
__setModuleDefault(result2, mod);
|
|
11352
|
-
return result2;
|
|
11353
|
-
};
|
|
11354
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11355
|
-
exports2.reportEnableTelemetryOnOff = exports2.reportRuntimeError = void 0;
|
|
11356
|
-
var EventName_1 = require_EventName();
|
|
11357
|
-
var appInsights = __importStar(require_applicationinsights());
|
|
11358
|
-
var telemetryPackageJSON = __importStar(require_package4());
|
|
11359
|
-
var telemetryClientConfig_1 = require_telemetryClientConfig();
|
|
11360
|
-
var parseErrorStack = (errorStack) => {
|
|
11361
|
-
const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
|
|
11362
|
-
const parsedStack = [];
|
|
11363
|
-
const filtered = errorStack.split("\n").filter((line) => !!line.match(/^\s*at .*(\S+:\d+|\(native\))/m));
|
|
11364
|
-
if (!filtered.length) {
|
|
11365
|
-
return parsedStack;
|
|
11366
|
-
}
|
|
11367
|
-
filtered.forEach((line) => {
|
|
11368
|
-
let sanitizedLine = line.replace(/^\s+/, "");
|
|
11369
|
-
const location = line.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
11370
|
-
if (!location) {
|
|
11371
|
-
return;
|
|
11372
|
-
}
|
|
11373
|
-
let filepath = null;
|
|
11374
|
-
const normalizedFilepath = location[2].replace(/\\/g, "/");
|
|
11375
|
-
for (const regexp of regexps) {
|
|
11376
|
-
const match = normalizedFilepath.match(regexp);
|
|
11377
|
-
if (match) {
|
|
11378
|
-
filepath = match[0];
|
|
11379
|
-
break;
|
|
11380
|
-
}
|
|
11381
|
-
}
|
|
11382
|
-
if (!filepath) {
|
|
11383
|
-
return;
|
|
11384
|
-
}
|
|
11385
|
-
sanitizedLine = sanitizedLine.replace(location[0], "");
|
|
11386
|
-
const functionName = sanitizedLine.split(/\s+/).slice(1).join("");
|
|
11387
|
-
const lineNumber = location[3];
|
|
11388
|
-
const columnNumber = location[4];
|
|
11389
|
-
const parsedStackLine = `${functionName} at (${filepath}:${lineNumber}:${columnNumber});`;
|
|
11390
|
-
parsedStack.push(parsedStackLine);
|
|
11391
|
-
});
|
|
11392
|
-
return parsedStack;
|
|
11393
|
-
};
|
|
11394
|
-
var reportingTelemetryClient;
|
|
11395
|
-
var _a2;
|
|
11396
|
-
if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
|
|
11397
|
-
reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
|
|
11398
|
-
(0, telemetryClientConfig_1.configAzureTelemetryClient)(reportingTelemetryClient);
|
|
11399
|
-
}
|
|
11400
|
-
var reportRuntimeError = (error3) => {
|
|
11401
|
-
const properties = { message: error3.message };
|
|
11402
|
-
if (error3.stack) {
|
|
11403
|
-
const parsedStack = parseErrorStack(error3.stack);
|
|
11404
|
-
if (parsedStack.length) {
|
|
11405
|
-
properties.stack = parsedStack.join(" \n");
|
|
11406
|
-
}
|
|
11407
|
-
}
|
|
11408
|
-
const telemetryEvent = {
|
|
11409
|
-
name: EventName_1.EventName.TELEMETRY_SETTINGS_INIT_FAILED,
|
|
11410
|
-
properties,
|
|
11411
|
-
measurements: {}
|
|
11412
|
-
};
|
|
11413
|
-
if (process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY !== "true") {
|
|
11414
|
-
reportingTelemetryClient.trackEvent(telemetryEvent);
|
|
11415
|
-
}
|
|
11416
|
-
};
|
|
11417
|
-
exports2.reportRuntimeError = reportRuntimeError;
|
|
11418
|
-
var reportEnableTelemetryOnOff = (enableTelemetry, commonProperties) => {
|
|
11419
|
-
const telemetryEvent = {
|
|
11420
|
-
name: EventName_1.EventName.DISABLE_TELEMETRY,
|
|
11421
|
-
properties: {
|
|
11422
|
-
disableTelemetry: `${!enableTelemetry}`,
|
|
11423
|
-
...commonProperties
|
|
11424
|
-
},
|
|
11425
|
-
measurements: {}
|
|
11426
|
-
};
|
|
11427
|
-
if (process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY !== "true") {
|
|
11428
|
-
reportingTelemetryClient.trackEvent(telemetryEvent);
|
|
11429
|
-
}
|
|
11430
|
-
};
|
|
11431
|
-
exports2.reportEnableTelemetryOnOff = reportEnableTelemetryOnOff;
|
|
11432
|
-
}
|
|
11433
|
-
});
|
|
11434
|
-
|
|
11435
|
-
// ../lib/telemetry/dist/src/system/system.js
|
|
11436
|
-
var require_system2 = __commonJS({
|
|
11437
|
-
"../lib/telemetry/dist/src/system/system.js"(exports2, module2) {
|
|
11438
|
-
"use strict";
|
|
11439
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
11440
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
11441
|
-
};
|
|
11442
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11443
|
-
exports2.TelemetrySystem = void 0;
|
|
11444
|
-
var fs_1 = __importDefault(require("fs"));
|
|
11445
|
-
var system_1 = require_system();
|
|
11446
|
-
var cloudDebugger_1 = require_cloudDebugger();
|
|
11447
|
-
var ux_common_utils_1 = require_dist();
|
|
11448
|
-
var reporting_1 = require_reporting();
|
|
11449
|
-
var TelemetrySystem = class {
|
|
11450
|
-
static init() {
|
|
11451
|
-
(0, cloudDebugger_1.debug)(`start System.init`);
|
|
11452
|
-
TelemetrySystem.modules = (0, system_1.processMatchingPaths)(TelemetrySystem.modules);
|
|
11453
|
-
let pathBase = TelemetrySystem.getMatchingModulePath(module2);
|
|
11454
|
-
(0, cloudDebugger_1.debug)(`base path: ${pathBase}`);
|
|
11455
|
-
if (!pathBase) {
|
|
11456
|
-
TelemetrySystem.fallbackModules = (0, system_1.processMatchingPaths)(TelemetrySystem.fallbackModules);
|
|
11457
|
-
pathBase = TelemetrySystem.getMatchingModulePath(module2, true);
|
|
11458
|
-
}
|
|
11459
|
-
const manifestPath = TelemetrySystem.getManifestPath(pathBase);
|
|
11460
|
-
(0, cloudDebugger_1.debug)(`package.json path: ${manifestPath}`);
|
|
11461
|
-
TelemetrySystem.manifest = TelemetrySystem.getManifestJSON(manifestPath);
|
|
11462
|
-
}
|
|
11463
|
-
static getManifestJSON(path) {
|
|
11464
|
-
try {
|
|
11465
|
-
return JSON.parse(fs_1.default.readFileSync(path, "utf-8"));
|
|
11466
|
-
} catch (err) {
|
|
11467
|
-
console.log(`[Telemetry]: ${err.message}`);
|
|
11468
|
-
return null;
|
|
11469
|
-
}
|
|
11470
|
-
}
|
|
11471
|
-
static getManifestPath(pathBase) {
|
|
11472
|
-
let manifestPath = pathBase;
|
|
11473
|
-
if ((0, ux_common_utils_1.isAppStudio)() && manifestPath && manifestPath.indexOf("generators") < 0 && manifestPath.indexOf("deployment-generator") < 0 && manifestPath.indexOf("/ux-ui5-tooling") < 0) {
|
|
11474
|
-
manifestPath = manifestPath.concat("/extension");
|
|
11475
|
-
}
|
|
11476
|
-
if (manifestPath && manifestPath.indexOf("language-server") > -1) {
|
|
11477
|
-
manifestPath = manifestPath.replace(/\/([^/]+)\/?$/, "/ide-extension");
|
|
11478
|
-
}
|
|
11479
|
-
if (manifestPath && manifestPath.indexOf("generators") > -1 && manifestPath.indexOf("@sap/generator-fiori") < 0) {
|
|
11480
|
-
if (manifestPath.indexOf("deployment-generator") > -1) {
|
|
11481
|
-
manifestPath = `${manifestPath}/telemetry`;
|
|
11482
|
-
} else {
|
|
11483
|
-
manifestPath = manifestPath.slice(0, manifestPath.lastIndexOf("/"));
|
|
11484
|
-
}
|
|
11485
|
-
}
|
|
11486
|
-
if (manifestPath && manifestPath.indexOf("@sap/generator-fiori") > -1) {
|
|
11487
|
-
manifestPath = `${manifestPath}/telemetry`;
|
|
11488
|
-
}
|
|
11489
|
-
if (manifestPath) {
|
|
11490
|
-
return `${manifestPath}/package.json`;
|
|
11491
|
-
} else {
|
|
11492
|
-
return "";
|
|
11493
|
-
}
|
|
11494
|
-
}
|
|
11495
|
-
static getMatchingModulePath(module3, useFallbackModules) {
|
|
11496
|
-
let modulePath = module3.filename || __dirname;
|
|
11497
|
-
if ((modulePath == null ? void 0 : modulePath.indexOf("\\")) > -1) {
|
|
11498
|
-
modulePath = modulePath.replace(/\\/g, "/");
|
|
11499
|
-
}
|
|
11500
|
-
const matchingPaths = useFallbackModules ? TelemetrySystem.fallbackModules : TelemetrySystem.modules;
|
|
11501
|
-
const matchingPath = TelemetrySystem.matchModule(modulePath, matchingPaths);
|
|
11502
|
-
if (!matchingPath && module3.parent) {
|
|
11503
|
-
return TelemetrySystem.getMatchingModulePath(module3.parent, useFallbackModules);
|
|
11504
|
-
} else {
|
|
11505
|
-
return matchingPath;
|
|
11506
|
-
}
|
|
11507
|
-
}
|
|
11508
|
-
static matchModule(modulePath, matchingPaths) {
|
|
11509
|
-
let path = null;
|
|
11510
|
-
matchingPaths.forEach((module3) => {
|
|
11511
|
-
module3.patterns.forEach((patternRegExp) => {
|
|
11512
|
-
const matchToken = modulePath == null ? void 0 : modulePath.match(patternRegExp);
|
|
11513
|
-
if (matchToken && matchToken.length > 0) {
|
|
11514
|
-
path = matchToken[0];
|
|
11515
|
-
TelemetrySystem.WORKSTREAM = module3.workStream;
|
|
11516
|
-
}
|
|
11517
|
-
});
|
|
11518
|
-
});
|
|
11519
|
-
return path;
|
|
11520
|
-
}
|
|
11521
|
-
};
|
|
11522
|
-
exports2.TelemetrySystem = TelemetrySystem;
|
|
11523
|
-
TelemetrySystem.modules = [
|
|
11524
|
-
{
|
|
11525
|
-
workStream: "extension",
|
|
11526
|
-
patterns: ["ide-extension", "sap-ux-[\\w-.@]+"]
|
|
11527
|
-
},
|
|
11528
|
-
{
|
|
11529
|
-
workStream: "core",
|
|
11530
|
-
patterns: ["core"]
|
|
11531
|
-
}
|
|
11532
|
-
];
|
|
11533
|
-
TelemetrySystem.fallbackModules = [
|
|
11534
|
-
{
|
|
11535
|
-
workStream: "extension",
|
|
11536
|
-
patterns: ["language-server[\\w.-]*"]
|
|
11537
|
-
},
|
|
11538
|
-
{
|
|
11539
|
-
workStream: "core",
|
|
11540
|
-
patterns: ["generators", "project-generator", "deployment-generator", "ux-ui5-tooling", "generator-common"]
|
|
11541
|
-
}
|
|
11542
|
-
];
|
|
11543
|
-
var _a2;
|
|
11544
|
-
try {
|
|
11545
|
-
if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
|
|
11546
|
-
TelemetrySystem.init();
|
|
11547
|
-
}
|
|
11548
|
-
} catch (err) {
|
|
11549
|
-
(0, reporting_1.reportRuntimeError)(err);
|
|
11550
|
-
}
|
|
11551
|
-
}
|
|
11552
|
-
});
|
|
11553
|
-
|
|
11554
|
-
// ../lib/telemetry/dist/src/client/client.js
|
|
11555
|
-
var require_client = __commonJS({
|
|
11556
|
-
"../lib/telemetry/dist/src/client/client.js"(exports2) {
|
|
11557
|
-
"use strict";
|
|
11558
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11559
|
-
exports2.Client = void 0;
|
|
11560
|
-
var Client = class {
|
|
11561
|
-
constructor() {
|
|
11562
|
-
this.applicationKey = "";
|
|
11563
|
-
this.extensionName = "";
|
|
11564
|
-
this.extensionVersion = "";
|
|
11565
|
-
}
|
|
11566
|
-
getApplicationKey() {
|
|
11567
|
-
return this.applicationKey;
|
|
11568
|
-
}
|
|
11569
|
-
getExtensionVersion() {
|
|
11570
|
-
return this.extensionVersion;
|
|
11571
|
-
}
|
|
11572
|
-
getExtensionName() {
|
|
11573
|
-
return this.extensionName;
|
|
11574
|
-
}
|
|
11575
|
-
};
|
|
11576
|
-
exports2.Client = Client;
|
|
11577
|
-
}
|
|
11578
|
-
});
|
|
11579
|
-
|
|
11580
11052
|
// ../lib/telemetry/dist/src/client/model/EventHeader.js
|
|
11581
11053
|
var require_EventHeader = __commonJS({
|
|
11582
11054
|
"../lib/telemetry/dist/src/client/model/EventHeader.js"(exports2) {
|
|
@@ -11617,6 +11089,26 @@ var require_SampleRate = __commonJS({
|
|
|
11617
11089
|
}
|
|
11618
11090
|
});
|
|
11619
11091
|
|
|
11092
|
+
// ../lib/telemetry/dist/src/util/telemetryClientConfig.js
|
|
11093
|
+
var require_telemetryClientConfig = __commonJS({
|
|
11094
|
+
"../lib/telemetry/dist/src/util/telemetryClientConfig.js"(exports2) {
|
|
11095
|
+
"use strict";
|
|
11096
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11097
|
+
exports2.configAzureTelemetryClient = void 0;
|
|
11098
|
+
function configAzureTelemetryClient(client) {
|
|
11099
|
+
client.channel.setUseDiskRetryCaching(true);
|
|
11100
|
+
client.addTelemetryProcessor((envelope) => {
|
|
11101
|
+
envelope.tags["ai.location.ip"] = "0.0.0.0";
|
|
11102
|
+
envelope.tags["ai.cloud.roleInstance"] = "masked";
|
|
11103
|
+
envelope.tags["ai.cloud.role"] = "masked";
|
|
11104
|
+
envelope.tags["ai.device.type"] = "masked";
|
|
11105
|
+
return true;
|
|
11106
|
+
});
|
|
11107
|
+
}
|
|
11108
|
+
exports2.configAzureTelemetryClient = configAzureTelemetryClient;
|
|
11109
|
+
}
|
|
11110
|
+
});
|
|
11111
|
+
|
|
11620
11112
|
// ../lib/telemetry/dist/src/client/appInsightClient.js
|
|
11621
11113
|
var require_appInsightClient = __commonJS({
|
|
11622
11114
|
"../lib/telemetry/dist/src/client/appInsightClient.js"(exports2) {
|
|
@@ -11659,7 +11151,7 @@ var require_appInsightClient = __commonJS({
|
|
|
11659
11151
|
var appInsights = __importStar(require_applicationinsights());
|
|
11660
11152
|
var EventHeader_1 = require_EventHeader();
|
|
11661
11153
|
var SampleRate_1 = require_SampleRate();
|
|
11662
|
-
var system_1 =
|
|
11154
|
+
var system_1 = require_system();
|
|
11663
11155
|
var telemetryClientConfig_1 = require_telemetryClientConfig();
|
|
11664
11156
|
var ApplicationInsightClient = class extends client_1.Client {
|
|
11665
11157
|
constructor(applicationKey, extensionName, extensionVersion) {
|
|
@@ -11815,6 +11307,195 @@ var require_toolsSuiteTelemetryClient = __commonJS({
|
|
|
11815
11307
|
}
|
|
11816
11308
|
});
|
|
11817
11309
|
|
|
11310
|
+
// ../lib/common-utils/dist/appStudio.js
|
|
11311
|
+
var require_appStudio = __commonJS({
|
|
11312
|
+
"../lib/common-utils/dist/appStudio.js"(exports2) {
|
|
11313
|
+
"use strict";
|
|
11314
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11315
|
+
exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = exports2.ENV = void 0;
|
|
11316
|
+
var ENV;
|
|
11317
|
+
(function(ENV2) {
|
|
11318
|
+
ENV2["PROXY_URL"] = "HTTP_PROXY";
|
|
11319
|
+
ENV2["H2O_URL"] = "H2O_URL";
|
|
11320
|
+
})(ENV = exports2.ENV || (exports2.ENV = {}));
|
|
11321
|
+
function isAppStudio2() {
|
|
11322
|
+
return !!process.env[ENV.H2O_URL];
|
|
11323
|
+
}
|
|
11324
|
+
exports2.isAppStudio = isAppStudio2;
|
|
11325
|
+
function getAppStudioBaseURL() {
|
|
11326
|
+
return process.env[ENV.H2O_URL];
|
|
11327
|
+
}
|
|
11328
|
+
exports2.getAppStudioBaseURL = getAppStudioBaseURL;
|
|
11329
|
+
function getAppStudioProxyURL() {
|
|
11330
|
+
return process.env[ENV.PROXY_URL];
|
|
11331
|
+
}
|
|
11332
|
+
exports2.getAppStudioProxyURL = getAppStudioProxyURL;
|
|
11333
|
+
}
|
|
11334
|
+
});
|
|
11335
|
+
|
|
11336
|
+
// ../lib/common-utils/dist/file.js
|
|
11337
|
+
var require_file = __commonJS({
|
|
11338
|
+
"../lib/common-utils/dist/file.js"(exports2) {
|
|
11339
|
+
"use strict";
|
|
11340
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
11341
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
11342
|
+
};
|
|
11343
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11344
|
+
exports2.toPosixPath = void 0;
|
|
11345
|
+
var path_1 = __importDefault(require("path"));
|
|
11346
|
+
function toPosixPath(dirPath) {
|
|
11347
|
+
return path_1.default.normalize(dirPath).split(/[\\/]/g).join(path_1.default.posix.sep);
|
|
11348
|
+
}
|
|
11349
|
+
exports2.toPosixPath = toPosixPath;
|
|
11350
|
+
}
|
|
11351
|
+
});
|
|
11352
|
+
|
|
11353
|
+
// ../lib/common-utils/dist/promise.js
|
|
11354
|
+
var require_promise2 = __commonJS({
|
|
11355
|
+
"../lib/common-utils/dist/promise.js"(exports2) {
|
|
11356
|
+
"use strict";
|
|
11357
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11358
|
+
exports2.allSettled = void 0;
|
|
11359
|
+
function allSettled(promises2) {
|
|
11360
|
+
if (!promises2 || promises2.length === 0) {
|
|
11361
|
+
return Promise.resolve([]);
|
|
11362
|
+
}
|
|
11363
|
+
const results = Array(promises2.length);
|
|
11364
|
+
let count = 0;
|
|
11365
|
+
return new Promise((resolve) => {
|
|
11366
|
+
promises2.forEach(async (promise, index) => {
|
|
11367
|
+
try {
|
|
11368
|
+
const result2 = await Promise.resolve(promise);
|
|
11369
|
+
results[index] = { status: "fulfilled", value: result2 };
|
|
11370
|
+
count++;
|
|
11371
|
+
if (count === promises2.length) {
|
|
11372
|
+
resolve(results);
|
|
11373
|
+
}
|
|
11374
|
+
} catch (err) {
|
|
11375
|
+
results[index] = { status: "rejected", reason: err };
|
|
11376
|
+
count++;
|
|
11377
|
+
if (count === promises2.length) {
|
|
11378
|
+
resolve(results);
|
|
11379
|
+
}
|
|
11380
|
+
}
|
|
11381
|
+
});
|
|
11382
|
+
});
|
|
11383
|
+
}
|
|
11384
|
+
exports2.allSettled = allSettled;
|
|
11385
|
+
}
|
|
11386
|
+
});
|
|
11387
|
+
|
|
11388
|
+
// ../lib/common-utils/dist/regexp.js
|
|
11389
|
+
var require_regexp = __commonJS({
|
|
11390
|
+
"../lib/common-utils/dist/regexp.js"(exports2) {
|
|
11391
|
+
"use strict";
|
|
11392
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11393
|
+
exports2.escapeRegExp = void 0;
|
|
11394
|
+
function escapeRegExp(s) {
|
|
11395
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
11396
|
+
}
|
|
11397
|
+
exports2.escapeRegExp = escapeRegExp;
|
|
11398
|
+
}
|
|
11399
|
+
});
|
|
11400
|
+
|
|
11401
|
+
// ../lib/common-utils/dist/help/helpTopics.js
|
|
11402
|
+
var require_helpTopics = __commonJS({
|
|
11403
|
+
"../lib/common-utils/dist/help/helpTopics.js"(exports2) {
|
|
11404
|
+
"use strict";
|
|
11405
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11406
|
+
exports2.getHelpUrl = exports2.GUIDED_ANSWERS_LAUNCH_CMD_ID = exports2.GUIDED_ANSWERS_EXTENSION_ID = exports2.HELP_NODES = exports2.HELP_TREE = void 0;
|
|
11407
|
+
var HELP_TREE;
|
|
11408
|
+
(function(HELP_TREE2) {
|
|
11409
|
+
HELP_TREE2[HELP_TREE2["FIORI_TOOLS"] = 3046] = "FIORI_TOOLS";
|
|
11410
|
+
})(HELP_TREE = exports2.HELP_TREE || (exports2.HELP_TREE = {}));
|
|
11411
|
+
exports2.HELP_NODES = {
|
|
11412
|
+
FIORI_TOOLS: 45995,
|
|
11413
|
+
DEV_PLATFORM: 45996,
|
|
11414
|
+
FIORI_APP_GENERATOR: 48363,
|
|
11415
|
+
BAS_CATALOG_SERVICES_REQUEST_FAILED: 48366,
|
|
11416
|
+
APPLICATION_PREVIEW: 52881,
|
|
11417
|
+
CERTIFICATE_ERROR: 53643,
|
|
11418
|
+
DESTINATION_MISCONFIGURED: 54336,
|
|
11419
|
+
DESTINATION_UNAVAILABLE: 51208,
|
|
11420
|
+
DESTINATION_NOT_FOUND: 51208,
|
|
11421
|
+
BAD_GATEWAY: 48366,
|
|
11422
|
+
DESTINATION_BAD_GATEWAY_503: 52526,
|
|
11423
|
+
NO_V4_SERVICES: 57573
|
|
11424
|
+
};
|
|
11425
|
+
exports2.GUIDED_ANSWERS_EXTENSION_ID = "saposs.sap-guided-answers-extension";
|
|
11426
|
+
exports2.GUIDED_ANSWERS_LAUNCH_CMD_ID = "sap.ux.guidedAnswer.openGuidedAnswer";
|
|
11427
|
+
var GUIDED_ANSWERS_SUPPORT_BASE_URL = "https://ga.support.sap.com/dtp/viewer/index.html";
|
|
11428
|
+
function getHelpUrl(treeId, nodeIds) {
|
|
11429
|
+
let actions = "";
|
|
11430
|
+
if (nodeIds.length > 0) {
|
|
11431
|
+
actions = `/actions/${nodeIds.join(":")}`;
|
|
11432
|
+
}
|
|
11433
|
+
return `${GUIDED_ANSWERS_SUPPORT_BASE_URL}#/tree/${treeId}${actions}`;
|
|
11434
|
+
}
|
|
11435
|
+
exports2.getHelpUrl = getHelpUrl;
|
|
11436
|
+
}
|
|
11437
|
+
});
|
|
11438
|
+
|
|
11439
|
+
// ../lib/common-utils/dist/index.js
|
|
11440
|
+
var require_dist = __commonJS({
|
|
11441
|
+
"../lib/common-utils/dist/index.js"(exports2) {
|
|
11442
|
+
"use strict";
|
|
11443
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
11444
|
+
if (k2 === void 0)
|
|
11445
|
+
k2 = k;
|
|
11446
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11447
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11448
|
+
desc = { enumerable: true, get: function() {
|
|
11449
|
+
return m[k];
|
|
11450
|
+
} };
|
|
11451
|
+
}
|
|
11452
|
+
Object.defineProperty(o, k2, desc);
|
|
11453
|
+
} : function(o, m, k, k2) {
|
|
11454
|
+
if (k2 === void 0)
|
|
11455
|
+
k2 = k;
|
|
11456
|
+
o[k2] = m[k];
|
|
11457
|
+
});
|
|
11458
|
+
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
11459
|
+
for (var p in m)
|
|
11460
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p))
|
|
11461
|
+
__createBinding(exports3, m, p);
|
|
11462
|
+
};
|
|
11463
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
11464
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
11465
|
+
};
|
|
11466
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11467
|
+
exports2.filterReferenceUri = exports2.getFioriToolsDirectory = exports2.FioriToolsSettings = exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = void 0;
|
|
11468
|
+
var os_1 = require("os");
|
|
11469
|
+
var path_1 = __importDefault(require("path"));
|
|
11470
|
+
var appStudio_1 = require_appStudio();
|
|
11471
|
+
Object.defineProperty(exports2, "isAppStudio", { enumerable: true, get: function() {
|
|
11472
|
+
return appStudio_1.isAppStudio;
|
|
11473
|
+
} });
|
|
11474
|
+
Object.defineProperty(exports2, "getAppStudioBaseURL", { enumerable: true, get: function() {
|
|
11475
|
+
return appStudio_1.getAppStudioBaseURL;
|
|
11476
|
+
} });
|
|
11477
|
+
Object.defineProperty(exports2, "getAppStudioProxyURL", { enumerable: true, get: function() {
|
|
11478
|
+
return appStudio_1.getAppStudioProxyURL;
|
|
11479
|
+
} });
|
|
11480
|
+
__exportStar(require_file(), exports2);
|
|
11481
|
+
__exportStar(require_promise2(), exports2);
|
|
11482
|
+
__exportStar(require_regexp(), exports2);
|
|
11483
|
+
__exportStar(require_helpTopics(), exports2);
|
|
11484
|
+
var FioriToolsSettings;
|
|
11485
|
+
(function(FioriToolsSettings2) {
|
|
11486
|
+
FioriToolsSettings2["dir"] = ".fioritools";
|
|
11487
|
+
})(FioriToolsSettings = exports2.FioriToolsSettings || (exports2.FioriToolsSettings = {}));
|
|
11488
|
+
var getFioriToolsDirectory = () => {
|
|
11489
|
+
return path_1.default.join((0, os_1.homedir)(), FioriToolsSettings.dir);
|
|
11490
|
+
};
|
|
11491
|
+
exports2.getFioriToolsDirectory = getFioriToolsDirectory;
|
|
11492
|
+
function filterReferenceUri(metadata) {
|
|
11493
|
+
return metadata == null ? void 0 : metadata.replace(/ Uri="(http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[0])/g, ` Uri=".`);
|
|
11494
|
+
}
|
|
11495
|
+
exports2.filterReferenceUri = filterReferenceUri;
|
|
11496
|
+
}
|
|
11497
|
+
});
|
|
11498
|
+
|
|
11818
11499
|
// ../../node_modules/axios/lib/helpers/bind.js
|
|
11819
11500
|
var require_bind = __commonJS({
|
|
11820
11501
|
"../../node_modules/axios/lib/helpers/bind.js"(exports2, module2) {
|
|
@@ -12088,8 +11769,8 @@ var require_normalizeHeaderName = __commonJS({
|
|
|
12088
11769
|
var require_enhanceError = __commonJS({
|
|
12089
11770
|
"../../node_modules/axios/lib/core/enhanceError.js"(exports2, module2) {
|
|
12090
11771
|
"use strict";
|
|
12091
|
-
module2.exports = function enhanceError(error3,
|
|
12092
|
-
error3.config =
|
|
11772
|
+
module2.exports = function enhanceError(error3, config, code, request, response) {
|
|
11773
|
+
error3.config = config;
|
|
12093
11774
|
if (code) {
|
|
12094
11775
|
error3.code = code;
|
|
12095
11776
|
}
|
|
@@ -12121,9 +11802,9 @@ var require_createError = __commonJS({
|
|
|
12121
11802
|
"../../node_modules/axios/lib/core/createError.js"(exports2, module2) {
|
|
12122
11803
|
"use strict";
|
|
12123
11804
|
var enhanceError = require_enhanceError();
|
|
12124
|
-
module2.exports = function createError(message,
|
|
11805
|
+
module2.exports = function createError(message, config, code, request, response) {
|
|
12125
11806
|
var error3 = new Error(message);
|
|
12126
|
-
return enhanceError(error3,
|
|
11807
|
+
return enhanceError(error3, config, code, request, response);
|
|
12127
11808
|
};
|
|
12128
11809
|
}
|
|
12129
11810
|
});
|
|
@@ -12346,32 +12027,32 @@ var require_xhr = __commonJS({
|
|
|
12346
12027
|
var createError = require_createError();
|
|
12347
12028
|
var defaults = require_defaults();
|
|
12348
12029
|
var Cancel = require_Cancel();
|
|
12349
|
-
module2.exports = function xhrAdapter(
|
|
12030
|
+
module2.exports = function xhrAdapter(config) {
|
|
12350
12031
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
12351
|
-
var requestData =
|
|
12352
|
-
var requestHeaders =
|
|
12353
|
-
var responseType =
|
|
12032
|
+
var requestData = config.data;
|
|
12033
|
+
var requestHeaders = config.headers;
|
|
12034
|
+
var responseType = config.responseType;
|
|
12354
12035
|
var onCanceled;
|
|
12355
12036
|
function done() {
|
|
12356
|
-
if (
|
|
12357
|
-
|
|
12037
|
+
if (config.cancelToken) {
|
|
12038
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
12358
12039
|
}
|
|
12359
|
-
if (
|
|
12360
|
-
|
|
12040
|
+
if (config.signal) {
|
|
12041
|
+
config.signal.removeEventListener("abort", onCanceled);
|
|
12361
12042
|
}
|
|
12362
12043
|
}
|
|
12363
12044
|
if (utils.isFormData(requestData)) {
|
|
12364
12045
|
delete requestHeaders["Content-Type"];
|
|
12365
12046
|
}
|
|
12366
12047
|
var request = new XMLHttpRequest();
|
|
12367
|
-
if (
|
|
12368
|
-
var username =
|
|
12369
|
-
var password =
|
|
12048
|
+
if (config.auth) {
|
|
12049
|
+
var username = config.auth.username || "";
|
|
12050
|
+
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
12370
12051
|
requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
|
|
12371
12052
|
}
|
|
12372
|
-
var fullPath = buildFullPath(
|
|
12373
|
-
request.open(
|
|
12374
|
-
request.timeout =
|
|
12053
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
12054
|
+
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
12055
|
+
request.timeout = config.timeout;
|
|
12375
12056
|
function onloadend() {
|
|
12376
12057
|
if (!request) {
|
|
12377
12058
|
return;
|
|
@@ -12383,7 +12064,7 @@ var require_xhr = __commonJS({
|
|
|
12383
12064
|
status: request.status,
|
|
12384
12065
|
statusText: request.statusText,
|
|
12385
12066
|
headers: responseHeaders,
|
|
12386
|
-
config
|
|
12067
|
+
config,
|
|
12387
12068
|
request
|
|
12388
12069
|
};
|
|
12389
12070
|
settle(function _resolve(value) {
|
|
@@ -12412,26 +12093,26 @@ var require_xhr = __commonJS({
|
|
|
12412
12093
|
if (!request) {
|
|
12413
12094
|
return;
|
|
12414
12095
|
}
|
|
12415
|
-
reject(createError("Request aborted",
|
|
12096
|
+
reject(createError("Request aborted", config, "ECONNABORTED", request));
|
|
12416
12097
|
request = null;
|
|
12417
12098
|
};
|
|
12418
12099
|
request.onerror = function handleError() {
|
|
12419
|
-
reject(createError("Network Error",
|
|
12100
|
+
reject(createError("Network Error", config, null, request));
|
|
12420
12101
|
request = null;
|
|
12421
12102
|
};
|
|
12422
12103
|
request.ontimeout = function handleTimeout() {
|
|
12423
|
-
var timeoutErrorMessage =
|
|
12424
|
-
var transitional =
|
|
12425
|
-
if (
|
|
12426
|
-
timeoutErrorMessage =
|
|
12104
|
+
var timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
12105
|
+
var transitional = config.transitional || defaults.transitional;
|
|
12106
|
+
if (config.timeoutErrorMessage) {
|
|
12107
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
12427
12108
|
}
|
|
12428
|
-
reject(createError(timeoutErrorMessage,
|
|
12109
|
+
reject(createError(timeoutErrorMessage, config, transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request));
|
|
12429
12110
|
request = null;
|
|
12430
12111
|
};
|
|
12431
12112
|
if (utils.isStandardBrowserEnv()) {
|
|
12432
|
-
var xsrfValue = (
|
|
12113
|
+
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0;
|
|
12433
12114
|
if (xsrfValue) {
|
|
12434
|
-
requestHeaders[
|
|
12115
|
+
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
|
12435
12116
|
}
|
|
12436
12117
|
}
|
|
12437
12118
|
if ("setRequestHeader" in request) {
|
|
@@ -12443,19 +12124,19 @@ var require_xhr = __commonJS({
|
|
|
12443
12124
|
}
|
|
12444
12125
|
});
|
|
12445
12126
|
}
|
|
12446
|
-
if (!utils.isUndefined(
|
|
12447
|
-
request.withCredentials = !!
|
|
12127
|
+
if (!utils.isUndefined(config.withCredentials)) {
|
|
12128
|
+
request.withCredentials = !!config.withCredentials;
|
|
12448
12129
|
}
|
|
12449
12130
|
if (responseType && responseType !== "json") {
|
|
12450
|
-
request.responseType =
|
|
12131
|
+
request.responseType = config.responseType;
|
|
12451
12132
|
}
|
|
12452
|
-
if (typeof
|
|
12453
|
-
request.addEventListener("progress",
|
|
12133
|
+
if (typeof config.onDownloadProgress === "function") {
|
|
12134
|
+
request.addEventListener("progress", config.onDownloadProgress);
|
|
12454
12135
|
}
|
|
12455
|
-
if (typeof
|
|
12456
|
-
request.upload.addEventListener("progress",
|
|
12136
|
+
if (typeof config.onUploadProgress === "function" && request.upload) {
|
|
12137
|
+
request.upload.addEventListener("progress", config.onUploadProgress);
|
|
12457
12138
|
}
|
|
12458
|
-
if (
|
|
12139
|
+
if (config.cancelToken || config.signal) {
|
|
12459
12140
|
onCanceled = function(cancel) {
|
|
12460
12141
|
if (!request) {
|
|
12461
12142
|
return;
|
|
@@ -12464,9 +12145,9 @@ var require_xhr = __commonJS({
|
|
|
12464
12145
|
request.abort();
|
|
12465
12146
|
request = null;
|
|
12466
12147
|
};
|
|
12467
|
-
|
|
12468
|
-
if (
|
|
12469
|
-
|
|
12148
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
12149
|
+
if (config.signal) {
|
|
12150
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
|
|
12470
12151
|
}
|
|
12471
12152
|
}
|
|
12472
12153
|
if (!requestData) {
|
|
@@ -13651,15 +13332,15 @@ var require_http = __commonJS({
|
|
|
13651
13332
|
setProxy(redirection, proxy, redirection.href);
|
|
13652
13333
|
};
|
|
13653
13334
|
}
|
|
13654
|
-
module2.exports = function httpAdapter(
|
|
13335
|
+
module2.exports = function httpAdapter(config) {
|
|
13655
13336
|
return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
|
13656
13337
|
var onCanceled;
|
|
13657
13338
|
function done() {
|
|
13658
|
-
if (
|
|
13659
|
-
|
|
13339
|
+
if (config.cancelToken) {
|
|
13340
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
13660
13341
|
}
|
|
13661
|
-
if (
|
|
13662
|
-
|
|
13342
|
+
if (config.signal) {
|
|
13343
|
+
config.signal.removeEventListener("abort", onCanceled);
|
|
13663
13344
|
}
|
|
13664
13345
|
}
|
|
13665
13346
|
var resolve = function resolve2(value) {
|
|
@@ -13672,8 +13353,8 @@ var require_http = __commonJS({
|
|
|
13672
13353
|
rejected = true;
|
|
13673
13354
|
rejectPromise(value);
|
|
13674
13355
|
};
|
|
13675
|
-
var data2 =
|
|
13676
|
-
var headers =
|
|
13356
|
+
var data2 = config.data;
|
|
13357
|
+
var headers = config.headers;
|
|
13677
13358
|
var headerNames = {};
|
|
13678
13359
|
Object.keys(headers).forEach(function storeLowerName(name) {
|
|
13679
13360
|
headerNames[name.toLowerCase()] = name;
|
|
@@ -13692,22 +13373,22 @@ var require_http = __commonJS({
|
|
|
13692
13373
|
} else if (utils.isString(data2)) {
|
|
13693
13374
|
data2 = Buffer.from(data2, "utf-8");
|
|
13694
13375
|
} else {
|
|
13695
|
-
return reject(createError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
13376
|
+
return reject(createError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", config));
|
|
13696
13377
|
}
|
|
13697
|
-
if (
|
|
13698
|
-
return reject(createError("Request body larger than maxBodyLength limit",
|
|
13378
|
+
if (config.maxBodyLength > -1 && data2.length > config.maxBodyLength) {
|
|
13379
|
+
return reject(createError("Request body larger than maxBodyLength limit", config));
|
|
13699
13380
|
}
|
|
13700
13381
|
if (!headerNames["content-length"]) {
|
|
13701
13382
|
headers["Content-Length"] = data2.length;
|
|
13702
13383
|
}
|
|
13703
13384
|
}
|
|
13704
13385
|
var auth = void 0;
|
|
13705
|
-
if (
|
|
13706
|
-
var username =
|
|
13707
|
-
var password =
|
|
13386
|
+
if (config.auth) {
|
|
13387
|
+
var username = config.auth.username || "";
|
|
13388
|
+
var password = config.auth.password || "";
|
|
13708
13389
|
auth = username + ":" + password;
|
|
13709
13390
|
}
|
|
13710
|
-
var fullPath = buildFullPath(
|
|
13391
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
13711
13392
|
var parsed = url.parse(fullPath);
|
|
13712
13393
|
var protocol = parsed.protocol || "http:";
|
|
13713
13394
|
if (!auth && parsed.auth) {
|
|
@@ -13720,31 +13401,31 @@ var require_http = __commonJS({
|
|
|
13720
13401
|
delete headers[headerNames.authorization];
|
|
13721
13402
|
}
|
|
13722
13403
|
var isHttpsRequest = isHttps.test(protocol);
|
|
13723
|
-
var agent = isHttpsRequest ?
|
|
13404
|
+
var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
13724
13405
|
try {
|
|
13725
|
-
buildURL(parsed.path,
|
|
13406
|
+
buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
13726
13407
|
} catch (err) {
|
|
13727
13408
|
var customErr = new Error(err.message);
|
|
13728
|
-
customErr.config =
|
|
13729
|
-
customErr.url =
|
|
13409
|
+
customErr.config = config;
|
|
13410
|
+
customErr.url = config.url;
|
|
13730
13411
|
customErr.exists = true;
|
|
13731
13412
|
reject(customErr);
|
|
13732
13413
|
}
|
|
13733
13414
|
var options2 = {
|
|
13734
|
-
path: buildURL(parsed.path,
|
|
13735
|
-
method:
|
|
13415
|
+
path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ""),
|
|
13416
|
+
method: config.method.toUpperCase(),
|
|
13736
13417
|
headers,
|
|
13737
13418
|
agent,
|
|
13738
|
-
agents: { http:
|
|
13419
|
+
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
13739
13420
|
auth
|
|
13740
13421
|
};
|
|
13741
|
-
if (
|
|
13742
|
-
options2.socketPath =
|
|
13422
|
+
if (config.socketPath) {
|
|
13423
|
+
options2.socketPath = config.socketPath;
|
|
13743
13424
|
} else {
|
|
13744
13425
|
options2.hostname = parsed.hostname;
|
|
13745
13426
|
options2.port = parsed.port;
|
|
13746
13427
|
}
|
|
13747
|
-
var proxy =
|
|
13428
|
+
var proxy = config.proxy;
|
|
13748
13429
|
if (!proxy && proxy !== false) {
|
|
13749
13430
|
var proxyEnv = protocol.slice(0, -1) + "_proxy";
|
|
13750
13431
|
var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
|
|
@@ -13791,28 +13472,28 @@ var require_http = __commonJS({
|
|
|
13791
13472
|
}
|
|
13792
13473
|
var transport;
|
|
13793
13474
|
var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
|
|
13794
|
-
if (
|
|
13795
|
-
transport =
|
|
13796
|
-
} else if (
|
|
13475
|
+
if (config.transport) {
|
|
13476
|
+
transport = config.transport;
|
|
13477
|
+
} else if (config.maxRedirects === 0) {
|
|
13797
13478
|
transport = isHttpsProxy ? https : http;
|
|
13798
13479
|
} else {
|
|
13799
|
-
if (
|
|
13800
|
-
options2.maxRedirects =
|
|
13480
|
+
if (config.maxRedirects) {
|
|
13481
|
+
options2.maxRedirects = config.maxRedirects;
|
|
13801
13482
|
}
|
|
13802
13483
|
transport = isHttpsProxy ? httpsFollow : httpFollow;
|
|
13803
13484
|
}
|
|
13804
|
-
if (
|
|
13805
|
-
options2.maxBodyLength =
|
|
13485
|
+
if (config.maxBodyLength > -1) {
|
|
13486
|
+
options2.maxBodyLength = config.maxBodyLength;
|
|
13806
13487
|
}
|
|
13807
|
-
if (
|
|
13808
|
-
options2.insecureHTTPParser =
|
|
13488
|
+
if (config.insecureHTTPParser) {
|
|
13489
|
+
options2.insecureHTTPParser = config.insecureHTTPParser;
|
|
13809
13490
|
}
|
|
13810
13491
|
var req = transport.request(options2, function handleResponse(res) {
|
|
13811
13492
|
if (req.aborted)
|
|
13812
13493
|
return;
|
|
13813
13494
|
var stream = res;
|
|
13814
13495
|
var lastRequest = res.req || req;
|
|
13815
|
-
if (res.statusCode !== 204 && lastRequest.method !== "HEAD" &&
|
|
13496
|
+
if (res.statusCode !== 204 && lastRequest.method !== "HEAD" && config.decompress !== false) {
|
|
13816
13497
|
switch (res.headers["content-encoding"]) {
|
|
13817
13498
|
case "gzip":
|
|
13818
13499
|
case "compress":
|
|
@@ -13826,10 +13507,10 @@ var require_http = __commonJS({
|
|
|
13826
13507
|
status: res.statusCode,
|
|
13827
13508
|
statusText: res.statusMessage,
|
|
13828
13509
|
headers: res.headers,
|
|
13829
|
-
config
|
|
13510
|
+
config,
|
|
13830
13511
|
request: lastRequest
|
|
13831
13512
|
};
|
|
13832
|
-
if (
|
|
13513
|
+
if (config.responseType === "stream") {
|
|
13833
13514
|
response.data = stream;
|
|
13834
13515
|
settle(resolve, reject, response);
|
|
13835
13516
|
} else {
|
|
@@ -13838,10 +13519,10 @@ var require_http = __commonJS({
|
|
|
13838
13519
|
stream.on("data", function handleStreamData(chunk) {
|
|
13839
13520
|
responseBuffer.push(chunk);
|
|
13840
13521
|
totalResponseBytes += chunk.length;
|
|
13841
|
-
if (
|
|
13522
|
+
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
13842
13523
|
rejected = true;
|
|
13843
13524
|
stream.destroy();
|
|
13844
|
-
reject(createError("maxContentLength size of " +
|
|
13525
|
+
reject(createError("maxContentLength size of " + config.maxContentLength + " exceeded", config, null, lastRequest));
|
|
13845
13526
|
}
|
|
13846
13527
|
});
|
|
13847
13528
|
stream.on("aborted", function handlerStreamAborted() {
|
|
@@ -13849,25 +13530,25 @@ var require_http = __commonJS({
|
|
|
13849
13530
|
return;
|
|
13850
13531
|
}
|
|
13851
13532
|
stream.destroy();
|
|
13852
|
-
reject(createError("error request aborted",
|
|
13533
|
+
reject(createError("error request aborted", config, "ERR_REQUEST_ABORTED", lastRequest));
|
|
13853
13534
|
});
|
|
13854
13535
|
stream.on("error", function handleStreamError(err) {
|
|
13855
13536
|
if (req.aborted)
|
|
13856
13537
|
return;
|
|
13857
|
-
reject(enhanceError(err,
|
|
13538
|
+
reject(enhanceError(err, config, null, lastRequest));
|
|
13858
13539
|
});
|
|
13859
13540
|
stream.on("end", function handleStreamEnd() {
|
|
13860
13541
|
try {
|
|
13861
13542
|
var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
|
|
13862
|
-
if (
|
|
13863
|
-
responseData = responseData.toString(
|
|
13864
|
-
if (!
|
|
13543
|
+
if (config.responseType !== "arraybuffer") {
|
|
13544
|
+
responseData = responseData.toString(config.responseEncoding);
|
|
13545
|
+
if (!config.responseEncoding || config.responseEncoding === "utf8") {
|
|
13865
13546
|
responseData = utils.stripBOM(responseData);
|
|
13866
13547
|
}
|
|
13867
13548
|
}
|
|
13868
13549
|
response.data = responseData;
|
|
13869
13550
|
} catch (err) {
|
|
13870
|
-
reject(enhanceError(err,
|
|
13551
|
+
reject(enhanceError(err, config, err.code, response.request, response));
|
|
13871
13552
|
}
|
|
13872
13553
|
settle(resolve, reject, response);
|
|
13873
13554
|
});
|
|
@@ -13876,44 +13557,44 @@ var require_http = __commonJS({
|
|
|
13876
13557
|
req.on("error", function handleRequestError(err) {
|
|
13877
13558
|
if (req.aborted && err.code !== "ERR_FR_TOO_MANY_REDIRECTS")
|
|
13878
13559
|
return;
|
|
13879
|
-
reject(enhanceError(err,
|
|
13560
|
+
reject(enhanceError(err, config, null, req));
|
|
13880
13561
|
});
|
|
13881
13562
|
req.on("socket", function handleRequestSocket(socket) {
|
|
13882
13563
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
13883
13564
|
});
|
|
13884
|
-
if (
|
|
13885
|
-
var timeout = parseInt(
|
|
13565
|
+
if (config.timeout) {
|
|
13566
|
+
var timeout = parseInt(config.timeout, 10);
|
|
13886
13567
|
if (isNaN(timeout)) {
|
|
13887
|
-
reject(createError("error trying to parse `config.timeout` to int",
|
|
13568
|
+
reject(createError("error trying to parse `config.timeout` to int", config, "ERR_PARSE_TIMEOUT", req));
|
|
13888
13569
|
return;
|
|
13889
13570
|
}
|
|
13890
13571
|
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
13891
13572
|
req.abort();
|
|
13892
13573
|
var timeoutErrorMessage = "";
|
|
13893
|
-
if (
|
|
13894
|
-
timeoutErrorMessage =
|
|
13574
|
+
if (config.timeoutErrorMessage) {
|
|
13575
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
13895
13576
|
} else {
|
|
13896
|
-
timeoutErrorMessage = "timeout of " +
|
|
13577
|
+
timeoutErrorMessage = "timeout of " + config.timeout + "ms exceeded";
|
|
13897
13578
|
}
|
|
13898
|
-
var transitional =
|
|
13899
|
-
reject(createError(timeoutErrorMessage,
|
|
13579
|
+
var transitional = config.transitional || defaults.transitional;
|
|
13580
|
+
reject(createError(timeoutErrorMessage, config, transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", req));
|
|
13900
13581
|
});
|
|
13901
13582
|
}
|
|
13902
|
-
if (
|
|
13583
|
+
if (config.cancelToken || config.signal) {
|
|
13903
13584
|
onCanceled = function(cancel) {
|
|
13904
13585
|
if (req.aborted)
|
|
13905
13586
|
return;
|
|
13906
13587
|
req.abort();
|
|
13907
13588
|
reject(!cancel || cancel && cancel.type ? new Cancel("canceled") : cancel);
|
|
13908
13589
|
};
|
|
13909
|
-
|
|
13910
|
-
if (
|
|
13911
|
-
|
|
13590
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
13591
|
+
if (config.signal) {
|
|
13592
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
|
|
13912
13593
|
}
|
|
13913
13594
|
}
|
|
13914
13595
|
if (utils.isStream(data2)) {
|
|
13915
13596
|
data2.on("error", function handleStreamError(err) {
|
|
13916
|
-
reject(enhanceError(err,
|
|
13597
|
+
reject(enhanceError(err, config, null, req));
|
|
13917
13598
|
}).pipe(req);
|
|
13918
13599
|
} else {
|
|
13919
13600
|
req.end(data2);
|
|
@@ -14064,32 +13745,32 @@ var require_dispatchRequest = __commonJS({
|
|
|
14064
13745
|
var isCancel = require_isCancel();
|
|
14065
13746
|
var defaults = require_defaults();
|
|
14066
13747
|
var Cancel = require_Cancel();
|
|
14067
|
-
function throwIfCancellationRequested(
|
|
14068
|
-
if (
|
|
14069
|
-
|
|
13748
|
+
function throwIfCancellationRequested(config) {
|
|
13749
|
+
if (config.cancelToken) {
|
|
13750
|
+
config.cancelToken.throwIfRequested();
|
|
14070
13751
|
}
|
|
14071
|
-
if (
|
|
13752
|
+
if (config.signal && config.signal.aborted) {
|
|
14072
13753
|
throw new Cancel("canceled");
|
|
14073
13754
|
}
|
|
14074
13755
|
}
|
|
14075
|
-
module2.exports = function dispatchRequest(
|
|
14076
|
-
throwIfCancellationRequested(
|
|
14077
|
-
|
|
14078
|
-
|
|
14079
|
-
|
|
13756
|
+
module2.exports = function dispatchRequest(config) {
|
|
13757
|
+
throwIfCancellationRequested(config);
|
|
13758
|
+
config.headers = config.headers || {};
|
|
13759
|
+
config.data = transformData.call(config, config.data, config.headers, config.transformRequest);
|
|
13760
|
+
config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
|
|
14080
13761
|
utils.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
|
|
14081
|
-
delete
|
|
13762
|
+
delete config.headers[method];
|
|
14082
13763
|
});
|
|
14083
|
-
var adapter =
|
|
14084
|
-
return adapter(
|
|
14085
|
-
throwIfCancellationRequested(
|
|
14086
|
-
response.data = transformData.call(
|
|
13764
|
+
var adapter = config.adapter || defaults.adapter;
|
|
13765
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
|
13766
|
+
throwIfCancellationRequested(config);
|
|
13767
|
+
response.data = transformData.call(config, response.data, response.headers, config.transformResponse);
|
|
14087
13768
|
return response;
|
|
14088
13769
|
}, function onAdapterRejection(reason) {
|
|
14089
13770
|
if (!isCancel(reason)) {
|
|
14090
|
-
throwIfCancellationRequested(
|
|
13771
|
+
throwIfCancellationRequested(config);
|
|
14091
13772
|
if (reason && reason.response) {
|
|
14092
|
-
reason.response.data = transformData.call(
|
|
13773
|
+
reason.response.data = transformData.call(config, reason.response.data, reason.response.headers, config.transformResponse);
|
|
14093
13774
|
}
|
|
14094
13775
|
}
|
|
14095
13776
|
return Promise.reject(reason);
|
|
@@ -14105,7 +13786,7 @@ var require_mergeConfig = __commonJS({
|
|
|
14105
13786
|
var utils = require_utils();
|
|
14106
13787
|
module2.exports = function mergeConfig(config1, config2) {
|
|
14107
13788
|
config2 = config2 || {};
|
|
14108
|
-
var
|
|
13789
|
+
var config = {};
|
|
14109
13790
|
function getMergedValue(target, source) {
|
|
14110
13791
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
14111
13792
|
return utils.merge(target, source);
|
|
@@ -14173,9 +13854,9 @@ var require_mergeConfig = __commonJS({
|
|
|
14173
13854
|
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
14174
13855
|
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
14175
13856
|
var configValue = merge(prop);
|
|
14176
|
-
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (
|
|
13857
|
+
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
14177
13858
|
});
|
|
14178
|
-
return
|
|
13859
|
+
return config;
|
|
14179
13860
|
};
|
|
14180
13861
|
}
|
|
14181
13862
|
});
|
|
@@ -14254,22 +13935,22 @@ var require_Axios = __commonJS({
|
|
|
14254
13935
|
response: new InterceptorManager()
|
|
14255
13936
|
};
|
|
14256
13937
|
}
|
|
14257
|
-
Axios.prototype.request = function request(configOrUrl,
|
|
13938
|
+
Axios.prototype.request = function request(configOrUrl, config) {
|
|
14258
13939
|
if (typeof configOrUrl === "string") {
|
|
14259
|
-
|
|
14260
|
-
|
|
13940
|
+
config = config || {};
|
|
13941
|
+
config.url = configOrUrl;
|
|
14261
13942
|
} else {
|
|
14262
|
-
|
|
13943
|
+
config = configOrUrl || {};
|
|
14263
13944
|
}
|
|
14264
|
-
|
|
14265
|
-
if (
|
|
14266
|
-
|
|
13945
|
+
config = mergeConfig(this.defaults, config);
|
|
13946
|
+
if (config.method) {
|
|
13947
|
+
config.method = config.method.toLowerCase();
|
|
14267
13948
|
} else if (this.defaults.method) {
|
|
14268
|
-
|
|
13949
|
+
config.method = this.defaults.method.toLowerCase();
|
|
14269
13950
|
} else {
|
|
14270
|
-
|
|
13951
|
+
config.method = "get";
|
|
14271
13952
|
}
|
|
14272
|
-
var transitional =
|
|
13953
|
+
var transitional = config.transitional;
|
|
14273
13954
|
if (transitional !== void 0) {
|
|
14274
13955
|
validator.assertOptions(transitional, {
|
|
14275
13956
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
@@ -14280,7 +13961,7 @@ var require_Axios = __commonJS({
|
|
|
14280
13961
|
var requestInterceptorChain = [];
|
|
14281
13962
|
var synchronousRequestInterceptors = true;
|
|
14282
13963
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
14283
|
-
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(
|
|
13964
|
+
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
|
|
14284
13965
|
return;
|
|
14285
13966
|
}
|
|
14286
13967
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
@@ -14295,13 +13976,13 @@ var require_Axios = __commonJS({
|
|
|
14295
13976
|
var chain = [dispatchRequest, void 0];
|
|
14296
13977
|
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
|
14297
13978
|
chain = chain.concat(responseInterceptorChain);
|
|
14298
|
-
promise = Promise.resolve(
|
|
13979
|
+
promise = Promise.resolve(config);
|
|
14299
13980
|
while (chain.length) {
|
|
14300
13981
|
promise = promise.then(chain.shift(), chain.shift());
|
|
14301
13982
|
}
|
|
14302
13983
|
return promise;
|
|
14303
13984
|
}
|
|
14304
|
-
var newConfig =
|
|
13985
|
+
var newConfig = config;
|
|
14305
13986
|
while (requestInterceptorChain.length) {
|
|
14306
13987
|
var onFulfilled = requestInterceptorChain.shift();
|
|
14307
13988
|
var onRejected = requestInterceptorChain.shift();
|
|
@@ -14322,22 +14003,22 @@ var require_Axios = __commonJS({
|
|
|
14322
14003
|
}
|
|
14323
14004
|
return promise;
|
|
14324
14005
|
};
|
|
14325
|
-
Axios.prototype.getUri = function getUri(
|
|
14326
|
-
|
|
14327
|
-
return buildURL(
|
|
14006
|
+
Axios.prototype.getUri = function getUri(config) {
|
|
14007
|
+
config = mergeConfig(this.defaults, config);
|
|
14008
|
+
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
14328
14009
|
};
|
|
14329
14010
|
utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
14330
|
-
Axios.prototype[method] = function(url,
|
|
14331
|
-
return this.request(mergeConfig(
|
|
14011
|
+
Axios.prototype[method] = function(url, config) {
|
|
14012
|
+
return this.request(mergeConfig(config || {}, {
|
|
14332
14013
|
method,
|
|
14333
14014
|
url,
|
|
14334
|
-
data: (
|
|
14015
|
+
data: (config || {}).data
|
|
14335
14016
|
}));
|
|
14336
14017
|
};
|
|
14337
14018
|
});
|
|
14338
14019
|
utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
14339
|
-
Axios.prototype[method] = function(url, data2,
|
|
14340
|
-
return this.request(mergeConfig(
|
|
14020
|
+
Axios.prototype[method] = function(url, data2, config) {
|
|
14021
|
+
return this.request(mergeConfig(config || {}, {
|
|
14341
14022
|
method,
|
|
14342
14023
|
url,
|
|
14343
14024
|
data: data2
|
|
@@ -23158,6 +22839,8 @@ var require_application = __commonJS({
|
|
|
23158
22839
|
AppType2["FioriElement"] = "SAP Fiori elements";
|
|
23159
22840
|
AppType2["UI5Freestyle"] = "SAPUI5 freestyle";
|
|
23160
22841
|
AppType2["UI5Extension"] = "SAPUI5 Extension";
|
|
22842
|
+
AppType2["Reuse"] = "Fiori Reuse";
|
|
22843
|
+
AppType2["Adaptation"] = "Fiori Adaptation";
|
|
23161
22844
|
})(AppType = exports2.AppType || (exports2.AppType = {}));
|
|
23162
22845
|
exports2.AppPomXmlArtifactIdPlaceholder = `\${project.artifactId}`;
|
|
23163
22846
|
}
|
|
@@ -44377,13 +44060,13 @@ var require_esprima = __commonJS({
|
|
|
44377
44060
|
return Reader2;
|
|
44378
44061
|
}();
|
|
44379
44062
|
var Tokenizer = function() {
|
|
44380
|
-
function Tokenizer2(code,
|
|
44063
|
+
function Tokenizer2(code, config) {
|
|
44381
44064
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
44382
|
-
this.errorHandler.tolerant =
|
|
44065
|
+
this.errorHandler.tolerant = config ? typeof config.tolerant === "boolean" && config.tolerant : false;
|
|
44383
44066
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
44384
|
-
this.scanner.trackComment =
|
|
44385
|
-
this.trackRange =
|
|
44386
|
-
this.trackLoc =
|
|
44067
|
+
this.scanner.trackComment = config ? typeof config.comment === "boolean" && config.comment : false;
|
|
44068
|
+
this.trackRange = config ? typeof config.range === "boolean" && config.range : false;
|
|
44069
|
+
this.trackLoc = config ? typeof config.loc === "boolean" && config.loc : false;
|
|
44387
44070
|
this.buffer = [];
|
|
44388
44071
|
this.reader = new Reader();
|
|
44389
44072
|
}
|
|
@@ -52357,10 +52040,10 @@ var require_cfServicesUtil = __commonJS({
|
|
|
52357
52040
|
return (0, cf_local_1.cfGetInstanceKeyParameters)(instanceName);
|
|
52358
52041
|
}
|
|
52359
52042
|
exports2.getInstanceCredentials = getInstanceCredentials;
|
|
52360
|
-
function createServiceInstance(serviceType, servicePlan, serviceInstanceName,
|
|
52043
|
+
function createServiceInstance(serviceType, servicePlan, serviceInstanceName, config) {
|
|
52361
52044
|
let args = ["create-service", serviceType, servicePlan, serviceInstanceName];
|
|
52362
|
-
if (
|
|
52363
|
-
args = args.concat(["-c",
|
|
52045
|
+
if (config) {
|
|
52046
|
+
args = args.concat(["-c", config]);
|
|
52364
52047
|
}
|
|
52365
52048
|
return cli_1.Cli.execute(args);
|
|
52366
52049
|
}
|
|
@@ -52446,9 +52129,9 @@ var require_src6 = __commonJS({
|
|
|
52446
52129
|
});
|
|
52447
52130
|
}
|
|
52448
52131
|
exports2.apiGetInstanceCredentials = apiGetInstanceCredentials;
|
|
52449
|
-
function apiCreateServiceInstance(serviceType, servicePlan, instanceName,
|
|
52132
|
+
function apiCreateServiceInstance(serviceType, servicePlan, instanceName, config) {
|
|
52450
52133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52451
|
-
return serviceUtils.createServiceInstance(serviceType, servicePlan, instanceName,
|
|
52134
|
+
return serviceUtils.createServiceInstance(serviceType, servicePlan, instanceName, config);
|
|
52452
52135
|
});
|
|
52453
52136
|
}
|
|
52454
52137
|
exports2.apiCreateServiceInstance = apiCreateServiceInstance;
|
|
@@ -52594,7 +52277,7 @@ var require_connection = __commonJS({
|
|
|
52594
52277
|
var _a2;
|
|
52595
52278
|
const url = new url_1.URL(target.service, target.url).toString();
|
|
52596
52279
|
const hasCredentials = !!((_a2 = credentials == null ? void 0 : credentials.username) == null ? void 0 : _a2.length);
|
|
52597
|
-
const
|
|
52280
|
+
const config = {
|
|
52598
52281
|
params: {},
|
|
52599
52282
|
headers: {
|
|
52600
52283
|
[common_1.CSRF.requestHeaderName]: common_1.CSRF.requestHeaderValue
|
|
@@ -52605,7 +52288,7 @@ var require_connection = __commonJS({
|
|
|
52605
52288
|
})
|
|
52606
52289
|
};
|
|
52607
52290
|
if (hasCredentials) {
|
|
52608
|
-
|
|
52291
|
+
config.auth = credentials;
|
|
52609
52292
|
}
|
|
52610
52293
|
if (typeof timeout === "number" && timeout > 0) {
|
|
52611
52294
|
const CancelToken = axios_1.default.CancelToken;
|
|
@@ -52613,34 +52296,34 @@ var require_connection = __commonJS({
|
|
|
52613
52296
|
setTimeout(() => {
|
|
52614
52297
|
source.cancel("CONNECT_TIMEOUT");
|
|
52615
52298
|
}, timeout);
|
|
52616
|
-
|
|
52299
|
+
config.cancelToken = source.token;
|
|
52617
52300
|
}
|
|
52618
52301
|
if (target.params) {
|
|
52619
|
-
Object.assign(
|
|
52302
|
+
Object.assign(config.params, target.params);
|
|
52620
52303
|
}
|
|
52621
52304
|
if (target.client) {
|
|
52622
|
-
|
|
52305
|
+
config.params[exports2.SAP_CLIENT] = target.client;
|
|
52623
52306
|
}
|
|
52624
52307
|
const isTargetDestOnAppStudio = (0, ux_common_utils_1.isAppStudio)() && target.destination;
|
|
52625
52308
|
if (isTargetDestOnAppStudio || disableSAML) {
|
|
52626
|
-
|
|
52309
|
+
config.params.saml2 = "disabled";
|
|
52627
52310
|
}
|
|
52628
52311
|
const urlPath = !(url == null ? void 0 : url.endsWith("/")) && autoAddTrailingSlash ? `${url}/` : url;
|
|
52629
|
-
if ((
|
|
52630
|
-
|
|
52312
|
+
if ((config == null ? void 0 : config.auth) && Object.keys(config.auth).length > 0) {
|
|
52313
|
+
config.withCredentials = true;
|
|
52631
52314
|
} else {
|
|
52632
|
-
delete
|
|
52633
|
-
|
|
52315
|
+
delete config.auth;
|
|
52316
|
+
config.withCredentials = false;
|
|
52634
52317
|
}
|
|
52635
|
-
let response = await axios_1.default.get(urlPath,
|
|
52318
|
+
let response = await axios_1.default.get(urlPath, config);
|
|
52636
52319
|
if (!isTargetDestOnAppStudio && isSamlLogonNeeded(response)) {
|
|
52637
52320
|
logger.warn("Disabling SAML2. Falling back to basic authentication");
|
|
52638
|
-
|
|
52639
|
-
response = await axios_1.default.get(urlPath,
|
|
52321
|
+
config.params.saml2 = "disabled";
|
|
52322
|
+
response = await axios_1.default.get(urlPath, config);
|
|
52640
52323
|
}
|
|
52641
52324
|
throwIfHtmlLoginForm(response);
|
|
52642
52325
|
return {
|
|
52643
|
-
auth:
|
|
52326
|
+
auth: config.auth,
|
|
52644
52327
|
cookies: new cookies_1.Cookies().setCookie(response),
|
|
52645
52328
|
xsrfToken: response.headers[common_1.CSRF.responseHeaderName]
|
|
52646
52329
|
};
|
|
@@ -52734,7 +52417,7 @@ var require_httpClient = __commonJS({
|
|
|
52734
52417
|
if (connection.xsrfToken) {
|
|
52735
52418
|
headers["x-csrf-token"] = connection.xsrfToken;
|
|
52736
52419
|
}
|
|
52737
|
-
const
|
|
52420
|
+
const config = {
|
|
52738
52421
|
baseURL: new url_1.URL(system.service, system.url).toString(),
|
|
52739
52422
|
headers,
|
|
52740
52423
|
withCredentials: true,
|
|
@@ -52743,10 +52426,10 @@ var require_httpClient = __commonJS({
|
|
|
52743
52426
|
})
|
|
52744
52427
|
};
|
|
52745
52428
|
if (connection == null ? void 0 : connection.auth) {
|
|
52746
|
-
|
|
52429
|
+
config.auth = connection.auth;
|
|
52747
52430
|
}
|
|
52748
52431
|
axios_1.default.defaults.headers.common["Accept"] = "application/json,application/xml,text/plain,*/*";
|
|
52749
|
-
const httpClient = axios_1.default.create(
|
|
52432
|
+
const httpClient = axios_1.default.create(config);
|
|
52750
52433
|
return { connection, httpClient };
|
|
52751
52434
|
}
|
|
52752
52435
|
exports2.newHttpClient = newHttpClient;
|
|
@@ -54927,10 +54610,10 @@ var require_axios_debug_log = __commonJS({
|
|
|
54927
54610
|
var axiosDebug = require_src2()("axios");
|
|
54928
54611
|
var URL_KEY = "__AXIOS-DEBUG-LOG_URL__";
|
|
54929
54612
|
var options2 = {
|
|
54930
|
-
request: function(debug,
|
|
54931
|
-
var url = axios2.getUri(
|
|
54932
|
-
Object.defineProperty(
|
|
54933
|
-
debug(
|
|
54613
|
+
request: function(debug, config) {
|
|
54614
|
+
var url = axios2.getUri(config);
|
|
54615
|
+
Object.defineProperty(config, URL_KEY, { value: url });
|
|
54616
|
+
debug(config.method.toUpperCase() + " " + url);
|
|
54934
54617
|
},
|
|
54935
54618
|
response: function(debug, response) {
|
|
54936
54619
|
var url = response.config[URL_KEY];
|
|
@@ -54948,9 +54631,9 @@ var require_axios_debug_log = __commonJS({
|
|
|
54948
54631
|
function addLogger(instance, debug) {
|
|
54949
54632
|
if (debug === void 0)
|
|
54950
54633
|
debug = axiosDebug;
|
|
54951
|
-
instance.interceptors.request.use(function(
|
|
54952
|
-
options2.request(debug,
|
|
54953
|
-
return
|
|
54634
|
+
instance.interceptors.request.use(function(config) {
|
|
54635
|
+
options2.request(debug, config);
|
|
54636
|
+
return config;
|
|
54954
54637
|
});
|
|
54955
54638
|
instance.interceptors.response.use(function(response) {
|
|
54956
54639
|
options2.response(debug, response);
|
|
@@ -55174,10 +54857,10 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55174
54857
|
const httpClient = await this.getClient();
|
|
55175
54858
|
const info = await this.getInfo(app.name);
|
|
55176
54859
|
const payload = this.createPayload(archivePath, app.name, app.description || "Deployed with SAP Fiori tools", info ? info.Package : app.package, httpClient);
|
|
55177
|
-
const
|
|
54860
|
+
const config = this.createConfig(app.transport, testMode, safeMode);
|
|
55178
54861
|
const frontendUrl = this.getAbapFrontendUrl(this.system.originalUrl || this.system.url);
|
|
55179
54862
|
try {
|
|
55180
|
-
const response = await this.updateRepoRequest(!!info, app.name, httpClient, payload,
|
|
54863
|
+
const response = await this.updateRepoRequest(!!info, app.name, httpClient, payload, config);
|
|
55181
54864
|
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
|
|
55182
54865
|
const message = JSON.parse(response.headers["sap-message"]);
|
|
55183
54866
|
message["longtextUrl"] = message["longtext_url"];
|
|
@@ -55199,9 +54882,9 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55199
54882
|
async undeploy(app, testMode = false) {
|
|
55200
54883
|
var _a2;
|
|
55201
54884
|
const httpClient = await this.getClient();
|
|
55202
|
-
const
|
|
54885
|
+
const config = this.createConfig(app.transport, testMode);
|
|
55203
54886
|
try {
|
|
55204
|
-
const response = await this.deleteRepoRequest(app.name, httpClient,
|
|
54887
|
+
const response = await this.deleteRepoRequest(app.name, httpClient, config);
|
|
55205
54888
|
if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
|
|
55206
54889
|
const message = JSON.parse(response.headers["sap-message"]);
|
|
55207
54890
|
(0, message_1.prettyPrintMessage)(message, this.log);
|
|
@@ -55244,7 +54927,7 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55244
54927
|
const escapedName = encodeXmlValue(name);
|
|
55245
54928
|
return `<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="${httpClient.defaults.baseURL}"> <id>${httpClient.defaults.baseURL}/Repositories('${escapedName}')</id> <title type="text">Repositories('${escapedName}')</title> <updated>${time}</updated> <category term="/UI5/ABAP_REPOSITORY_SRV.Repository" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="Repositories('${escapedName}')" rel="edit" title="Repository"/> <content type="application/xml"> <m:properties> <d:Name>${escapedName}</d:Name> <d:Package>${abapPackage == null ? void 0 : abapPackage.toUpperCase()}</d:Package> <d:Description>${encodeXmlValue(description)}</d:Description> <d:ZipArchive>${base64Data}</d:ZipArchive> <d:Info/> </m:properties> </content></entry>`;
|
|
55246
54929
|
}
|
|
55247
|
-
async updateRepoRequest(isExisting, appName, httpClient, payload,
|
|
54930
|
+
async updateRepoRequest(isExisting, appName, httpClient, payload, config, tryCount = 1) {
|
|
55248
54931
|
var _a2, _b;
|
|
55249
54932
|
try {
|
|
55250
54933
|
if (tryCount === 2) {
|
|
@@ -55253,33 +54936,33 @@ var require_ui5AbapRepository = __commonJS({
|
|
|
55253
54936
|
if (tryCount !== 1 && !isExisting && await this.getInfo(appName) !== void 0) {
|
|
55254
54937
|
return;
|
|
55255
54938
|
}
|
|
55256
|
-
return isExisting ? await httpClient.put(`/Repositories('${encodeURIComponent(appName)}')`, payload,
|
|
54939
|
+
return isExisting ? await httpClient.put(`/Repositories('${encodeURIComponent(appName)}')`, payload, config) : await httpClient.post("/Repositories", payload, config);
|
|
55257
54940
|
} catch (error3) {
|
|
55258
54941
|
if ([504, 408].includes((_a2 = error3 == null ? void 0 : error3.response) == null ? void 0 : _a2.status)) {
|
|
55259
54942
|
if (tryCount >= 3) {
|
|
55260
54943
|
throw error3;
|
|
55261
54944
|
}
|
|
55262
|
-
return await this.updateRepoRequest(isExisting, appName, httpClient, payload,
|
|
55263
|
-
} else if ((_b =
|
|
54945
|
+
return await this.updateRepoRequest(isExisting, appName, httpClient, payload, config, ++tryCount);
|
|
54946
|
+
} else if ((_b = config == null ? void 0 : config.params) == null ? void 0 : _b.TestMode) {
|
|
55264
54947
|
return error3.response;
|
|
55265
54948
|
} else {
|
|
55266
54949
|
throw error3;
|
|
55267
54950
|
}
|
|
55268
54951
|
}
|
|
55269
54952
|
}
|
|
55270
|
-
async deleteRepoRequest(appName, httpClient,
|
|
54953
|
+
async deleteRepoRequest(appName, httpClient, config, tryCount = 1) {
|
|
55271
54954
|
var _a2;
|
|
55272
54955
|
try {
|
|
55273
54956
|
if (tryCount === 2) {
|
|
55274
54957
|
this.log.warn("Warning: retry undeploy to handle a backend rejection...");
|
|
55275
54958
|
}
|
|
55276
|
-
return await httpClient.delete(`/Repositories('${encodeURIComponent(appName)}')`,
|
|
54959
|
+
return await httpClient.delete(`/Repositories('${encodeURIComponent(appName)}')`, config);
|
|
55277
54960
|
} catch (error3) {
|
|
55278
54961
|
if (((_a2 = error3 == null ? void 0 : error3.response) == null ? void 0 : _a2.status) === 400) {
|
|
55279
54962
|
if (tryCount >= 2) {
|
|
55280
54963
|
throw error3;
|
|
55281
54964
|
}
|
|
55282
|
-
return await this.deleteRepoRequest(appName, httpClient,
|
|
54965
|
+
return await this.deleteRepoRequest(appName, httpClient, config, ++tryCount);
|
|
55283
54966
|
} else {
|
|
55284
54967
|
throw error3;
|
|
55285
54968
|
}
|
|
@@ -55754,8 +55437,8 @@ var require_sapSystem = __commonJS({
|
|
|
55754
55437
|
const authenticationType = Object.values(ux_store_1.AuthenticationType).find((v) => v === s.authenticationType) || (0, __1.guessAuthType)({ credentials, fallback: false });
|
|
55755
55438
|
return new SapSystem(s.name, { url: s.url, client: s.client, authenticationType }, credentials, s.userDisplayName, void 0, void 0, types_1.SapSystemType.URL);
|
|
55756
55439
|
}
|
|
55757
|
-
constructor(name,
|
|
55758
|
-
this.config =
|
|
55440
|
+
constructor(name, config, credentials = {}, userDisplayName, unSaved = false, postConnectionCallbackCreator, sapSystemType = types_1.SapSystemType.BTP) {
|
|
55441
|
+
this.config = config;
|
|
55759
55442
|
this.credentials = credentials;
|
|
55760
55443
|
this._unSaved = false;
|
|
55761
55444
|
this.postConnectionCallbackInitialized = false;
|
|
@@ -56085,7 +55768,7 @@ var require_systemStore = __commonJS({
|
|
|
56085
55768
|
});
|
|
56086
55769
|
|
|
56087
55770
|
// ../lib/odata-client/dist/system/index.js
|
|
56088
|
-
var
|
|
55771
|
+
var require_system2 = __commonJS({
|
|
56089
55772
|
"../lib/odata-client/dist/system/index.js"(exports2) {
|
|
56090
55773
|
"use strict";
|
|
56091
55774
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -56217,11 +55900,11 @@ var require_system3 = __commonJS({
|
|
|
56217
55900
|
exports2.newSapSystemForServiceUrl = newSapSystemForServiceUrl;
|
|
56218
55901
|
function newSapSystemForSteampunk(name, serviceKey, unSaved = false) {
|
|
56219
55902
|
const service = typeof serviceKey === "string" ? JSON.parse(serviceKey) : serviceKey;
|
|
56220
|
-
const
|
|
55903
|
+
const config = {
|
|
56221
55904
|
url: service.url,
|
|
56222
55905
|
scp: true
|
|
56223
55906
|
};
|
|
56224
|
-
return new sapSystem_1.SapSystem(name,
|
|
55907
|
+
return new sapSystem_1.SapSystem(name, config, { serviceKeysContents: service }, void 0, unSaved, postConnectionCallbackCreator, types_1.SapSystemType.SteamPunk);
|
|
56225
55908
|
}
|
|
56226
55909
|
exports2.newSapSystemForSteampunk = newSapSystemForSteampunk;
|
|
56227
55910
|
function newS4HCSystem({ name, url, unSaved = false }) {
|
|
@@ -56275,7 +55958,7 @@ var require_dist6 = __commonJS({
|
|
|
56275
55958
|
__exportStar(require_config(), exports2);
|
|
56276
55959
|
__exportStar(require_connection(), exports2);
|
|
56277
55960
|
__exportStar(require_api_hub(), exports2);
|
|
56278
|
-
__exportStar(
|
|
55961
|
+
__exportStar(require_system2(), exports2);
|
|
56279
55962
|
}
|
|
56280
55963
|
});
|
|
56281
55964
|
|
|
@@ -57640,6 +57323,7 @@ var require_constants5 = __commonJS({
|
|
|
57640
57323
|
ExtConfigJson: ".extconfig.json",
|
|
57641
57324
|
Manifest: "manifest.json",
|
|
57642
57325
|
ManifestAppDescrVar: "manifest.appdescr_variant",
|
|
57326
|
+
MtaYaml: "mta.yaml",
|
|
57643
57327
|
Package: "package.json",
|
|
57644
57328
|
Tsconfig: "tsconfig.json",
|
|
57645
57329
|
Ui5Yaml: "ui5.yaml",
|
|
@@ -57882,6 +57566,44 @@ var require_file4 = __commonJS({
|
|
|
57882
57566
|
}
|
|
57883
57567
|
});
|
|
57884
57568
|
|
|
57569
|
+
// ../../node_modules/@sap-ux/project-access/dist/project/dependencies.js
|
|
57570
|
+
var require_dependencies = __commonJS({
|
|
57571
|
+
"../../node_modules/@sap-ux/project-access/dist/project/dependencies.js"(exports2) {
|
|
57572
|
+
"use strict";
|
|
57573
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
57574
|
+
exports2.getNodeModulesPath = exports2.hasDependency = void 0;
|
|
57575
|
+
var fs_1 = require("fs");
|
|
57576
|
+
var path_1 = require("path");
|
|
57577
|
+
var constants_1 = require_constants5();
|
|
57578
|
+
var hasDependency = (packageJson, dependency) => {
|
|
57579
|
+
var _a2, _b;
|
|
57580
|
+
return !!(((_a2 = packageJson.dependencies) === null || _a2 === void 0 ? void 0 : _a2[dependency]) || ((_b = packageJson.devDependencies) === null || _b === void 0 ? void 0 : _b[dependency]));
|
|
57581
|
+
};
|
|
57582
|
+
exports2.hasDependency = hasDependency;
|
|
57583
|
+
function getNodeModulesPath(projectRoot, module3) {
|
|
57584
|
+
if (!(0, path_1.isAbsolute)(projectRoot)) {
|
|
57585
|
+
return void 0;
|
|
57586
|
+
}
|
|
57587
|
+
const { root } = (0, path_1.parse)(projectRoot);
|
|
57588
|
+
let currentDir = projectRoot;
|
|
57589
|
+
let modulesPath;
|
|
57590
|
+
while (currentDir !== root) {
|
|
57591
|
+
let checkPath = (0, path_1.join)(currentDir, "node_modules");
|
|
57592
|
+
if (module3) {
|
|
57593
|
+
checkPath = (0, path_1.join)(checkPath, module3, constants_1.FileName.Package);
|
|
57594
|
+
}
|
|
57595
|
+
if ((0, fs_1.existsSync)(checkPath)) {
|
|
57596
|
+
modulesPath = currentDir;
|
|
57597
|
+
break;
|
|
57598
|
+
}
|
|
57599
|
+
currentDir = (0, path_1.dirname)(currentDir);
|
|
57600
|
+
}
|
|
57601
|
+
return modulesPath;
|
|
57602
|
+
}
|
|
57603
|
+
exports2.getNodeModulesPath = getNodeModulesPath;
|
|
57604
|
+
}
|
|
57605
|
+
});
|
|
57606
|
+
|
|
57885
57607
|
// ../../node_modules/@sap-ux/project-access/dist/project/module-loader.js
|
|
57886
57608
|
var require_module_loader = __commonJS({
|
|
57887
57609
|
"../../node_modules/@sap-ux/project-access/dist/project/module-loader.js"(exports2) {
|
|
@@ -57947,15 +57669,20 @@ var require_module_loader = __commonJS({
|
|
|
57947
57669
|
};
|
|
57948
57670
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
57949
57671
|
exports2.loadModuleFromProject = void 0;
|
|
57672
|
+
var dependencies_1 = require_dependencies();
|
|
57950
57673
|
function loadModuleFromProject(projectRoot, moduleName) {
|
|
57951
57674
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57952
57675
|
var _a2;
|
|
57953
57676
|
let module3;
|
|
57954
57677
|
try {
|
|
57678
|
+
if (!(0, dependencies_1.getNodeModulesPath)(projectRoot, moduleName)) {
|
|
57679
|
+
throw Error("Path to module not found.");
|
|
57680
|
+
}
|
|
57955
57681
|
const modulePath = require.resolve(moduleName, { paths: [projectRoot] });
|
|
57956
57682
|
module3 = yield (_a2 = modulePath, Promise.resolve().then(() => __importStar(require(_a2))));
|
|
57957
57683
|
} catch (error3) {
|
|
57958
|
-
throw Error(`Module '${moduleName}' not installed in project '${projectRoot}'
|
|
57684
|
+
throw Error(`Module '${moduleName}' not installed in project '${projectRoot}'.
|
|
57685
|
+
${error3.toString()}`);
|
|
57959
57686
|
}
|
|
57960
57687
|
return module3;
|
|
57961
57688
|
});
|
|
@@ -57997,6 +57724,7 @@ var require_cap = __commonJS({
|
|
|
57997
57724
|
};
|
|
57998
57725
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
57999
57726
|
exports2.toReferenceUri = exports2.toAbsoluteUri = exports2.getCapEnvironment = exports2.readCapServiceMetadataEdmx = exports2.getCapModelAndServices = exports2.getCapCustomPaths = exports2.getCapProjectType = exports2.isCapJavaProject = exports2.isCapNodeJsProject = void 0;
|
|
57727
|
+
var child_process_1 = require("child_process");
|
|
58000
57728
|
var path_1 = require("path");
|
|
58001
57729
|
var constants_1 = require_constants5();
|
|
58002
57730
|
var file_1 = require_file4();
|
|
@@ -58109,7 +57837,24 @@ var require_cap = __commonJS({
|
|
|
58109
57837
|
exports2.getCapEnvironment = getCapEnvironment;
|
|
58110
57838
|
function loadCdsModuleFromProject(capProjectPath) {
|
|
58111
57839
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58112
|
-
|
|
57840
|
+
let module3;
|
|
57841
|
+
let loadProjectError;
|
|
57842
|
+
let loadError;
|
|
57843
|
+
try {
|
|
57844
|
+
module3 = yield (0, module_loader_1.loadModuleFromProject)(capProjectPath, "@sap/cds");
|
|
57845
|
+
} catch (error3) {
|
|
57846
|
+
loadProjectError = error3;
|
|
57847
|
+
}
|
|
57848
|
+
if (!module3) {
|
|
57849
|
+
try {
|
|
57850
|
+
module3 = yield loadGlobalCdsModule();
|
|
57851
|
+
} catch (error3) {
|
|
57852
|
+
loadError = error3;
|
|
57853
|
+
}
|
|
57854
|
+
}
|
|
57855
|
+
if (!module3) {
|
|
57856
|
+
throw Error(`Could not load cds module. Attempt to load module @sap/cds from project threw error '${loadProjectError}', attempt to load module @sap/cds from @sap/cds-dk threw error '${loadError}'`);
|
|
57857
|
+
}
|
|
58113
57858
|
return "default" in module3 ? module3.default : module3;
|
|
58114
57859
|
});
|
|
58115
57860
|
}
|
|
@@ -58175,6 +57920,43 @@ var require_cap = __commonJS({
|
|
|
58175
57920
|
return packageName;
|
|
58176
57921
|
});
|
|
58177
57922
|
}
|
|
57923
|
+
var globalCdsPathCache;
|
|
57924
|
+
function loadGlobalCdsModule() {
|
|
57925
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57926
|
+
if (!globalCdsPathCache) {
|
|
57927
|
+
const versions = yield getCdsVersionInfo();
|
|
57928
|
+
if (!versions.home) {
|
|
57929
|
+
throw Error("Can not find global installation of module @sap/cds, which should be part of @sap/cds-dk");
|
|
57930
|
+
}
|
|
57931
|
+
globalCdsPathCache = versions.home;
|
|
57932
|
+
}
|
|
57933
|
+
return (0, module_loader_1.loadModuleFromProject)(globalCdsPathCache, "@sap/cds");
|
|
57934
|
+
});
|
|
57935
|
+
}
|
|
57936
|
+
function getCdsVersionInfo(cwd) {
|
|
57937
|
+
return new Promise((resolve, reject) => {
|
|
57938
|
+
let out = "";
|
|
57939
|
+
const cdsVersionInfo = (0, child_process_1.spawn)("cds", ["--version"], { cwd, shell: true });
|
|
57940
|
+
cdsVersionInfo.stdout.on("data", (data2) => {
|
|
57941
|
+
out += data2.toString();
|
|
57942
|
+
});
|
|
57943
|
+
cdsVersionInfo.on("close", () => {
|
|
57944
|
+
if (out) {
|
|
57945
|
+
const versions = {};
|
|
57946
|
+
for (const line of out.split("\n").filter((v) => v)) {
|
|
57947
|
+
const [key, value] = line.split(": ");
|
|
57948
|
+
versions[key] = value;
|
|
57949
|
+
}
|
|
57950
|
+
resolve(versions);
|
|
57951
|
+
} else {
|
|
57952
|
+
reject(new Error("Module path not found"));
|
|
57953
|
+
}
|
|
57954
|
+
});
|
|
57955
|
+
cdsVersionInfo.on("error", (error3) => {
|
|
57956
|
+
reject(error3);
|
|
57957
|
+
});
|
|
57958
|
+
});
|
|
57959
|
+
}
|
|
58178
57960
|
}
|
|
58179
57961
|
});
|
|
58180
57962
|
|
|
@@ -59747,9 +59529,9 @@ var require_merge = __commonJS({
|
|
|
59747
59529
|
}
|
|
59748
59530
|
});
|
|
59749
59531
|
|
|
59750
|
-
// ../../node_modules/@sap-ux/
|
|
59532
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/errors/yaml-error.js
|
|
59751
59533
|
var require_yaml_error = __commonJS({
|
|
59752
|
-
"../../node_modules/@sap-ux/
|
|
59534
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/errors/yaml-error.js"(exports2) {
|
|
59753
59535
|
"use strict";
|
|
59754
59536
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
59755
59537
|
exports2.YAMLError = void 0;
|
|
@@ -59764,9 +59546,9 @@ var require_yaml_error = __commonJS({
|
|
|
59764
59546
|
}
|
|
59765
59547
|
});
|
|
59766
59548
|
|
|
59767
|
-
// ../../node_modules/@sap-ux/
|
|
59549
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/errors/index.js
|
|
59768
59550
|
var require_errors2 = __commonJS({
|
|
59769
|
-
"../../node_modules/@sap-ux/
|
|
59551
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/errors/index.js"(exports2) {
|
|
59770
59552
|
"use strict";
|
|
59771
59553
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
59772
59554
|
exports2.YAMLError = exports2.errorTemplate = exports2.errorCode = void 0;
|
|
@@ -59803,9 +59585,9 @@ var require_errors2 = __commonJS({
|
|
|
59803
59585
|
}
|
|
59804
59586
|
});
|
|
59805
59587
|
|
|
59806
|
-
// ../../node_modules/@sap-ux/
|
|
59588
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/texts/index.js
|
|
59807
59589
|
var require_texts = __commonJS({
|
|
59808
|
-
"../../node_modules/@sap-ux/
|
|
59590
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/texts/index.js"(exports2) {
|
|
59809
59591
|
"use strict";
|
|
59810
59592
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
59811
59593
|
exports2.interpolate = void 0;
|
|
@@ -59824,9 +59606,9 @@ var require_texts = __commonJS({
|
|
|
59824
59606
|
}
|
|
59825
59607
|
});
|
|
59826
59608
|
|
|
59827
|
-
// ../../node_modules/@sap-ux/
|
|
59609
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/yaml-document.js
|
|
59828
59610
|
var require_yaml_document = __commonJS({
|
|
59829
|
-
"../../node_modules/@sap-ux/
|
|
59611
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/yaml-document.js"(exports2) {
|
|
59830
59612
|
"use strict";
|
|
59831
59613
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
59832
59614
|
if (k2 === void 0)
|
|
@@ -60060,9 +59842,9 @@ var require_yaml_document = __commonJS({
|
|
|
60060
59842
|
}
|
|
60061
59843
|
});
|
|
60062
59844
|
|
|
60063
|
-
// ../../node_modules/@sap-ux/
|
|
59845
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/index.js
|
|
60064
59846
|
var require_dist8 = __commonJS({
|
|
60065
|
-
"../../node_modules/@sap-ux/
|
|
59847
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/yaml/dist/index.js"(exports2) {
|
|
60066
59848
|
"use strict";
|
|
60067
59849
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60068
59850
|
exports2.YAMLError = exports2.errorCode = exports2.YAMLMap = exports2.YAMLSeq = exports2.YamlDocument = void 0;
|
|
@@ -60087,9 +59869,9 @@ var require_dist8 = __commonJS({
|
|
|
60087
59869
|
}
|
|
60088
59870
|
});
|
|
60089
59871
|
|
|
60090
|
-
// ../../node_modules/@sap-ux/ui5-config/dist/middlewares.js
|
|
59872
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/middlewares.js
|
|
60091
59873
|
var require_middlewares = __commonJS({
|
|
60092
|
-
"../../node_modules/@sap-ux/ui5-config/dist/middlewares.js"(exports2) {
|
|
59874
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/middlewares.js"(exports2) {
|
|
60093
59875
|
"use strict";
|
|
60094
59876
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60095
59877
|
exports2.getMockServerMiddlewareConfig = exports2.getFioriToolsProxyMiddlewareConfig = exports2.getAppReloadMiddlewareConfig = void 0;
|
|
@@ -60163,9 +59945,9 @@ var require_middlewares = __commonJS({
|
|
|
60163
59945
|
}
|
|
60164
59946
|
});
|
|
60165
59947
|
|
|
60166
|
-
// ../../node_modules/@sap-ux/ui5-config/dist/ui5config.js
|
|
59948
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/ui5config.js
|
|
60167
59949
|
var require_ui5config = __commonJS({
|
|
60168
|
-
"../../node_modules/@sap-ux/ui5-config/dist/ui5config.js"(exports2) {
|
|
59950
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/ui5config.js"(exports2) {
|
|
60169
59951
|
"use strict";
|
|
60170
59952
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
60171
59953
|
function adopt(value) {
|
|
@@ -60216,10 +59998,10 @@ var require_ui5config = __commonJS({
|
|
|
60216
59998
|
}
|
|
60217
59999
|
return (_a2 = resources.configuration) !== null && _a2 !== void 0 ? _a2 : {};
|
|
60218
60000
|
}
|
|
60219
|
-
setConfiguration(
|
|
60001
|
+
setConfiguration(config) {
|
|
60220
60002
|
this.document.setIn({
|
|
60221
60003
|
path: "resources",
|
|
60222
|
-
value: { configuration:
|
|
60004
|
+
value: { configuration: config }
|
|
60223
60005
|
});
|
|
60224
60006
|
return this;
|
|
60225
60007
|
}
|
|
@@ -60263,10 +60045,10 @@ var require_ui5config = __commonJS({
|
|
|
60263
60045
|
return this;
|
|
60264
60046
|
}
|
|
60265
60047
|
addFioriToolsProxydMiddleware(proxyConfig) {
|
|
60266
|
-
const { config
|
|
60048
|
+
const { config, comments } = (0, middlewares_1.getFioriToolsProxyMiddlewareConfig)(proxyConfig.backend, proxyConfig.ui5);
|
|
60267
60049
|
this.document.appendTo({
|
|
60268
60050
|
path: "server.customMiddleware",
|
|
60269
|
-
value:
|
|
60051
|
+
value: config,
|
|
60270
60052
|
comments
|
|
60271
60053
|
});
|
|
60272
60054
|
return this;
|
|
@@ -60379,15 +60161,15 @@ var require_mergeWith = __commonJS({
|
|
|
60379
60161
|
}
|
|
60380
60162
|
});
|
|
60381
60163
|
|
|
60382
|
-
// ../../node_modules/@sap-ux/ui5-config/dist/utils.js
|
|
60164
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/utils.js
|
|
60383
60165
|
var require_utils9 = __commonJS({
|
|
60384
|
-
"../../node_modules/@sap-ux/ui5-config/dist/utils.js"(exports2) {
|
|
60166
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/utils.js"(exports2) {
|
|
60385
60167
|
"use strict";
|
|
60386
60168
|
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
60387
60169
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
60388
60170
|
};
|
|
60389
60171
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60390
|
-
exports2.getTypesVersion = exports2.getEsmTypesVersion = exports2.mergeObjects = void 0;
|
|
60172
|
+
exports2.getTypesPackage = exports2.getTypesVersion = exports2.getEsmTypesVersion = exports2.mergeObjects = void 0;
|
|
60391
60173
|
var mergeWith_1 = __importDefault(require_mergeWith());
|
|
60392
60174
|
var semver_1 = __importDefault(require_semver2());
|
|
60393
60175
|
function mergeObjects(base, extension2) {
|
|
@@ -60422,15 +60204,25 @@ var require_utils9 = __commonJS({
|
|
|
60422
60204
|
}
|
|
60423
60205
|
}
|
|
60424
60206
|
exports2.getTypesVersion = getTypesVersion;
|
|
60207
|
+
function getTypesPackage(ui5Version) {
|
|
60208
|
+
var _a2;
|
|
60209
|
+
const version = (_a2 = semver_1.default.coerce(ui5Version)) !== null && _a2 !== void 0 ? _a2 : semver_1.default.coerce("1.108.0");
|
|
60210
|
+
if (version && semver_1.default.lt(version, "1.113.0")) {
|
|
60211
|
+
return "@sapui5/ts-types-esm";
|
|
60212
|
+
} else {
|
|
60213
|
+
return "@sapui5/types";
|
|
60214
|
+
}
|
|
60215
|
+
}
|
|
60216
|
+
exports2.getTypesPackage = getTypesPackage;
|
|
60425
60217
|
}
|
|
60426
60218
|
});
|
|
60427
60219
|
|
|
60428
|
-
// ../../node_modules/@sap-ux/ui5-config/dist/index.js
|
|
60220
|
+
// ../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/index.js
|
|
60429
60221
|
var require_dist9 = __commonJS({
|
|
60430
|
-
"../../node_modules/@sap-ux/ui5-config/dist/index.js"(exports2) {
|
|
60222
|
+
"../../node_modules/@sap-ux/project-access/node_modules/@sap-ux/ui5-config/dist/index.js"(exports2) {
|
|
60431
60223
|
"use strict";
|
|
60432
60224
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60433
|
-
exports2.YAMLError = exports2.yamlErrorCode = exports2.getTypesVersion = exports2.getEsmTypesVersion = exports2.mergeObjects = exports2.UI5Config = void 0;
|
|
60225
|
+
exports2.YAMLError = exports2.yamlErrorCode = exports2.getTypesPackage = exports2.getTypesVersion = exports2.getEsmTypesVersion = exports2.mergeObjects = exports2.UI5Config = void 0;
|
|
60434
60226
|
var ui5config_1 = require_ui5config();
|
|
60435
60227
|
Object.defineProperty(exports2, "UI5Config", { enumerable: true, get: function() {
|
|
60436
60228
|
return ui5config_1.UI5Config;
|
|
@@ -60445,6 +60237,9 @@ var require_dist9 = __commonJS({
|
|
|
60445
60237
|
Object.defineProperty(exports2, "getTypesVersion", { enumerable: true, get: function() {
|
|
60446
60238
|
return utils_1.getTypesVersion;
|
|
60447
60239
|
} });
|
|
60240
|
+
Object.defineProperty(exports2, "getTypesPackage", { enumerable: true, get: function() {
|
|
60241
|
+
return utils_1.getTypesPackage;
|
|
60242
|
+
} });
|
|
60448
60243
|
var yaml_1 = require_dist8();
|
|
60449
60244
|
Object.defineProperty(exports2, "yamlErrorCode", { enumerable: true, get: function() {
|
|
60450
60245
|
return yaml_1.errorCode;
|
|
@@ -60582,20 +60377,6 @@ var require_info = __commonJS({
|
|
|
60582
60377
|
}
|
|
60583
60378
|
});
|
|
60584
60379
|
|
|
60585
|
-
// ../../node_modules/@sap-ux/project-access/dist/project/dependencies.js
|
|
60586
|
-
var require_dependencies = __commonJS({
|
|
60587
|
-
"../../node_modules/@sap-ux/project-access/dist/project/dependencies.js"(exports2) {
|
|
60588
|
-
"use strict";
|
|
60589
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60590
|
-
exports2.hasDependency = void 0;
|
|
60591
|
-
var hasDependency = (packageJson, dependency) => {
|
|
60592
|
-
var _a2, _b;
|
|
60593
|
-
return !!(((_a2 = packageJson.dependencies) === null || _a2 === void 0 ? void 0 : _a2[dependency]) || ((_b = packageJson.devDependencies) === null || _b === void 0 ? void 0 : _b[dependency]));
|
|
60594
|
-
};
|
|
60595
|
-
exports2.hasDependency = hasDependency;
|
|
60596
|
-
}
|
|
60597
|
-
});
|
|
60598
|
-
|
|
60599
60380
|
// ../../node_modules/@sap-ux/project-access/dist/project/search.js
|
|
60600
60381
|
var require_search = __commonJS({
|
|
60601
60382
|
"../../node_modules/@sap-ux/project-access/dist/project/search.js"(exports2) {
|
|
@@ -60653,7 +60434,7 @@ var require_search = __commonJS({
|
|
|
60653
60434
|
wsRoots.push(folder.uri.fsPath);
|
|
60654
60435
|
});
|
|
60655
60436
|
} else {
|
|
60656
|
-
wsRoots = wsFolders
|
|
60437
|
+
wsRoots = wsFolders !== null && wsFolders !== void 0 ? wsFolders : [];
|
|
60657
60438
|
}
|
|
60658
60439
|
return wsRoots;
|
|
60659
60440
|
}
|
|
@@ -60894,12 +60675,66 @@ var require_search = __commonJS({
|
|
|
60894
60675
|
}
|
|
60895
60676
|
});
|
|
60896
60677
|
|
|
60678
|
+
// ../../node_modules/@sap-ux/project-access/dist/project/mta.js
|
|
60679
|
+
var require_mta = __commonJS({
|
|
60680
|
+
"../../node_modules/@sap-ux/project-access/dist/project/mta.js"(exports2) {
|
|
60681
|
+
"use strict";
|
|
60682
|
+
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
60683
|
+
function adopt(value) {
|
|
60684
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
60685
|
+
resolve(value);
|
|
60686
|
+
});
|
|
60687
|
+
}
|
|
60688
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
60689
|
+
function fulfilled(value) {
|
|
60690
|
+
try {
|
|
60691
|
+
step(generator.next(value));
|
|
60692
|
+
} catch (e) {
|
|
60693
|
+
reject(e);
|
|
60694
|
+
}
|
|
60695
|
+
}
|
|
60696
|
+
function rejected(value) {
|
|
60697
|
+
try {
|
|
60698
|
+
step(generator["throw"](value));
|
|
60699
|
+
} catch (e) {
|
|
60700
|
+
reject(e);
|
|
60701
|
+
}
|
|
60702
|
+
}
|
|
60703
|
+
function step(result2) {
|
|
60704
|
+
result2.done ? resolve(result2.value) : adopt(result2.value).then(fulfilled, rejected);
|
|
60705
|
+
}
|
|
60706
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
60707
|
+
});
|
|
60708
|
+
};
|
|
60709
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60710
|
+
exports2.getMtaPath = void 0;
|
|
60711
|
+
var file_search_1 = require_file_search();
|
|
60712
|
+
var constants_1 = require_constants5();
|
|
60713
|
+
var path_1 = require("path");
|
|
60714
|
+
function getMtaPath(projectPath, fs2) {
|
|
60715
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60716
|
+
const mtaPath = yield (0, file_search_1.findFileUp)(constants_1.FileName.MtaYaml, projectPath, fs2);
|
|
60717
|
+
if (!mtaPath) {
|
|
60718
|
+
return void 0;
|
|
60719
|
+
} else {
|
|
60720
|
+
const mtaFolderPath = (0, path_1.dirname)(mtaPath);
|
|
60721
|
+
return {
|
|
60722
|
+
mtaPath,
|
|
60723
|
+
hasRoot: mtaFolderPath !== projectPath
|
|
60724
|
+
};
|
|
60725
|
+
}
|
|
60726
|
+
});
|
|
60727
|
+
}
|
|
60728
|
+
exports2.getMtaPath = getMtaPath;
|
|
60729
|
+
}
|
|
60730
|
+
});
|
|
60731
|
+
|
|
60897
60732
|
// ../../node_modules/@sap-ux/project-access/dist/project/index.js
|
|
60898
60733
|
var require_project2 = __commonJS({
|
|
60899
60734
|
"../../node_modules/@sap-ux/project-access/dist/project/index.js"(exports2) {
|
|
60900
60735
|
"use strict";
|
|
60901
60736
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60902
|
-
exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getAppProgrammingLanguage = exports2.readCapServiceMetadataEdmx = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
|
|
60737
|
+
exports2.getMtaPath = exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getAppProgrammingLanguage = exports2.getNodeModulesPath = exports2.readCapServiceMetadataEdmx = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
|
|
60903
60738
|
var cap_1 = require_cap();
|
|
60904
60739
|
Object.defineProperty(exports2, "getCapCustomPaths", { enumerable: true, get: function() {
|
|
60905
60740
|
return cap_1.getCapCustomPaths;
|
|
@@ -60922,6 +60757,10 @@ var require_project2 = __commonJS({
|
|
|
60922
60757
|
Object.defineProperty(exports2, "readCapServiceMetadataEdmx", { enumerable: true, get: function() {
|
|
60923
60758
|
return cap_1.readCapServiceMetadataEdmx;
|
|
60924
60759
|
} });
|
|
60760
|
+
var dependencies_1 = require_dependencies();
|
|
60761
|
+
Object.defineProperty(exports2, "getNodeModulesPath", { enumerable: true, get: function() {
|
|
60762
|
+
return dependencies_1.getNodeModulesPath;
|
|
60763
|
+
} });
|
|
60925
60764
|
var info_1 = require_info();
|
|
60926
60765
|
Object.defineProperty(exports2, "getAppProgrammingLanguage", { enumerable: true, get: function() {
|
|
60927
60766
|
return info_1.getAppProgrammingLanguage;
|
|
@@ -60950,6 +60789,10 @@ var require_project2 = __commonJS({
|
|
|
60950
60789
|
Object.defineProperty(exports2, "readUi5Yaml", { enumerable: true, get: function() {
|
|
60951
60790
|
return ui5_config_1.readUi5Yaml;
|
|
60952
60791
|
} });
|
|
60792
|
+
var mta_1 = require_mta();
|
|
60793
|
+
Object.defineProperty(exports2, "getMtaPath", { enumerable: true, get: function() {
|
|
60794
|
+
return mta_1.getMtaPath;
|
|
60795
|
+
} });
|
|
60953
60796
|
}
|
|
60954
60797
|
});
|
|
60955
60798
|
|
|
@@ -61060,7 +60903,7 @@ var require_dist10 = __commonJS({
|
|
|
61060
60903
|
__createBinding(exports3, m, p);
|
|
61061
60904
|
};
|
|
61062
60905
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61063
|
-
exports2.getFilePaths = exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.FileName = void 0;
|
|
60906
|
+
exports2.getFilePaths = exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getNodeModulesPath = exports2.getMtaPath = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.FileName = void 0;
|
|
61064
60907
|
var constants_1 = require_constants5();
|
|
61065
60908
|
Object.defineProperty(exports2, "FileName", { enumerable: true, get: function() {
|
|
61066
60909
|
return constants_1.FileName;
|
|
@@ -61093,6 +60936,12 @@ var require_dist10 = __commonJS({
|
|
|
61093
60936
|
Object.defineProperty(exports2, "getCapProjectType", { enumerable: true, get: function() {
|
|
61094
60937
|
return project_1.getCapProjectType;
|
|
61095
60938
|
} });
|
|
60939
|
+
Object.defineProperty(exports2, "getMtaPath", { enumerable: true, get: function() {
|
|
60940
|
+
return project_1.getMtaPath;
|
|
60941
|
+
} });
|
|
60942
|
+
Object.defineProperty(exports2, "getNodeModulesPath", { enumerable: true, get: function() {
|
|
60943
|
+
return project_1.getNodeModulesPath;
|
|
60944
|
+
} });
|
|
61096
60945
|
Object.defineProperty(exports2, "getWebappPath", { enumerable: true, get: function() {
|
|
61097
60946
|
return project_1.getWebappPath;
|
|
61098
60947
|
} });
|
|
@@ -61159,7 +61008,7 @@ var require_utils10 = __commonJS({
|
|
|
61159
61008
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
61160
61009
|
};
|
|
61161
61010
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61162
|
-
exports2.
|
|
61011
|
+
exports2.isReuseLib = exports2.getAdditionalEntitySetsFromManifest = exports2.isAdaptationProject = exports2.tryGetEdmxAppMockServiceMockdataDir = exports2.getEdmxAppDefaultMockdataDirPath = exports2.getCapAppMockdataDirPath = exports2.getApplicationId = exports2.deleteCapApp = exports2.isOVPProject = exports2.getAppIdForFile = exports2.checkServeLocalConfig = exports2.getUI5Version = exports2.getLocalUI5Version = exports2.getUi5CustomMiddleware = exports2.getBackendConfigByPath = exports2.getVersionFromManifest = exports2.getProjectType = exports2.getProjectTypeFromProjectFiles = exports2.findI18nProperty = exports2.updateI18nProperties = exports2.updateI18nProperty = exports2.getI18nProperties = exports2.mergeI18nProperties = exports2.getI18nPath = exports2.readAppJson = exports2.getAppConfig = exports2.fillServiceSpecificationForApp = exports2.createApplicationStructureConfig = exports2.getMainService = exports2.findProjectRootsByDependency = exports2.isFioriToolsProject = exports2.checkPackageJson = exports2.findRunnableProjects = exports2.findRootsForPath = exports2.getDetailedProjectType = exports2.getAppType = exports2.findAllProjectRoots = exports2.findAllManifest = exports2.getAppProgrammingLanguage = exports2.hasDependency = exports2.findExtensionFiles = exports2.findAll = exports2.findCapProjects = exports2.findLibrary = exports2.findProjectRoot = exports2.scriptsRegEx = void 0;
|
|
61163
61012
|
var fs_1 = require("fs");
|
|
61164
61013
|
var findit2_1 = __importDefault(require_findit2());
|
|
61165
61014
|
var fast_xml_parser_1 = require_fxp();
|
|
@@ -61381,26 +61230,21 @@ var require_utils10 = __commonJS({
|
|
|
61381
61230
|
}
|
|
61382
61231
|
exports2.findAllProjectRoots = findAllProjectRoots;
|
|
61383
61232
|
async function getAppType(appRoot, projectRoot) {
|
|
61233
|
+
let appType = "SAPUI5 freestyle";
|
|
61384
61234
|
if (appRoot === projectRoot) {
|
|
61385
|
-
|
|
61386
|
-
|
|
61387
|
-
return "SAP Fiori elements";
|
|
61235
|
+
if (await isFioriElement(appRoot)) {
|
|
61236
|
+
appType = "SAP Fiori elements";
|
|
61388
61237
|
} else if (await (0, file_1.fileExists)((0, path_1.join)(appRoot, project_spec_1.FileName.ExtConfigJson))) {
|
|
61389
|
-
|
|
61390
|
-
} else {
|
|
61391
|
-
|
|
61392
|
-
}
|
|
61393
|
-
|
|
61394
|
-
try {
|
|
61395
|
-
const projectPckJson = await (0, file_1.readJSON)((0, path_1.join)(projectRoot, project_spec_1.FileName.Package));
|
|
61396
|
-
if (!projectPckJson.sapux) {
|
|
61397
|
-
return "SAPUI5 freestyle";
|
|
61398
|
-
} else if (Array.isArray(projectPckJson.sapux)) {
|
|
61399
|
-
return projectPckJson.sapux.find((relAppPath) => (0, path_1.join)(projectRoot, ...relAppPath.split(/\\|\//)) === appRoot) ? "SAP Fiori elements" : "SAPUI5 freestyle";
|
|
61238
|
+
appType = "SAPUI5 Extension";
|
|
61239
|
+
} else if (await isAdaptationProject(projectRoot)) {
|
|
61240
|
+
appType = "Fiori Adaptation";
|
|
61241
|
+
} else if (await isReuseLib(projectRoot)) {
|
|
61242
|
+
appType = "Fiori Reuse";
|
|
61400
61243
|
}
|
|
61401
|
-
}
|
|
61402
|
-
|
|
61244
|
+
} else {
|
|
61245
|
+
appType = await getCapAppType(appRoot, projectRoot);
|
|
61403
61246
|
}
|
|
61247
|
+
return appType;
|
|
61404
61248
|
}
|
|
61405
61249
|
exports2.getAppType = getAppType;
|
|
61406
61250
|
async function getDetailedProjectType(appRoot, projectRoot) {
|
|
@@ -61926,9 +61770,9 @@ var require_utils10 = __commonJS({
|
|
|
61926
61770
|
}
|
|
61927
61771
|
exports2.getEdmxAppDefaultMockdataDirPath = getEdmxAppDefaultMockdataDirPath;
|
|
61928
61772
|
async function tryGetEdmxAppMockServiceMockdataDir(configDir, serviceMetadataPath) {
|
|
61929
|
-
const
|
|
61930
|
-
if (
|
|
61931
|
-
const { services, mockFolder } = await (0, ui5Config_1.getMockServicesConfiguration)(configDir,
|
|
61773
|
+
const config = await (0, ui5Config_1.getMockServerConfig)(configDir);
|
|
61774
|
+
if (config) {
|
|
61775
|
+
const { services, mockFolder } = await (0, ui5Config_1.getMockServicesConfiguration)(configDir, config);
|
|
61932
61776
|
if (services) {
|
|
61933
61777
|
const mockService = (0, ui5Config_1.findMockServiceByMetadataPath)(services, serviceMetadataPath);
|
|
61934
61778
|
if (mockService == null ? void 0 : mockService.mockdataPath) {
|
|
@@ -61964,24 +61808,43 @@ var require_utils10 = __commonJS({
|
|
|
61964
61808
|
}
|
|
61965
61809
|
}
|
|
61966
61810
|
exports2.getAdditionalEntitySetsFromManifest = getAdditionalEntitySetsFromManifest;
|
|
61967
|
-
function
|
|
61968
|
-
|
|
61969
|
-
|
|
61970
|
-
|
|
61971
|
-
|
|
61972
|
-
|
|
61973
|
-
|
|
61974
|
-
checkPath = (0, path_1.join)(checkPath, module3, project_spec_1.FileName.Package);
|
|
61811
|
+
async function isReuseLib(projectRoot) {
|
|
61812
|
+
let isReuseLib2 = false;
|
|
61813
|
+
try {
|
|
61814
|
+
const ui5Data = await (0, file_1.readFile)((0, path_1.join)(projectRoot, "ui5.yaml"));
|
|
61815
|
+
const parsedUi5Data = yaml.parse(ui5Data);
|
|
61816
|
+
if ((parsedUi5Data == null ? void 0 : parsedUi5Data.type) === "library") {
|
|
61817
|
+
isReuseLib2 = true;
|
|
61975
61818
|
}
|
|
61976
|
-
|
|
61977
|
-
|
|
61978
|
-
|
|
61819
|
+
} catch {
|
|
61820
|
+
}
|
|
61821
|
+
return isReuseLib2;
|
|
61822
|
+
}
|
|
61823
|
+
exports2.isReuseLib = isReuseLib;
|
|
61824
|
+
async function isFioriElement(appRoot) {
|
|
61825
|
+
let isFioriElement2 = false;
|
|
61826
|
+
try {
|
|
61827
|
+
const appPckJson = await (0, file_1.readJSON)((0, path_1.join)(appRoot, project_spec_1.FileName.Package));
|
|
61828
|
+
if (appPckJson.sapux === true) {
|
|
61829
|
+
isFioriElement2 = true;
|
|
61979
61830
|
}
|
|
61980
|
-
|
|
61831
|
+
} catch {
|
|
61981
61832
|
}
|
|
61982
|
-
return
|
|
61833
|
+
return isFioriElement2;
|
|
61834
|
+
}
|
|
61835
|
+
async function getCapAppType(appRoot, projectRoot) {
|
|
61836
|
+
let capAppType = "SAPUI5 freestyle";
|
|
61837
|
+
try {
|
|
61838
|
+
const projectPckJson = await (0, file_1.readJSON)((0, path_1.join)(projectRoot, project_spec_1.FileName.Package));
|
|
61839
|
+
if (!projectPckJson.sapux) {
|
|
61840
|
+
capAppType = "SAPUI5 freestyle";
|
|
61841
|
+
} else if (Array.isArray(projectPckJson.sapux)) {
|
|
61842
|
+
capAppType = projectPckJson.sapux.find((relAppPath) => (0, path_1.join)(projectRoot, ...relAppPath.split(/[/\\]/)) === appRoot) ? "SAP Fiori elements" : "SAPUI5 freestyle";
|
|
61843
|
+
}
|
|
61844
|
+
} catch {
|
|
61845
|
+
}
|
|
61846
|
+
return capAppType;
|
|
61983
61847
|
}
|
|
61984
|
-
exports2.getNodeModulesPath = getNodeModulesPath;
|
|
61985
61848
|
}
|
|
61986
61849
|
});
|
|
61987
61850
|
|
|
@@ -62025,6 +61888,7 @@ var require_types7 = __commonJS({
|
|
|
62025
61888
|
CommonProperties2["AppProgrammingLanguage"] = "cmn.appLanguage";
|
|
62026
61889
|
CommonProperties2["TemplateId"] = "cmn.templateId";
|
|
62027
61890
|
CommonProperties2["TemplateVersion"] = "cmn.templateVersion";
|
|
61891
|
+
CommonProperties2["ApplicationType"] = "cmn.applicationType";
|
|
62028
61892
|
})(CommonProperties = exports2.CommonProperties || (exports2.CommonProperties = {}));
|
|
62029
61893
|
}
|
|
62030
61894
|
});
|
|
@@ -62241,6 +62105,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
62241
62105
|
const odataSource = await getODataSource(appPath);
|
|
62242
62106
|
const sourceTemplate = await getManifestSourceTemplate(appPath);
|
|
62243
62107
|
const appProgrammingLanguage = await (0, utils_1.getAppProgrammingLanguage)(appPath);
|
|
62108
|
+
const applicationType = await (0, utils_1.getAppType)(appPath, appPath);
|
|
62244
62109
|
const output3 = {};
|
|
62245
62110
|
output3[types_1.CommonProperties.TemplateType] = templateType;
|
|
62246
62111
|
output3[types_1.CommonProperties.DeployTargetType] = deployTarget;
|
|
@@ -62249,6 +62114,7 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
62249
62114
|
output3[types_1.CommonProperties.AppProgrammingLanguage] = appProgrammingLanguage;
|
|
62250
62115
|
output3[types_1.CommonProperties.TemplateId] = sourceTemplate.id;
|
|
62251
62116
|
output3[types_1.CommonProperties.TemplateVersion] = sourceTemplate.version;
|
|
62117
|
+
output3[types_1.CommonProperties.ApplicationType] = applicationType;
|
|
62252
62118
|
return output3;
|
|
62253
62119
|
}
|
|
62254
62120
|
async function getTemplateType(appPath) {
|
|
@@ -62384,6 +62250,202 @@ var require_toolsSuiteTelemetryDataProcessor = __commonJS({
|
|
|
62384
62250
|
}
|
|
62385
62251
|
});
|
|
62386
62252
|
|
|
62253
|
+
// ../lib/telemetry/dist/src/client/model/EventName.js
|
|
62254
|
+
var require_EventName = __commonJS({
|
|
62255
|
+
"../lib/telemetry/dist/src/client/model/EventName.js"(exports2) {
|
|
62256
|
+
"use strict";
|
|
62257
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
62258
|
+
exports2.EventName = void 0;
|
|
62259
|
+
var EventName2;
|
|
62260
|
+
(function(EventName3) {
|
|
62261
|
+
EventName3["Test"] = "test";
|
|
62262
|
+
EventName3["TELEMETRY_SETTINGS_INIT_FAILED"] = "TELEMETRY_SETTINGS_INIT_FAILED";
|
|
62263
|
+
EventName3["DISABLE_TELEMETRY"] = "DISABLE_TELEMETRY";
|
|
62264
|
+
EventName3["GD_GUIDE_ACTION"] = "GUIDE_ACTION";
|
|
62265
|
+
EventName3["GD_PANEL_LOAD"] = "PANEL_LOAD";
|
|
62266
|
+
EventName3["GD_LAUNCH"] = "LAUNCH_GD";
|
|
62267
|
+
EventName3["GD_SIDE_BY_SIDE"] = "GD_SIDE_BY_SIDE";
|
|
62268
|
+
EventName3["GD_WIZARD"] = "GD_WIZARD";
|
|
62269
|
+
EventName3["GD_DESCMODE"] = "GD_DESCMODE";
|
|
62270
|
+
EventName3["GD_PROJECTVIEW"] = "GD_PROJECTVIEW";
|
|
62271
|
+
EventName3["PAGEMAP"] = "PAGEMAP";
|
|
62272
|
+
EventName3["APP_ACTIONS"] = "ACTIONS";
|
|
62273
|
+
EventName3["PAGE_EDITOR"] = "PAGE_EDITOR";
|
|
62274
|
+
EventName3["PAGEMAP_STARTUP_TIME"] = "PAGEMAP_STARTUP_TIME";
|
|
62275
|
+
EventName3["APPLICATION_PREVIEW"] = "APPLICATION_PREVIEW";
|
|
62276
|
+
EventName3["APP_INFO_COMMAND_STARTED"] = "APP_INFO_COMMAND_STARTED";
|
|
62277
|
+
EventName3["APP_INFO_LINK_CLICKED"] = "APP_INFO_LINK_CLICKED";
|
|
62278
|
+
EventName3["APP_INFO_STARTUP_TIME"] = "APP_INFO_STARTUP_TIME";
|
|
62279
|
+
EventName3["SERVICE_MODELER_EVENT"] = "SERVICE_MODELER_EVENT";
|
|
62280
|
+
EventName3["ANNOTATION_FILE_MANAGER_EVENT"] = "ANNOTATION_FILE_MANAGER_EVENT";
|
|
62281
|
+
EventName3["ANNOTATION_LSP_XML_LOAD"] = "ANNOTATION_LSP_XML_LOAD";
|
|
62282
|
+
EventName3["ANNOTATION_LSP_USAGE_TERM"] = "ANNOTATION_LSP_USAGE_TERM";
|
|
62283
|
+
EventName3["ANNOTATION_LSP_CODE_COMPLETION"] = "ANNOTATION_LSP_CODE_COMPLETION";
|
|
62284
|
+
EventName3["MIGRATION_ACTIVATED"] = "MIGRATION_ACTIVATED";
|
|
62285
|
+
EventName3["MIGRATION_BACKEND_LOAD"] = "MIGRATION_BACKEND_LOAD";
|
|
62286
|
+
EventName3["MIGRATION_REFRESH_BACKEND_LOAD"] = "MIGRATION_REFRESH_BACKEND_LOAD";
|
|
62287
|
+
EventName3["MIGRATION_BACK_BACKEND_LOAD"] = "MIGRATION_BACK_BACKEND_LOAD";
|
|
62288
|
+
EventName3["MIGRATION_COMPLETED"] = "MIGRATION_COMPLETED";
|
|
62289
|
+
EventName3["MIGRATION_SUCCESS"] = "MIGRATION_SUCCESS";
|
|
62290
|
+
EventName3["MIGRATION_FAILED"] = "MIGRATION_FAILED";
|
|
62291
|
+
EventName3["MIGRATION_SHOW_INFO_PAGE"] = "MIGRATION_SHOW_INFO_PAGE";
|
|
62292
|
+
EventName3["MIGRATION_ADD_PROJECT"] = "MIGRATION_ADD_PROJECT";
|
|
62293
|
+
EventName3["DEPLOY_CONFIG"] = "DEPLOY_CONFIG";
|
|
62294
|
+
EventName3["DEPLOY"] = "DEPLOY";
|
|
62295
|
+
EventName3["DEPLOY_FAIL"] = "DEPLOY_FAIL";
|
|
62296
|
+
EventName3["UNDEPLOY"] = "UNDEPLOY";
|
|
62297
|
+
EventName3["UNDEPLOY_FAIL"] = "UNDEPLOY_FAIL";
|
|
62298
|
+
EventName3["DATA_EDITOR_EVENT"] = "DATA_EDITOR_EVENT";
|
|
62299
|
+
EventName3["CPE_EVENT"] = "CONTROL_PROPERTY_EDITOR_EVENT";
|
|
62300
|
+
EventName3["SYSTEM_DETAILS_VIEW_EVENT"] = "SYSTEM_DETAILS_VIEW_EVENT";
|
|
62301
|
+
EventName3["SERVICE_INQUIRER_BAS_SUCCESS"] = "SERVICE_INQUIRER_BAS_SUCCESS";
|
|
62302
|
+
EventName3["SERVICE_INQUIRER_BAS_ERROR"] = "SERVICE_INQUIRER_BAS_ERROR";
|
|
62303
|
+
EventName3["LIB_REFERENCE_ADDED"] = "LIB_REFERENCE_ADDED";
|
|
62304
|
+
})(EventName2 = exports2.EventName || (exports2.EventName = {}));
|
|
62305
|
+
}
|
|
62306
|
+
});
|
|
62307
|
+
|
|
62308
|
+
// ../lib/telemetry/dist/src/util/reporting.js
|
|
62309
|
+
var require_reporting = __commonJS({
|
|
62310
|
+
"../lib/telemetry/dist/src/util/reporting.js"(exports2) {
|
|
62311
|
+
"use strict";
|
|
62312
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
62313
|
+
if (k2 === void 0)
|
|
62314
|
+
k2 = k;
|
|
62315
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
62316
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
62317
|
+
desc = { enumerable: true, get: function() {
|
|
62318
|
+
return m[k];
|
|
62319
|
+
} };
|
|
62320
|
+
}
|
|
62321
|
+
Object.defineProperty(o, k2, desc);
|
|
62322
|
+
} : function(o, m, k, k2) {
|
|
62323
|
+
if (k2 === void 0)
|
|
62324
|
+
k2 = k;
|
|
62325
|
+
o[k2] = m[k];
|
|
62326
|
+
});
|
|
62327
|
+
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
62328
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
62329
|
+
} : function(o, v) {
|
|
62330
|
+
o["default"] = v;
|
|
62331
|
+
});
|
|
62332
|
+
var __importStar = exports2 && exports2.__importStar || function(mod) {
|
|
62333
|
+
if (mod && mod.__esModule)
|
|
62334
|
+
return mod;
|
|
62335
|
+
var result2 = {};
|
|
62336
|
+
if (mod != null) {
|
|
62337
|
+
for (var k in mod)
|
|
62338
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
62339
|
+
__createBinding(result2, mod, k);
|
|
62340
|
+
}
|
|
62341
|
+
__setModuleDefault(result2, mod);
|
|
62342
|
+
return result2;
|
|
62343
|
+
};
|
|
62344
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
62345
|
+
exports2.reportEnableTelemetryOnOff = exports2.reportRuntimeError = void 0;
|
|
62346
|
+
var EventName_1 = require_EventName();
|
|
62347
|
+
var appInsights = __importStar(require_applicationinsights());
|
|
62348
|
+
var telemetryPackageJSON = __importStar(require_package());
|
|
62349
|
+
var telemetryClientConfig_1 = require_telemetryClientConfig();
|
|
62350
|
+
var parseErrorStack = (errorStack) => {
|
|
62351
|
+
const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
|
|
62352
|
+
const parsedStack = [];
|
|
62353
|
+
const filtered = errorStack.split("\n").filter((line) => !!line.match(/^\s*at .*(\S+:\d+|\(native\))/m));
|
|
62354
|
+
if (!filtered.length) {
|
|
62355
|
+
return parsedStack;
|
|
62356
|
+
}
|
|
62357
|
+
filtered.forEach((line) => {
|
|
62358
|
+
let sanitizedLine = line.replace(/^\s+/, "");
|
|
62359
|
+
const location = line.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
62360
|
+
if (!location) {
|
|
62361
|
+
return;
|
|
62362
|
+
}
|
|
62363
|
+
let filepath = null;
|
|
62364
|
+
const normalizedFilepath = location[2].replace(/\\/g, "/");
|
|
62365
|
+
for (const regexp of regexps) {
|
|
62366
|
+
const match = normalizedFilepath.match(regexp);
|
|
62367
|
+
if (match) {
|
|
62368
|
+
filepath = match[0];
|
|
62369
|
+
break;
|
|
62370
|
+
}
|
|
62371
|
+
}
|
|
62372
|
+
if (!filepath) {
|
|
62373
|
+
return;
|
|
62374
|
+
}
|
|
62375
|
+
sanitizedLine = sanitizedLine.replace(location[0], "");
|
|
62376
|
+
const functionName = sanitizedLine.split(/\s+/).slice(1).join("");
|
|
62377
|
+
const lineNumber = location[3];
|
|
62378
|
+
const columnNumber = location[4];
|
|
62379
|
+
const parsedStackLine = `${functionName} at (${filepath}:${lineNumber}:${columnNumber});`;
|
|
62380
|
+
parsedStack.push(parsedStackLine);
|
|
62381
|
+
});
|
|
62382
|
+
return parsedStack;
|
|
62383
|
+
};
|
|
62384
|
+
var reportingTelemetryClient;
|
|
62385
|
+
var _a2;
|
|
62386
|
+
if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
|
|
62387
|
+
reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
|
|
62388
|
+
(0, telemetryClientConfig_1.configAzureTelemetryClient)(reportingTelemetryClient);
|
|
62389
|
+
}
|
|
62390
|
+
var reportRuntimeError = (error3) => {
|
|
62391
|
+
const properties = { message: error3.message };
|
|
62392
|
+
if (error3.stack) {
|
|
62393
|
+
const parsedStack = parseErrorStack(error3.stack);
|
|
62394
|
+
if (parsedStack.length) {
|
|
62395
|
+
properties.stack = parsedStack.join(" \n");
|
|
62396
|
+
}
|
|
62397
|
+
}
|
|
62398
|
+
const telemetryEvent = {
|
|
62399
|
+
name: EventName_1.EventName.TELEMETRY_SETTINGS_INIT_FAILED,
|
|
62400
|
+
properties,
|
|
62401
|
+
measurements: {}
|
|
62402
|
+
};
|
|
62403
|
+
if (process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY !== "true") {
|
|
62404
|
+
reportingTelemetryClient.trackEvent(telemetryEvent);
|
|
62405
|
+
}
|
|
62406
|
+
};
|
|
62407
|
+
exports2.reportRuntimeError = reportRuntimeError;
|
|
62408
|
+
var reportEnableTelemetryOnOff = (enableTelemetry, commonProperties) => {
|
|
62409
|
+
const telemetryEvent = {
|
|
62410
|
+
name: EventName_1.EventName.DISABLE_TELEMETRY,
|
|
62411
|
+
properties: {
|
|
62412
|
+
disableTelemetry: `${!enableTelemetry}`,
|
|
62413
|
+
...commonProperties
|
|
62414
|
+
},
|
|
62415
|
+
measurements: {}
|
|
62416
|
+
};
|
|
62417
|
+
if (process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY !== "true") {
|
|
62418
|
+
reportingTelemetryClient.trackEvent(telemetryEvent);
|
|
62419
|
+
}
|
|
62420
|
+
};
|
|
62421
|
+
exports2.reportEnableTelemetryOnOff = reportEnableTelemetryOnOff;
|
|
62422
|
+
}
|
|
62423
|
+
});
|
|
62424
|
+
|
|
62425
|
+
// ../lib/telemetry/dist/src/util/cloudDebugger.js
|
|
62426
|
+
var require_cloudDebugger = __commonJS({
|
|
62427
|
+
"../lib/telemetry/dist/src/util/cloudDebugger.js"(exports2) {
|
|
62428
|
+
"use strict";
|
|
62429
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
62430
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
62431
|
+
};
|
|
62432
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
62433
|
+
exports2.debug = void 0;
|
|
62434
|
+
var fs_1 = __importDefault(require("fs"));
|
|
62435
|
+
var os_1 = __importDefault(require("os"));
|
|
62436
|
+
var path_1 = __importDefault(require("path"));
|
|
62437
|
+
var homedir = os_1.default.homedir();
|
|
62438
|
+
var debugFilePath = path_1.default.join(homedir, "theiadebug.txt");
|
|
62439
|
+
var debug = (message, active = false) => {
|
|
62440
|
+
if (active) {
|
|
62441
|
+
fs_1.default.appendFileSync(debugFilePath, `${message}
|
|
62442
|
+
`, "utf8");
|
|
62443
|
+
}
|
|
62444
|
+
};
|
|
62445
|
+
exports2.debug = debug;
|
|
62446
|
+
}
|
|
62447
|
+
});
|
|
62448
|
+
|
|
62387
62449
|
// ../lib/telemetry/node_modules/@sap-ux/store/dist/constants.js
|
|
62388
62450
|
var require_constants6 = __commonJS({
|
|
62389
62451
|
"../lib/telemetry/node_modules/@sap-ux/store/dist/constants.js"(exports2) {
|
|
@@ -70505,9 +70567,9 @@ var require_levels = __commonJS({
|
|
|
70505
70567
|
"../../node_modules/logform/levels.js"(exports2, module2) {
|
|
70506
70568
|
"use strict";
|
|
70507
70569
|
var { Colorizer } = require_colorize();
|
|
70508
|
-
module2.exports = (
|
|
70509
|
-
Colorizer.addColors(
|
|
70510
|
-
return
|
|
70570
|
+
module2.exports = (config) => {
|
|
70571
|
+
Colorizer.addColors(config.colors || config);
|
|
70572
|
+
return config;
|
|
70511
70573
|
};
|
|
70512
70574
|
}
|
|
70513
70575
|
});
|
|
@@ -78864,7 +78926,7 @@ var require_logger = __commonJS({
|
|
|
78864
78926
|
var LegacyTransportStream = require_legacy();
|
|
78865
78927
|
var Profiler = require_profiler();
|
|
78866
78928
|
var { warn: warn3 } = require_common8();
|
|
78867
|
-
var
|
|
78929
|
+
var config = require_config3();
|
|
78868
78930
|
var formatRegExp = /%[scdjifoO%]/g;
|
|
78869
78931
|
var Logger3 = class extends Transform {
|
|
78870
78932
|
constructor(options2) {
|
|
@@ -78909,7 +78971,7 @@ var require_logger = __commonJS({
|
|
|
78909
78971
|
this.silent = silent;
|
|
78910
78972
|
this.format = format2 || this.format || require_json()();
|
|
78911
78973
|
this.defaultMeta = defaultMeta || null;
|
|
78912
|
-
this.levels = levels || this.levels ||
|
|
78974
|
+
this.levels = levels || this.levels || config.npm.levels;
|
|
78913
78975
|
this.level = level;
|
|
78914
78976
|
if (this.exceptions) {
|
|
78915
78977
|
this.exceptions.unhandle();
|
|
@@ -79219,14 +79281,14 @@ var require_create_logger = __commonJS({
|
|
|
79219
79281
|
"../../node_modules/winston/lib/winston/create-logger.js"(exports2, module2) {
|
|
79220
79282
|
"use strict";
|
|
79221
79283
|
var { LEVEL } = require_triple_beam();
|
|
79222
|
-
var
|
|
79284
|
+
var config = require_config3();
|
|
79223
79285
|
var Logger3 = require_logger();
|
|
79224
79286
|
var debug = require_node5()("winston:create-logger");
|
|
79225
79287
|
function isLevelEnabledFunctionName(level) {
|
|
79226
79288
|
return "is" + level.charAt(0).toUpperCase() + level.slice(1) + "Enabled";
|
|
79227
79289
|
}
|
|
79228
79290
|
module2.exports = function(opts = {}) {
|
|
79229
|
-
opts.levels = opts.levels ||
|
|
79291
|
+
opts.levels = opts.levels || config.npm.levels;
|
|
79230
79292
|
class DerivedLogger extends Logger3 {
|
|
79231
79293
|
constructor(options2) {
|
|
79232
79294
|
super(options2);
|
|
@@ -80248,7 +80310,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
80248
80310
|
exports2.initTelemetrySettings = exports2.getTelemetrySetting = exports2.setEnableTelemetry = void 0;
|
|
80249
80311
|
var reporting_1 = require_reporting();
|
|
80250
80312
|
var cloudDebugger_1 = require_cloudDebugger();
|
|
80251
|
-
var system_1 =
|
|
80313
|
+
var system_1 = require_system();
|
|
80252
80314
|
var store_1 = require_dist13();
|
|
80253
80315
|
var ux_common_utils_1 = require_dist();
|
|
80254
80316
|
var os_1 = __importDefault(require("os"));
|
|
@@ -80361,11 +80423,7 @@ var require_toolsSuiteTelemetrySettings = __commonJS({
|
|
|
80361
80423
|
};
|
|
80362
80424
|
var initTelemetrySettings3 = async (options2) => {
|
|
80363
80425
|
try {
|
|
80364
|
-
|
|
80365
|
-
await initWithInputManifest(options2);
|
|
80366
|
-
} else {
|
|
80367
|
-
await initToolsSuiteTelemetrySettings();
|
|
80368
|
-
}
|
|
80426
|
+
await initWithInputManifest(options2);
|
|
80369
80427
|
} catch (err) {
|
|
80370
80428
|
(0, reporting_1.reportRuntimeError)(err);
|
|
80371
80429
|
}
|
|
@@ -80448,8 +80506,8 @@ var require_client3 = __commonJS({
|
|
|
80448
80506
|
};
|
|
80449
80507
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
80450
80508
|
exports2.ClientFactory = void 0;
|
|
80451
|
-
var system_1 =
|
|
80452
|
-
var telemetryPackageJSON = __importStar(
|
|
80509
|
+
var system_1 = require_system();
|
|
80510
|
+
var telemetryPackageJSON = __importStar(require_package());
|
|
80453
80511
|
var toolsSuiteTelemetry_1 = require_toolsSuiteTelemetry();
|
|
80454
80512
|
var ClientFactory2 = class {
|
|
80455
80513
|
static getTelemetryClient() {
|
|
@@ -80914,7 +80972,7 @@ var require_src8 = __commonJS({
|
|
|
80914
80972
|
Object.defineProperty(exports2, "ApplicationInsightClient", { enumerable: true, get: function() {
|
|
80915
80973
|
return appInsightClient_1.ApplicationInsightClient;
|
|
80916
80974
|
} });
|
|
80917
|
-
var system_1 =
|
|
80975
|
+
var system_1 = require_system();
|
|
80918
80976
|
Object.defineProperty(exports2, "TelemetrySystem", { enumerable: true, get: function() {
|
|
80919
80977
|
return system_1.TelemetrySystem;
|
|
80920
80978
|
} });
|
|
@@ -85225,78 +85283,6 @@ var require_logger4 = __commonJS({
|
|
|
85225
85283
|
}
|
|
85226
85284
|
});
|
|
85227
85285
|
|
|
85228
|
-
// ../../node_modules/dotenv/lib/main.js
|
|
85229
|
-
var require_main = __commonJS({
|
|
85230
|
-
"../../node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
85231
|
-
var fs2 = require("fs");
|
|
85232
|
-
var path = require("path");
|
|
85233
|
-
function log4(message) {
|
|
85234
|
-
console.log(`[dotenv][DEBUG] ${message}`);
|
|
85235
|
-
}
|
|
85236
|
-
var NEWLINE = "\n";
|
|
85237
|
-
var RE_INI_KEY_VAL = /^\s*([\w.-]+)\s*=\s*(.*)?\s*$/;
|
|
85238
|
-
var RE_NEWLINES = /\\n/g;
|
|
85239
|
-
var NEWLINES_MATCH = /\n|\r|\r\n/;
|
|
85240
|
-
function parse2(src, options2) {
|
|
85241
|
-
const debug = Boolean(options2 && options2.debug);
|
|
85242
|
-
const obj = {};
|
|
85243
|
-
src.toString().split(NEWLINES_MATCH).forEach(function(line, idx) {
|
|
85244
|
-
const keyValueArr = line.match(RE_INI_KEY_VAL);
|
|
85245
|
-
if (keyValueArr != null) {
|
|
85246
|
-
const key = keyValueArr[1];
|
|
85247
|
-
let val2 = keyValueArr[2] || "";
|
|
85248
|
-
const end = val2.length - 1;
|
|
85249
|
-
const isDoubleQuoted = val2[0] === '"' && val2[end] === '"';
|
|
85250
|
-
const isSingleQuoted = val2[0] === "'" && val2[end] === "'";
|
|
85251
|
-
if (isSingleQuoted || isDoubleQuoted) {
|
|
85252
|
-
val2 = val2.substring(1, end);
|
|
85253
|
-
if (isDoubleQuoted) {
|
|
85254
|
-
val2 = val2.replace(RE_NEWLINES, NEWLINE);
|
|
85255
|
-
}
|
|
85256
|
-
} else {
|
|
85257
|
-
val2 = val2.trim();
|
|
85258
|
-
}
|
|
85259
|
-
obj[key] = val2;
|
|
85260
|
-
} else if (debug) {
|
|
85261
|
-
log4(`did not match key and value when parsing line ${idx + 1}: ${line}`);
|
|
85262
|
-
}
|
|
85263
|
-
});
|
|
85264
|
-
return obj;
|
|
85265
|
-
}
|
|
85266
|
-
function config2(options2) {
|
|
85267
|
-
let dotenvPath = path.resolve(process.cwd(), ".env");
|
|
85268
|
-
let encoding = "utf8";
|
|
85269
|
-
let debug = false;
|
|
85270
|
-
if (options2) {
|
|
85271
|
-
if (options2.path != null) {
|
|
85272
|
-
dotenvPath = options2.path;
|
|
85273
|
-
}
|
|
85274
|
-
if (options2.encoding != null) {
|
|
85275
|
-
encoding = options2.encoding;
|
|
85276
|
-
}
|
|
85277
|
-
if (options2.debug != null) {
|
|
85278
|
-
debug = true;
|
|
85279
|
-
}
|
|
85280
|
-
}
|
|
85281
|
-
try {
|
|
85282
|
-
const parsed = parse2(fs2.readFileSync(dotenvPath, { encoding }), { debug });
|
|
85283
|
-
Object.keys(parsed).forEach(function(key) {
|
|
85284
|
-
if (!Object.prototype.hasOwnProperty.call(process.env, key)) {
|
|
85285
|
-
process.env[key] = parsed[key];
|
|
85286
|
-
} else if (debug) {
|
|
85287
|
-
log4(`"${key}" is already defined in \`process.env\` and will not be overwritten`);
|
|
85288
|
-
}
|
|
85289
|
-
});
|
|
85290
|
-
return { parsed };
|
|
85291
|
-
} catch (e) {
|
|
85292
|
-
return { error: e };
|
|
85293
|
-
}
|
|
85294
|
-
}
|
|
85295
|
-
module2.exports.config = config2;
|
|
85296
|
-
module2.exports.parse = parse2;
|
|
85297
|
-
}
|
|
85298
|
-
});
|
|
85299
|
-
|
|
85300
85286
|
// node_modules/@sap-ux/btp-utils/dist/app-studio.env.js
|
|
85301
85287
|
var require_app_studio_env = __commonJS({
|
|
85302
85288
|
"node_modules/@sap-ux/btp-utils/dist/app-studio.env.js"(exports2) {
|
|
@@ -85835,7 +85821,7 @@ var import_yaml2 = __toESM(require_dist2());
|
|
|
85835
85821
|
var package_default = {
|
|
85836
85822
|
name: "@sap/ux-ui5-tooling",
|
|
85837
85823
|
displayName: "SAP Fiori Tools \u2013 UI5 Tooling",
|
|
85838
|
-
version: "1.10.
|
|
85824
|
+
version: "1.10.5",
|
|
85839
85825
|
description: "SAP Fiori Tools \u2013 UI5 Tooling",
|
|
85840
85826
|
publisher: "SAPSE",
|
|
85841
85827
|
license: "SEE LICENSE IN LICENSE",
|
|
@@ -85870,6 +85856,7 @@ var package_default = {
|
|
|
85870
85856
|
madge: "madge --warning --circular --extensions ts ./"
|
|
85871
85857
|
},
|
|
85872
85858
|
dependencies: {
|
|
85859
|
+
"@sap-ux/preview-middleware": "0.3.3",
|
|
85873
85860
|
"@ui5/fs": "^2.0.6",
|
|
85874
85861
|
debug: "4.3.4",
|
|
85875
85862
|
express: "4.17.3",
|
|
@@ -85883,19 +85870,19 @@ var package_default = {
|
|
|
85883
85870
|
devDependencies: {
|
|
85884
85871
|
"@sap-ux/backend-proxy-middleware": "0.6.57",
|
|
85885
85872
|
"@sap-ux/btp-utils": "0.11.6",
|
|
85886
|
-
"@sap-ux/deploy-tooling": "0.
|
|
85873
|
+
"@sap-ux/deploy-tooling": "0.9.1",
|
|
85887
85874
|
"@sap-ux/logger": "0.3.6",
|
|
85888
85875
|
"@sap-ux/store": "0.3.11",
|
|
85889
85876
|
"@sap-ux/ui5-config": "0.18.2",
|
|
85890
85877
|
"@sap-ux/ui5-proxy-middleware": "1.1.31",
|
|
85891
|
-
"@sap/ux-app-templates": "1.10.
|
|
85892
|
-
"@sap/ux-cds": "1.10.
|
|
85893
|
-
"@sap/ux-common-utils": "1.10.
|
|
85894
|
-
"@sap/ux-control-property-editor": "1.10.
|
|
85895
|
-
"@sap/ux-odata-client": "1.10.
|
|
85896
|
-
"@sap/ux-telemetry": "1.10.
|
|
85897
|
-
"@sap/ux-ui5-info": "1.10.
|
|
85898
|
-
"@sapux/project-spec": "1.10.
|
|
85878
|
+
"@sap/ux-app-templates": "1.10.5",
|
|
85879
|
+
"@sap/ux-cds": "1.10.5",
|
|
85880
|
+
"@sap/ux-common-utils": "1.10.5",
|
|
85881
|
+
"@sap/ux-control-property-editor": "1.10.5",
|
|
85882
|
+
"@sap/ux-odata-client": "1.10.5",
|
|
85883
|
+
"@sap/ux-telemetry": "1.10.5",
|
|
85884
|
+
"@sap/ux-ui5-info": "1.10.5",
|
|
85885
|
+
"@sapux/project-spec": "1.10.5",
|
|
85899
85886
|
"@types/marked": "4.0.1",
|
|
85900
85887
|
"@types/prompts": "2.0.14",
|
|
85901
85888
|
"@types/supertest": "2.0.12",
|
|
@@ -85966,9 +85953,6 @@ var package_default = {
|
|
|
85966
85953
|
}
|
|
85967
85954
|
};
|
|
85968
85955
|
|
|
85969
|
-
// src/utils/config.ts
|
|
85970
|
-
var import_dotenv = __toESM(require_main());
|
|
85971
|
-
|
|
85972
85956
|
// src/utils/constants.ts
|
|
85973
85957
|
var cliParamMap = {
|
|
85974
85958
|
"-c": "config",
|
|
@@ -85990,6 +85974,8 @@ var cliParamMap = {
|
|
|
85990
85974
|
"-ss": "strict-ssl",
|
|
85991
85975
|
"-tm": "testMode",
|
|
85992
85976
|
"-vb": "verbose",
|
|
85977
|
+
"-ur": "username",
|
|
85978
|
+
"-pw": "password",
|
|
85993
85979
|
"-uu": "uaa-url",
|
|
85994
85980
|
"-un": "uaa-username",
|
|
85995
85981
|
"-up": "uaa-password",
|