@intuitionrobotics/bug-report 0.41.69 → 0.41.70
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
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
21
|
+
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
22
22
|
module.exports = new backend_1.RouteResolver(require, __dirname);
|
|
23
23
|
//# sourceMappingURL=_bug-report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_bug-report.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_bug-report.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAEH,
|
|
1
|
+
{"version":3,"file":"_bug-report.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_bug-report.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAEH,qEAAsE;AAEtE,MAAM,CAAC,OAAO,GAAG,IAAI,uBAAa,CAAC,OAAO,EAAE,SAAS,CAAC,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,51 +26,20 @@ 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
|
-
|
|
71
|
-
|
|
30
|
+
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
31
|
+
const _imports_1 = require("./_imports");
|
|
72
32
|
// import {AccountModule} from "@intuitionrobotics/user-account/backend";
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return _super.call(this, "download-logs") || this;
|
|
33
|
+
class ServerApi_DownloadLogs extends backend_1.ServerApi_Post {
|
|
34
|
+
constructor() {
|
|
35
|
+
super("download-logs");
|
|
77
36
|
}
|
|
78
|
-
|
|
79
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return [2 /*return*/, _imports_1.AdminBRModule.downloadFiles(body)];
|
|
83
|
-
});
|
|
37
|
+
process(request, response, queryParams, body) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
// const email = await AccountModule.validateSession(request);
|
|
40
|
+
return _imports_1.AdminBRModule.downloadFiles(body);
|
|
84
41
|
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
}(backend_1.ServerApi_Post));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
88
44
|
module.exports = new ServerApi_DownloadLogs();
|
|
89
45
|
//# sourceMappingURL=download.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAIiD;AACjD,yCAIoB;AAEpB,yEAAyE;AAEzE,MAAM,sBACL,SAAQ,wBAA2B;IAEnC;QACC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxB,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAW;;YACnG,8DAA8D;YAC9D,OAAO,wBAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,sBAAsB,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,49 +26,18 @@ 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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return _super.call(this, "get-logs") || this;
|
|
30
|
+
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
31
|
+
const _imports_1 = require("./_imports");
|
|
32
|
+
class ServerApi_GetReport extends backend_1.ServerApi_Get {
|
|
33
|
+
constructor() {
|
|
34
|
+
super("get-logs");
|
|
76
35
|
}
|
|
77
|
-
|
|
78
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
-
return
|
|
80
|
-
return [2 /*return*/, _imports_1.AdminBRModule.getFilesFirebase()];
|
|
81
|
-
});
|
|
36
|
+
process(request, response, queryParams, body) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return _imports_1.AdminBRModule.getFilesFirebase();
|
|
82
39
|
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}(backend_1.ServerApi_Get));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
86
42
|
module.exports = new ServerApi_GetReport();
|
|
87
43
|
//# sourceMappingURL=get-logs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-logs.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/get-logs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"get-logs.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/get-logs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAIiD;AACjD,yCAGoB;AAEpB,MAAM,mBACL,SAAQ,uBAAwB;IAEhC;QACC,KAAK,CAAC,UAAU,CAAC,CAAC;IACnB,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAClG,OAAO,wBAAa,CAAC,gBAAgB,EAAE,CAAC;QACzC,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,mBAAmB,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,59 +26,22 @@ 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
|
-
|
|
71
|
-
|
|
30
|
+
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
31
|
+
const _imports_1 = require("./_imports");
|
|
72
32
|
// import {AccountModule} from "@intuitionrobotics/user-account/backend";
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return _super.call(this, "report") || this;
|
|
33
|
+
class ServerApi_SendReport extends backend_1.ServerApi_Post {
|
|
34
|
+
constructor() {
|
|
35
|
+
super("report");
|
|
77
36
|
}
|
|
78
|
-
|
|
37
|
+
process(request, response, queryParams, body) {
|
|
79
38
|
var _a, _b, _c;
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
case 0: return [4 /*yield*/, backend_1.dispatch_queryRequestInfo.dispatchModuleAsync([request])];
|
|
85
|
-
case 1:
|
|
86
|
-
resp = _d.sent();
|
|
87
|
-
userId = ((_b = (_a = resp.find(function (e) { return e.key === 'AccountsModule'; })) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.email) || ((_c = resp.find(function (e) { return e.key === 'RemoteProxy'; })) === null || _c === void 0 ? void 0 : _c.data);
|
|
88
|
-
return [4 /*yield*/, _imports_1.BugReportModule.saveFile(body, userId)];
|
|
89
|
-
case 2: return [2 /*return*/, _d.sent()];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const resp = yield backend_1.dispatch_queryRequestInfo.dispatchModuleAsync([request]);
|
|
41
|
+
const userId = ((_b = (_a = resp.find(e => e.key === 'AccountsModule')) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.email) || ((_c = resp.find(e => e.key === 'RemoteProxy')) === null || _c === void 0 ? void 0 : _c.data);
|
|
42
|
+
return yield _imports_1.BugReportModule.saveFile(body, userId);
|
|
92
43
|
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
}(backend_1.ServerApi_Post));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
96
46
|
module.exports = new ServerApi_SendReport();
|
|
97
47
|
//# sourceMappingURL=reports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;AAEH,qEAKiD;AACjD,yCAIoB;AAEpB,yEAAyE;AAEzE,MAAM,oBACL,SAAQ,wBAA4B;IAEpC;QACC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAuB;;;YAC/G,MAAM,IAAI,GAAG,MAAM,mCAAyB,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5E,MAAM,MAAM,GAAuB,aAAA,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,gBAAgB,CAAC,0CAAE,IAAI,0CAAE,KAAK,YAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,aAAa,CAAC,0CAAE,IAAI,CAAA,CAAC;YAE5I,OAAO,MAAM,0BAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;;KACpD;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.Backend_ModulePack_BugReport = void 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
const BugReportModule_1 = require("../modules/BugReportModule");
|
|
23
|
+
const AdminBRModule_1 = require("../modules/AdminBRModule");
|
|
24
|
+
const JiraBugReportIntegrator_1 = require("../modules/JiraBugReportIntegrator");
|
|
25
|
+
const jira_1 = require("@intuitionrobotics/jira");
|
|
26
|
+
const SlackBugReportIntegrator_1 = require("../modules/SlackBugReportIntegrator");
|
|
27
|
+
const slack_1 = require("@intuitionrobotics/storm/slack");
|
|
28
28
|
exports.Backend_ModulePack_BugReport = [
|
|
29
29
|
BugReportModule_1.BugReportModule,
|
|
30
30
|
AdminBRModule_1.AdminBRModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,gEAA2D;AAC3D,4DAAuD;AACvD,gFAA2E;AAC3E,kDAAmD;AACnD,kFAA6E;AAC7E,0DAA2D;AAG9C,QAAA,4BAA4B,GAAG;IAC3C,iCAAe;IACf,6BAAa;IACb,iDAAuB;IACvB,iBAAU;IACV,mDAAwB;IACxB,mBAAW;CACX,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,69 +26,28 @@ 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 = void 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return [2 /*return*/, this.bugReport.getAll()];
|
|
79
|
-
}); }); };
|
|
80
|
-
_this.downloadFiles = function (path) { return __awaiter(_this, void 0, void 0, function () {
|
|
81
|
-
var bucket, file;
|
|
31
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
+
const backend_1 = require("@intuitionrobotics/firebase/backend");
|
|
33
|
+
class AdminBRModule_Class extends ts_common_1.Module {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(...arguments);
|
|
36
|
+
this.getFilesFirebase = () => __awaiter(this, void 0, void 0, function* () { return this.bugReport.getAll(); });
|
|
37
|
+
this.downloadFiles = (path) => __awaiter(this, void 0, void 0, function* () {
|
|
82
38
|
var _a;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
bucket = _b.sent();
|
|
88
|
-
return [4 /*yield*/, bucket.getFile(path.path)];
|
|
89
|
-
case 2:
|
|
90
|
-
file = _b.sent();
|
|
91
|
-
return [2 /*return*/, file.getReadSecuredUrl("application/zip", 600000)];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}); };
|
|
95
|
-
return _this;
|
|
39
|
+
const bucket = yield this.storage.getOrCreateBucket((_a = this.config) === null || _a === void 0 ? void 0 : _a.bucket);
|
|
40
|
+
const file = yield bucket.getFile(path.path);
|
|
41
|
+
return file.getReadSecuredUrl("application/zip", 600000);
|
|
42
|
+
});
|
|
96
43
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
44
|
+
init() {
|
|
45
|
+
const sessAdmin = backend_1.FirebaseModule.createAdminSession();
|
|
46
|
+
const firestore = sessAdmin.getFirestore();
|
|
100
47
|
this.bugReport = firestore.getCollection('bug-report', ['_id']);
|
|
101
48
|
this.storage = sessAdmin.getStorage();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
}(ts_common_1.Module));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
105
51
|
exports.AdminBRModule_Class = AdminBRModule_Class;
|
|
106
52
|
exports.AdminBRModule = new AdminBRModule_Class();
|
|
107
53
|
//# sourceMappingURL=AdminBRModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminBRModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/AdminBRModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG
|
|
1
|
+
{"version":3,"file":"AdminBRModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/AdminBRModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,4DAAoD;AAMpD,iEAI6C;AAO7C,MAAa,mBACZ,SAAQ,kBAAc;IADvB;;QAaC,qBAAgB,GAAG,GAAS,EAAE,gDAAC,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAA,GAAA,CAAC;QAEvD,kBAAa,GAAG,CAAO,IAAW,EAAE,EAAE;;YACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,OAAC,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAC,CAAC;YACzE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7C,OAAO,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAC1D,CAAC,CAAA,CAAA;IACF,CAAC;IAdU,IAAI;QACb,MAAM,SAAS,GAAG,wBAAc,CAAC,kBAAkB,EAAE,CAAC;QACtD,MAAM,SAAS,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,aAAa,CAAe,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;IACvC,CAAC;CASD;AApBD,kDAoBC;AAEY,QAAA,aAAa,GAAG,IAAI,mBAAmB,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,115 +26,58 @@ 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.BugReportModule = exports.BugReportModule_Class = void 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_this.saveLog = function (report, id) { return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
-
var zip, buffer, bucket, fileName, file;
|
|
81
|
-
var _a;
|
|
82
|
-
return __generator(this, function (_b) {
|
|
83
|
-
switch (_b.label) {
|
|
84
|
-
case 0:
|
|
85
|
-
zip = new JSZip();
|
|
86
|
-
report.log.forEach(function (message, i) { return zip.file(report.name + "_" + ts_common_1.padNumber(i, 2) + ".txt", message); });
|
|
87
|
-
return [4 /*yield*/, zip.generateAsync({ type: "nodebuffer" })];
|
|
88
|
-
case 1:
|
|
89
|
-
buffer = _b.sent();
|
|
90
|
-
return [4 /*yield*/, this.storage.getOrCreateBucket((_a = this.config) === null || _a === void 0 ? void 0 : _a.bucket)];
|
|
91
|
-
case 2:
|
|
92
|
-
bucket = _b.sent();
|
|
93
|
-
fileName = id + "-" + report.name + ".zip";
|
|
94
|
-
return [4 /*yield*/, bucket.getFile(fileName)];
|
|
95
|
-
case 3:
|
|
96
|
-
file = _b.sent();
|
|
97
|
-
return [4 /*yield*/, file.write(buffer)];
|
|
98
|
-
case 4:
|
|
99
|
-
_b.sent();
|
|
100
|
-
return [2 /*return*/, {
|
|
101
|
-
path: "https://storage.cloud.google.com/" + file.file.metadata.bucket + "/" + file.file.metadata.name,
|
|
102
|
-
name: fileName
|
|
103
|
-
}];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}); };
|
|
107
|
-
_this.saveFile = function (bugReport, email) { return __awaiter(_this, void 0, void 0, function () {
|
|
108
|
-
var _id, logs, instance, tickets;
|
|
109
|
-
var _this = this;
|
|
31
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
+
const backend_1 = require("@intuitionrobotics/firebase/backend");
|
|
33
|
+
const JSZip = require("jszip");
|
|
34
|
+
class BugReportModule_Class extends ts_common_1.Module {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.ticketCreatorApis = [];
|
|
38
|
+
this.saveLog = (report, id) => __awaiter(this, void 0, void 0, function* () {
|
|
110
39
|
var _a;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
40
|
+
const zip = new JSZip();
|
|
41
|
+
report.log.forEach((message, i) => zip.file(`${report.name}_${ts_common_1.padNumber(i, 2)}.txt`, message));
|
|
42
|
+
const buffer = yield zip.generateAsync({ type: "nodebuffer" });
|
|
43
|
+
const bucket = yield this.storage.getOrCreateBucket((_a = this.config) === null || _a === void 0 ? void 0 : _a.bucket);
|
|
44
|
+
const fileName = `${id}-${report.name}.zip`;
|
|
45
|
+
const file = yield bucket.getFile(fileName);
|
|
46
|
+
yield file.write(buffer);
|
|
47
|
+
return {
|
|
48
|
+
path: `https://storage.cloud.google.com/${file.file.metadata.bucket}/${file.file.metadata.name}`,
|
|
49
|
+
name: fileName
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
this.saveFile = (bugReport, email) => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
var _b;
|
|
54
|
+
const _id = ts_common_1.generateHex(16);
|
|
55
|
+
const logs = yield Promise.all(bugReport.reports.map(report => this.saveLog(report, _id)));
|
|
56
|
+
const instance = {
|
|
57
|
+
_id,
|
|
58
|
+
subject: bugReport.subject,
|
|
59
|
+
description: bugReport.description,
|
|
60
|
+
reports: logs,
|
|
61
|
+
_audit: ts_common_1.auditBy(email || "bug-report"),
|
|
62
|
+
};
|
|
63
|
+
if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.bucket)
|
|
64
|
+
instance.bucket = this.config.bucket;
|
|
65
|
+
const tickets = yield Promise.all(this.ticketCreatorApis.map(api => api(bugReport, logs, email)));
|
|
66
|
+
instance.tickets = ts_common_1.filterInstances(tickets);
|
|
67
|
+
yield this.bugReport.insert(instance);
|
|
68
|
+
return instance.tickets;
|
|
69
|
+
});
|
|
139
70
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
71
|
+
init() {
|
|
72
|
+
const sessionAdmin = backend_1.FirebaseModule.createAdminSession();
|
|
73
|
+
const firestore = sessionAdmin.getFirestore();
|
|
143
74
|
this.bugReport = firestore.getCollection('bug-report', ["_id"]);
|
|
144
75
|
this.storage = sessionAdmin.getStorage();
|
|
145
|
-
}
|
|
146
|
-
|
|
76
|
+
}
|
|
77
|
+
addTicketCreator(ticketCreator) {
|
|
147
78
|
ts_common_1.addItemToArray(this.ticketCreatorApis, ticketCreator);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
}(ts_common_1.Module));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
151
81
|
exports.BugReportModule_Class = BugReportModule_Class;
|
|
152
82
|
exports.BugReportModule = new BugReportModule_Class();
|
|
153
83
|
//# sourceMappingURL=BugReportModule.js.map
|