@intuitionrobotics/bug-report 0.41.69 → 0.41.72
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/app-backend/api/_bug-report.js +1 -1
- package/app-backend/api/_bug-report.js.map +1 -1
- package/app-backend/api/v1/bug-reports/download.js +11 -55
- package/app-backend/api/v1/bug-reports/download.js.map +1 -1
- package/app-backend/api/v1/bug-reports/get-logs.js +10 -54
- package/app-backend/api/v1/bug-reports/get-logs.js.map +1 -1
- package/app-backend/api/v1/bug-reports/reports.js +12 -62
- package/app-backend/api/v1/bug-reports/reports.js.map +1 -1
- package/app-backend/core/module-pack.js +6 -6
- package/app-backend/core/module-pack.js.map +1 -1
- package/app-backend/modules/AdminBRModule.js +16 -70
- package/app-backend/modules/AdminBRModule.js.map +1 -1
- package/app-backend/modules/BugReportModule.js +45 -115
- package/app-backend/modules/BugReportModule.js.map +1 -1
- package/app-backend/modules/JiraBugReportIntegrator.js +24 -75
- package/app-backend/modules/JiraBugReportIntegrator.js.map +1 -1
- package/app-backend/modules/SlackBugReportIntegrator.js +24 -75
- package/app-backend/modules/SlackBugReportIntegrator.js.map +1 -1
- package/app-frontend/core/module-pack.js +2 -2
- package/app-frontend/core/module-pack.js.map +1 -1
- package/app-frontend/modules/AdminBRModule.js +22 -68
- package/app-frontend/modules/AdminBRModule.js.map +1 -1
- package/app-frontend/modules/BugReportModule.js +25 -41
- package/app-frontend/modules/BugReportModule.js.map +1 -1
- package/app-frontend/ui/AdminBR.js +15 -31
- package/app-frontend/ui/AdminBR.js.map +1 -1
- package/app-frontend/ui/BugReport.js +30 -46
- package/app-frontend/ui/BugReport.js.map +1 -1
- package/app-frontend/ui/Dialog_JiraOpened.js +15 -32
- package/app-frontend/ui/Dialog_JiraOpened.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugReportModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/BugReportModule.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AAC;QAC9E,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;IAC1C,CAAC;IAED,gBAAgB,CAAC,aAA+B;QAC/C,0BAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;IACvD,CAAC;CAuCD;AAvDD,sDAuDC;AAEY,QAAA,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC"}
|
|
@@ -17,19 +17,6 @@
|
|
|
17
17
|
* See the License for the specific language governing permissions and
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
|
-
var __extends = (this && this.__extends) || (function () {
|
|
21
|
-
var extendStatics = function (d, b) {
|
|
22
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
25
|
-
return extendStatics(d, b);
|
|
26
|
-
};
|
|
27
|
-
return function (d, b) {
|
|
28
|
-
extendStatics(d, b);
|
|
29
|
-
function __() { this.constructor = d; }
|
|
30
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
20
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
21
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
22
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -39,72 +26,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
39
26
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
27
|
});
|
|
41
28
|
};
|
|
42
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
43
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
44
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
45
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
|
-
function step(op) {
|
|
47
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (_) try {
|
|
49
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
|
-
switch (op[0]) {
|
|
52
|
-
case 0: case 1: t = op; break;
|
|
53
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
54
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
55
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
56
|
-
default:
|
|
57
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
58
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
59
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
60
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
61
|
-
if (t[2]) _.ops.pop();
|
|
62
|
-
_.trys.pop(); continue;
|
|
63
|
-
}
|
|
64
|
-
op = body.call(thisArg, _);
|
|
65
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
66
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
30
|
exports.JiraBugReportIntegrator = exports.JiraBugReportIntegrator_Class = void 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (reporter)
|
|
93
|
-
description.push("\nReported by: " + reporter);
|
|
94
|
-
return [4 /*yield*/, jira_1.JiraModule.issue.create(this.config.jiraProject, this.config.issueType, this.parser(bugReport.subject), description, this.config.label.label)];
|
|
95
|
-
case 1:
|
|
96
|
-
issue = _a.sent();
|
|
97
|
-
return [2 /*return*/, { platform: __1.Platform_Jira, issueId: issue.url }];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}); };
|
|
101
|
-
return _this;
|
|
31
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
+
const jira_1 = require("@intuitionrobotics/jira");
|
|
33
|
+
const __1 = require("../..");
|
|
34
|
+
class JiraBugReportIntegrator_Class extends ts_common_1.Module {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.parser = (name) => `Bug: ${name}`;
|
|
38
|
+
this.openTicket = (bugReport, logs, reporter) => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
if (bugReport.platforms && !bugReport.platforms.includes(__1.Platform_Jira))
|
|
40
|
+
return;
|
|
41
|
+
if (!this.config.jiraProject)
|
|
42
|
+
throw new ts_common_1.ImplementationMissingException("missing Jira project in bug report configurations");
|
|
43
|
+
const description = logs.reduce((carry, log, i) => {
|
|
44
|
+
carry.push({ href: log.path, text: "\nClick to view logs (" + i + ")" });
|
|
45
|
+
return carry;
|
|
46
|
+
}, [bugReport.description]);
|
|
47
|
+
if (reporter)
|
|
48
|
+
description.push("\nReported by: " + reporter);
|
|
49
|
+
const issue = yield jira_1.JiraModule.issue.create(this.config.jiraProject, this.config.issueType, this.parser(bugReport.subject), description, this.config.label.label);
|
|
50
|
+
return { platform: __1.Platform_Jira, issueId: issue.url };
|
|
51
|
+
});
|
|
102
52
|
}
|
|
103
|
-
|
|
53
|
+
setIssueTitleProcessor(parser) {
|
|
104
54
|
this.parser = parser;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
}(ts_common_1.Module));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
108
57
|
exports.JiraBugReportIntegrator_Class = JiraBugReportIntegrator_Class;
|
|
109
58
|
exports.JiraBugReportIntegrator = new JiraBugReportIntegrator_Class();
|
|
110
59
|
//# sourceMappingURL=JiraBugReportIntegrator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JiraBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/JiraBugReportIntegrator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"JiraBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/JiraBugReportIntegrator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,4DAGsC;AACtC,kDAMiC;AACjC,6BAIe;AASf,MAAa,6BACZ,SAAQ,kBAAc;IADvB;;QAOS,WAAM,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC;QAElD,eAAU,GAAG,CAAO,SAA4B,EAAE,IAAqB,EAAE,QAAiB,EAAsC,EAAE;YACjI,IAAI,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAa,CAAC;gBACtE,OAAO;YAER,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW;gBAC3B,MAAM,IAAI,0CAA8B,CAAC,mDAAmD,CAAC,CAAC;YAE/F,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAsB,EAAE,GAAkB,EAAE,CAAS,EAAE,EAAE;gBACzF,KAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,wBAAwB,GAAG,CAAC,GAAG,GAAG,EAAC,CAAC,CAAC;gBACvE,OAAO,KAAK,CAAC;YACd,CAAC,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;YAE5B,IAAI,QAAQ;gBACX,WAAW,CAAC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,CAAC;YAEhD,MAAM,KAAK,GAAG,MAAM,iBAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,WAAW,EAC3F,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrE,OAAO,EAAC,QAAQ,EAAE,iBAAa,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,EAAC,CAAC;QACtD,CAAC,CAAA,CAAC;IACH,CAAC;IAzBA,sBAAsB,CAAC,MAAgC;QACtD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;CAuBD;AA5BD,sEA4BC;AAEY,QAAA,uBAAuB,GAAG,IAAI,6BAA6B,EAAE,CAAC"}
|
|
@@ -17,19 +17,6 @@
|
|
|
17
17
|
* See the License for the specific language governing permissions and
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
|
-
var __extends = (this && this.__extends) || (function () {
|
|
21
|
-
var extendStatics = function (d, b) {
|
|
22
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
25
|
-
return extendStatics(d, b);
|
|
26
|
-
};
|
|
27
|
-
return function (d, b) {
|
|
28
|
-
extendStatics(d, b);
|
|
29
|
-
function __() { this.constructor = d; }
|
|
30
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
20
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
21
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
22
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -39,71 +26,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
39
26
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
27
|
});
|
|
41
28
|
};
|
|
42
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
43
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
44
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
45
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
|
-
function step(op) {
|
|
47
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (_) try {
|
|
49
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
|
-
switch (op[0]) {
|
|
52
|
-
case 0: case 1: t = op; break;
|
|
53
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
54
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
55
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
56
|
-
default:
|
|
57
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
58
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
59
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
60
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
61
|
-
if (t[2]) _.ops.pop();
|
|
62
|
-
_.trys.pop(); continue;
|
|
63
|
-
}
|
|
64
|
-
op = body.call(thisArg, _);
|
|
65
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
66
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
30
|
exports.SlackBugReportIntegrator = exports.SlackBugReportIntegrator_Class = void 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
channel: this.config.channel
|
|
95
|
-
};
|
|
96
|
-
return [4 /*yield*/, slack_1.SlackModule.postMessage(slackMessage)];
|
|
97
|
-
case 1:
|
|
98
|
-
_a.sent();
|
|
99
|
-
return [2 /*return*/, { platform: __1.Platform_Slack, issueId: ts_common_1.generateHex(32) }];
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}); };
|
|
103
|
-
return _this;
|
|
31
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
+
const __1 = require("../..");
|
|
33
|
+
const slack_1 = require("@intuitionrobotics/storm/slack");
|
|
34
|
+
class SlackBugReportIntegrator_Class extends ts_common_1.Module {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.openTicket = (bugReport, logs, reporter) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (bugReport.platforms && !bugReport.platforms.includes(__1.Platform_Slack))
|
|
39
|
+
return;
|
|
40
|
+
if (!this.config.channel)
|
|
41
|
+
throw new ts_common_1.ImplementationMissingException("Missing Slack Channel in bug report configurations");
|
|
42
|
+
let description = logs.reduce((carry, log, i) => {
|
|
43
|
+
return carry + "\n" + `<${log.path}|Click to view logs (${i})>`;
|
|
44
|
+
}, bugReport.subject + "\n" + bugReport.description);
|
|
45
|
+
if (reporter)
|
|
46
|
+
description += "\nReported by: " + reporter;
|
|
47
|
+
const slackMessage = {
|
|
48
|
+
text: description,
|
|
49
|
+
channel: this.config.channel
|
|
50
|
+
};
|
|
51
|
+
yield slack_1.SlackModule.postMessage(slackMessage);
|
|
52
|
+
return { platform: __1.Platform_Slack, issueId: ts_common_1.generateHex(32) };
|
|
53
|
+
});
|
|
104
54
|
}
|
|
105
|
-
|
|
106
|
-
}(ts_common_1.Module));
|
|
55
|
+
}
|
|
107
56
|
exports.SlackBugReportIntegrator_Class = SlackBugReportIntegrator_Class;
|
|
108
57
|
exports.SlackBugReportIntegrator = new SlackBugReportIntegrator_Class();
|
|
109
58
|
//# sourceMappingURL=SlackBugReportIntegrator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/SlackBugReportIntegrator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"SlackBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/SlackBugReportIntegrator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,4DAIsC;AACtC,6BAIe;AAEf,0DAA2D;AAM3D,MAAa,8BACZ,SAAQ,kBAAc;IADvB;;QAGC,eAAU,GAAG,CAAO,SAA4B,EAAE,IAAqB,EAAE,QAAiB,EAAsC,EAAE;YACjI,IAAG,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,kBAAc,CAAC;gBACtE,OAAO;YAER,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO;gBACvB,MAAM,IAAI,0CAA8B,CAAC,oDAAoD,CAAC,CAAC;YAEhG,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAa,EAAE,GAAkB,EAAE,CAAS,EAAE,EAAE;gBAC9E,OAAO,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,wBAAwB,CAAC,IAAI,CAAC;YACjE,CAAC,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;YAErD,IAAI,QAAQ;gBACX,WAAW,IAAI,iBAAiB,GAAG,QAAQ,CAAC;YAE7C,MAAM,YAAY,GAAG;gBACpB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;aAC5B,CAAC;YACF,MAAM,mBAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;YAC3C,OAAO,EAAC,QAAQ,EAAE,kBAAc,EAAE,OAAO,EAAE,uBAAW,CAAC,EAAE,CAAC,EAAC,CAAC;QAC7D,CAAC,CAAA,CAAC;IACH,CAAC;CAAA;AAxBD,wEAwBC;AAEY,QAAA,wBAAwB,GAAG,IAAI,8BAA8B,EAAE,CAAC"}
|
|
@@ -29,8 +29,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
exports.Frontend_ModulePack_BugReport = void 0;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const BugReportModule_1 = require("../modules/BugReportModule");
|
|
33
|
+
const AdminBRModule_1 = require("../modules/AdminBRModule");
|
|
34
34
|
exports.Frontend_ModulePack_BugReport = [
|
|
35
35
|
BugReportModule_1.BugReportModule,
|
|
36
36
|
AdminBRModule_1.AdminBRModule
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,gEAA2D;AAC3D,4DAAuD;AAE1C,QAAA,6BAA6B,GAAG;IAC5C,iCAAe;IACf,6BAAa;CACb,CAAC;AAEF,2DAAwC;AACxC,6DAA0C"}
|
|
@@ -17,19 +17,6 @@
|
|
|
17
17
|
* See the License for the specific language governing permissions and
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
|
-
var __extends = (this && this.__extends) || (function () {
|
|
21
|
-
var extendStatics = function (d, b) {
|
|
22
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
25
|
-
return extendStatics(d, b);
|
|
26
|
-
};
|
|
27
|
-
return function (d, b) {
|
|
28
|
-
extendStatics(d, b);
|
|
29
|
-
function __() { this.constructor = d; }
|
|
30
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
20
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
21
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
22
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -39,77 +26,44 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
39
26
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
27
|
});
|
|
41
28
|
};
|
|
42
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
43
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
44
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
45
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
|
-
function step(op) {
|
|
47
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (_) try {
|
|
49
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
|
-
switch (op[0]) {
|
|
52
|
-
case 0: case 1: t = op; break;
|
|
53
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
54
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
55
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
56
|
-
default:
|
|
57
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
58
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
59
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
60
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
61
|
-
if (t[2]) _.ops.pop();
|
|
62
|
-
_.trys.pop(); continue;
|
|
63
|
-
}
|
|
64
|
-
op = body.call(thisArg, _);
|
|
65
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
66
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
30
|
exports.AdminBRModule = exports.AdminBRModule_Class = exports.RequestKey_PostPath = exports.RequestKey_GetLog = void 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
31
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
+
const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
|
|
33
|
+
const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
|
|
74
34
|
exports.RequestKey_GetLog = "GetLog";
|
|
75
35
|
exports.RequestKey_PostPath = "PostPath";
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
_this.logInfo("getting logs from firestore...");
|
|
36
|
+
class AdminBRModule_Class extends ts_common_1.Module {
|
|
37
|
+
constructor() {
|
|
38
|
+
super();
|
|
39
|
+
this.logs = [];
|
|
40
|
+
this.retrieveLogs = () => {
|
|
41
|
+
this.logInfo("getting logs from firestore...");
|
|
83
42
|
frontend_1.XhrHttpModule
|
|
84
43
|
.createRequest(thunderstorm_1.HttpMethod.GET, exports.RequestKey_GetLog)
|
|
85
44
|
.setRelativeUrl("/v1/bug-reports/get-logs")
|
|
86
|
-
.setOnError(
|
|
87
|
-
.execute(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
}); });
|
|
93
|
-
_this.logInfo("continue... will receive an event once request is completed..");
|
|
45
|
+
.setOnError(`Error getting new message from backend`)
|
|
46
|
+
.execute((response) => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
this.logs = response;
|
|
48
|
+
}));
|
|
49
|
+
this.logInfo("continue... will receive an event once request is completed..");
|
|
94
50
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
51
|
+
this.downloadLogs = (path) => {
|
|
52
|
+
this.logInfo("downloading the logs to the client..");
|
|
53
|
+
const bodyObject = { path: path };
|
|
98
54
|
frontend_1.XhrHttpModule
|
|
99
55
|
.createRequest(thunderstorm_1.HttpMethod.POST, exports.RequestKey_PostPath)
|
|
100
56
|
.setJsonBody(bodyObject)
|
|
101
57
|
.setRelativeUrl("/v1/bug-reports/download-logs")
|
|
102
|
-
.setOnError(
|
|
58
|
+
.setOnError(`Error getting new message from backend`)
|
|
103
59
|
.execute();
|
|
104
60
|
};
|
|
105
|
-
|
|
106
|
-
reports.forEach(
|
|
61
|
+
this.downloadMultiLogs = (reports) => {
|
|
62
|
+
reports.forEach(report => this.downloadLogs(report.path));
|
|
107
63
|
};
|
|
108
|
-
|
|
109
|
-
return _this;
|
|
64
|
+
this.getLogs = () => this.logs;
|
|
110
65
|
}
|
|
111
|
-
|
|
112
|
-
}(ts_common_1.Module));
|
|
66
|
+
}
|
|
113
67
|
exports.AdminBRModule_Class = AdminBRModule_Class;
|
|
114
68
|
exports.AdminBRModule = new AdminBRModule_Class();
|
|
115
69
|
//# sourceMappingURL=AdminBRModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminBRModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/AdminBRModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"AdminBRModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/AdminBRModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,4DAAoD;AACpD,uEAAuE;AACvE,kEAA2D;AAS9C,QAAA,iBAAiB,GAAG,QAAQ,CAAC;AAC7B,QAAA,mBAAmB,GAAG,UAAU,CAAC;AAE9C,MAAa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
* See the License for the specific language governing permissions and
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
|
-
var __extends = (this && this.__extends) || (function () {
|
|
21
|
-
var extendStatics = function (d, b) {
|
|
22
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
25
|
-
return extendStatics(d, b);
|
|
26
|
-
};
|
|
27
|
-
return function (d, b) {
|
|
28
|
-
extendStatics(d, b);
|
|
29
|
-
function __() { this.constructor = d; }
|
|
30
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
21
|
exports.BugReportModule = exports.BugReportModule_Class = exports.RequestKey_BugReportApi = void 0;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
23
|
+
const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
|
|
24
|
+
const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
|
|
25
|
+
const api_1 = require("../../shared/api");
|
|
26
|
+
const Dialog_JiraOpened_1 = require("../ui/Dialog_JiraOpened");
|
|
40
27
|
exports.RequestKey_BugReportApi = "BugReport";
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
platforms: platforms
|
|
28
|
+
class BugReportModule_Class extends ts_common_1.Module {
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
this.reports = [];
|
|
32
|
+
this.sendBugReport = (subject, description, platforms) => {
|
|
33
|
+
const body = {
|
|
34
|
+
subject,
|
|
35
|
+
description,
|
|
36
|
+
reports: this.reports.map(report => ({ log: report.buffers, name: report.name })),
|
|
37
|
+
platforms
|
|
52
38
|
};
|
|
53
39
|
frontend_1.XhrHttpModule
|
|
54
40
|
.createRequest(thunderstorm_1.HttpMethod.POST, exports.RequestKey_BugReportApi)
|
|
55
41
|
.setJsonBody(body)
|
|
56
42
|
.setRelativeUrl("/v1/bug-reports/report")
|
|
57
|
-
.setOnError(
|
|
58
|
-
.execute(
|
|
59
|
-
|
|
43
|
+
.setOnError(() => this.logWarning(`Error updating the report`))
|
|
44
|
+
.execute((response) => {
|
|
45
|
+
const jiraTicket = response.find(ticket => ticket.platform === api_1.Platform_Jira);
|
|
60
46
|
if (jiraTicket)
|
|
61
47
|
Dialog_JiraOpened_1.Dialog_JiraOpened.show(jiraTicket.issueId);
|
|
62
48
|
});
|
|
63
49
|
};
|
|
64
|
-
ts_common_1.addItemToArray(
|
|
65
|
-
ts_common_1.addItemToArray(
|
|
66
|
-
.setFilter(
|
|
67
|
-
return _this;
|
|
50
|
+
ts_common_1.addItemToArray(this.reports, new ts_common_1.LogClient_MemBuffer("default"));
|
|
51
|
+
ts_common_1.addItemToArray(this.reports, new ts_common_1.LogClient_MemBuffer("info")
|
|
52
|
+
.setFilter(level => ts_common_1.LogLevelOrdinal.indexOf(level) >= ts_common_1.LogLevelOrdinal.indexOf(ts_common_1.LogLevel.Info)));
|
|
68
53
|
}
|
|
69
|
-
|
|
70
|
-
this.reports.forEach(
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}(ts_common_1.Module));
|
|
54
|
+
init() {
|
|
55
|
+
this.reports.forEach(report => ts_common_1.BeLogged.addClient(report));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
74
58
|
exports.BugReportModule_Class = BugReportModule_Class;
|
|
75
59
|
exports.BugReportModule = new BugReportModule_Class();
|
|
76
60
|
//# sourceMappingURL=BugReportModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugReportModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/BugReportModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"BugReportModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/BugReportModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,4DAOsC;AACtC,uEAAuE;AACvE,kEAA2D;AAC3D,0CAI0B;AAC1B,+DAA0D;AAE7C,QAAA,uBAAuB,GAAG,WAAW,CAAC;AAEnD,MAAa,qBACZ,SAAQ,kBAAM;IAId;QACC,KAAK,EAAE,CAAC;QAHQ,YAAO,GAA0B,EAAE,CAAC;QAarD,kBAAa,GAAG,CAAC,OAAe,EAAE,WAAmB,EAAE,SAAoB,EAAE,EAAE;YAC9E,MAAM,IAAI,GAAsB;gBAC/B,OAAO;gBACP,WAAW;gBACX,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAC,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAC,CAAC,CAAC;gBAC/E,SAAS;aACT,CAAC;YAEF,wBAAa;iBACX,aAAa,CAAe,yBAAU,CAAC,IAAI,EAAE,+BAAuB,CAAC;iBACrE,WAAW,CAAC,IAAI,CAAC;iBACjB,cAAc,CAAC,wBAAwB,CAAC;iBACxC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;iBAC9D,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACrB,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,KAAK,mBAAa,CAAC,CAAC;gBAC9E,IAAG,UAAU;oBACZ,qCAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;YAC5C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QA3BD,0BAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,+BAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;QACjE,0BAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,+BAAmB,CAAC,MAAM,CAAC;aAC1D,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,2BAAe,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,2BAAe,CAAC,OAAO,CAAC,oBAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjG,CAAC;IAES,IAAI;QACb,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,oBAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;CAqBD;AAnCD,sDAmCC;AAEY,QAAA,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC"}
|
|
@@ -17,53 +17,37 @@
|
|
|
17
17
|
* See the License for the specific language governing permissions and
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
|
-
var __extends = (this && this.__extends) || (function () {
|
|
21
|
-
var extendStatics = function (d, b) {
|
|
22
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
25
|
-
return extendStatics(d, b);
|
|
26
|
-
};
|
|
27
|
-
return function (d, b) {
|
|
28
|
-
extendStatics(d, b);
|
|
29
|
-
function __() { this.constructor = d; }
|
|
30
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
21
|
exports.AdminBR = void 0;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_this.createRow = function (report) { return React.createElement("tr", null,
|
|
22
|
+
const React = require("react");
|
|
23
|
+
const AdminBRModule_1 = require("../modules/AdminBRModule");
|
|
24
|
+
const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
|
|
25
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
26
|
+
class AdminBR extends frontend_1.BaseComponent {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.createRow = (report) => React.createElement("tr", null,
|
|
44
30
|
React.createElement("td", { style: { padding: "15px", textAlign: "left", border: "1px solid #ddd", fontSize: "15px" } }, report.description),
|
|
45
31
|
React.createElement("td", { style: { padding: "15px", textAlign: "left", border: "1px solid #ddd", fontSize: "15px" } }, report.reports[0].path),
|
|
46
32
|
React.createElement("td", { style: { padding: "15px", textAlign: "left", border: "1px solid #ddd", fontSize: "15px" } }, ts_common_1.__stringify(report.tickets)),
|
|
47
33
|
React.createElement("td", { style: { padding: "15px", textAlign: "left", border: "1px solid #ddd", fontSize: "15px" } },
|
|
48
|
-
React.createElement("button", { onClick:
|
|
49
|
-
|
|
34
|
+
React.createElement("button", { onClick: () => AdminBRModule_1.AdminBRModule.downloadMultiLogs(report.reports) }, "download")));
|
|
35
|
+
this.__onRequestCompleted = (key, success) => {
|
|
50
36
|
switch (key) {
|
|
51
37
|
default:
|
|
52
38
|
return;
|
|
53
39
|
case AdminBRModule_1.RequestKey_GetLog:
|
|
54
|
-
|
|
40
|
+
this.forceUpdate();
|
|
55
41
|
}
|
|
56
42
|
};
|
|
57
|
-
return _this;
|
|
58
43
|
}
|
|
59
|
-
|
|
60
|
-
|
|
44
|
+
render() {
|
|
45
|
+
const logs = AdminBRModule_1.AdminBRModule.getLogs();
|
|
61
46
|
return (React.createElement("div", null,
|
|
62
47
|
React.createElement("button", { onClick: AdminBRModule_1.AdminBRModule.retrieveLogs }, "click to display logs"),
|
|
63
48
|
React.createElement("div", null,
|
|
64
49
|
React.createElement("table", { style: { width: "100%" } }, logs.map(this.createRow)))));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}(frontend_1.BaseComponent));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
68
52
|
exports.AdminBR = AdminBR;
|
|
69
53
|
//# sourceMappingURL=AdminBR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminBR.js","sourceRoot":"","sources":["../../../src/main/app-frontend/ui/AdminBR.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"AdminBR.js","sourceRoot":"","sources":["../../../src/main/app-frontend/ui/AdminBR.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,+BAA+B;AAC/B,4DAGkC;AAClC,uEAAwE;AAExE,4DAAyD;AAGzD,MAAa,OACZ,SAAQ,wBAAa;IADtB;;QAgBS,cAAS,GAAG,CAAC,MAAoB,EAAE,EAAE,CAAC;YAC7C,4BAAI,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAC,IAAG,MAAM,CAAC,WAAW,CAAM;YACtH,4BAAI,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAC,IAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAM;YAC1H,4BAAI,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAC,IAAG,uBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAM;YAC/H,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