@intuitionrobotics/bug-report 0.44.16 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/app-backend/api/_bug-report.js +20 -2
  2. package/app-backend/api/_bug-report.js.map +1 -1
  3. package/app-backend/api/v1/bug-reports/_imports.d.ts +3 -0
  4. package/app-backend/api/v1/bug-reports/_imports.js +34 -0
  5. package/app-backend/api/v1/bug-reports/_imports.js.map +1 -0
  6. package/app-backend/api/v1/bug-reports/download.js +22 -4
  7. package/app-backend/api/v1/bug-reports/download.js.map +1 -1
  8. package/app-backend/api/v1/bug-reports/get-logs.js +22 -4
  9. package/app-backend/api/v1/bug-reports/get-logs.js.map +1 -1
  10. package/app-backend/api/v1/bug-reports/reports.js +24 -6
  11. package/app-backend/api/v1/bug-reports/reports.js.map +1 -1
  12. package/app-backend/core/module-pack.d.ts +1 -1
  13. package/app-backend/core/module-pack.js +20 -2
  14. package/app-backend/core/module-pack.js.map +1 -1
  15. package/app-backend/modules/AdminBRModule.d.ts +1 -1
  16. package/app-backend/modules/AdminBRModule.js +22 -4
  17. package/app-backend/modules/AdminBRModule.js.map +1 -1
  18. package/app-backend/modules/BugReportModule.d.ts +2 -2
  19. package/app-backend/modules/BugReportModule.js +27 -13
  20. package/app-backend/modules/BugReportModule.js.map +1 -1
  21. package/app-backend/modules/JiraBugReportIntegrator.d.ts +3 -3
  22. package/app-backend/modules/JiraBugReportIntegrator.js +26 -9
  23. package/app-backend/modules/JiraBugReportIntegrator.js.map +1 -1
  24. package/app-backend/modules/SlackBugReportIntegrator.d.ts +2 -2
  25. package/app-backend/modules/SlackBugReportIntegrator.js +24 -8
  26. package/app-backend/modules/SlackBugReportIntegrator.js.map +1 -1
  27. package/app-frontend/core/module-pack.d.ts +2 -0
  28. package/app-frontend/core/module-pack.js +30 -0
  29. package/app-frontend/core/module-pack.js.map +1 -1
  30. package/app-frontend/modules/AdminBRModule.d.ts +1 -1
  31. package/app-frontend/modules/AdminBRModule.js +26 -8
  32. package/app-frontend/modules/AdminBRModule.js.map +1 -1
  33. package/app-frontend/modules/BugReportModule.d.ts +1 -1
  34. package/app-frontend/modules/BugReportModule.js +28 -12
  35. package/app-frontend/modules/BugReportModule.js.map +1 -1
  36. package/app-frontend/ui/AdminBR.d.ts +2 -2
  37. package/app-frontend/ui/AdminBR.js +24 -21
  38. package/app-frontend/ui/AdminBR.js.map +1 -1
  39. package/app-frontend/ui/BugReport.js +29 -15
  40. package/app-frontend/ui/BugReport.js.map +1 -1
  41. package/app-frontend/ui/Dialog_JiraOpened.d.ts +1 -1
  42. package/app-frontend/ui/Dialog_JiraOpened.js +1 -1
  43. package/app-frontend/ui/Dialog_JiraOpened.js.map +1 -1
  44. package/backend.d.ts +5 -0
  45. package/backend.js +36 -0
  46. package/backend.js.map +1 -0
  47. package/frontend.d.ts +3 -0
  48. package/frontend.js +34 -0
  49. package/frontend.js.map +1 -0
  50. package/index.d.ts +1 -0
  51. package/index.js +30 -0
  52. package/index.js.map +1 -1
  53. package/package.json +7 -7
  54. package/shared/api.d.ts +6 -2
  55. package/shared/api.js +18 -0
  56. package/shared/api.js.map +1 -1
@@ -1,5 +1,23 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const HttpServer_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/HttpServer");
4
- module.exports = new HttpServer_1.RouteResolver(require, __dirname);
21
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
22
+ module.exports = new backend_1.RouteResolver(require, __dirname);
5
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":";;AACA,sGAAoG;AAEpG,MAAM,CAAC,OAAO,GAAG,IAAI,0BAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
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"}
@@ -0,0 +1,3 @@
1
+ export * from "../../../../shared/api";
2
+ export * from "../../../modules/BugReportModule";
3
+ export * from "../../../modules/AdminBRModule";
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
29
+ };
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ __exportStar(require("../../../../shared/api"), exports);
32
+ __exportStar(require("../../../modules/BugReportModule"), exports);
33
+ __exportStar(require("../../../modules/AdminBRModule"), exports);
34
+ //# sourceMappingURL=_imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_imports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/_imports.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,yDAAuC;AACvC,mEAAiD;AACjD,iEAA8C"}
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -9,15 +27,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
27
  });
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
- const AdminBRModule_1 = require("../../../modules/AdminBRModule");
14
- class ServerApi_DownloadLogs extends server_api_1.ServerApi_Post {
30
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
+ const _imports_1 = require("./_imports");
32
+ class ServerApi_DownloadLogs extends backend_1.ServerApi_Post {
15
33
  constructor() {
16
34
  super("download-logs");
17
35
  }
18
36
  process(request, response, queryParams, body) {
19
37
  return __awaiter(this, void 0, void 0, function* () {
20
- return AdminBRModule_1.AdminBRModule.downloadFiles(body);
38
+ return _imports_1.AdminBRModule.downloadFiles(body);
21
39
  });
22
40
  }
23
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sGAAkH;AAGlH,kEAA6D;AAE7D,MAAM,sBACF,SAAQ,2BAA2B;IAEnC;QACI,KAAK,CAAC,eAAe,CAAC,CAAC;IAC3B,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAW;;YAChG,OAAO,6BAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
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,MAAM,sBACL,SAAQ,wBAA2B;IAEnC;QACC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxB,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAW;;YACnG,OAAO,wBAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -9,15 +27,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
27
  });
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
- const AdminBRModule_1 = require("../../../modules/AdminBRModule");
14
- class ServerApi_GetReport extends server_api_1.ServerApi_Get {
30
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
+ const _imports_1 = require("./_imports");
32
+ class ServerApi_GetReport extends backend_1.ServerApi_Get {
15
33
  constructor() {
16
34
  super("get-logs");
17
35
  }
18
36
  process(request, response, queryParams, body) {
19
37
  return __awaiter(this, void 0, void 0, function* () {
20
- return AdminBRModule_1.AdminBRModule.getFilesFirebase();
38
+ return _imports_1.AdminBRModule.getFilesFirebase();
21
39
  });
22
40
  }
23
41
  }
@@ -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,sGAAiH;AAGjH,kEAA6D;AAE7D,MAAM,mBACF,SAAQ,0BAAwB;IAEhC;QACI,KAAK,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAC/F,OAAO,6BAAa,CAAC,gBAAgB,EAAE,CAAC;QAC5C,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
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"}
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -9,19 +27,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
27
  });
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
13
- const types_1 = require("@intuitionrobotics/thunderstorm/app-backend/utils/types");
14
- const BugReportModule_1 = require("../../../modules/BugReportModule");
15
- class ServerApi_SendReport extends server_api_1.ServerApi_Post {
30
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
31
+ const _imports_1 = require("./_imports");
32
+ // import {AccountModule} from "@intuitionrobotics/user-account/backend";
33
+ class ServerApi_SendReport extends backend_1.ServerApi_Post {
16
34
  constructor() {
17
35
  super("report");
18
36
  }
19
37
  process(request, response, queryParams, body) {
20
38
  var _a, _b, _c;
21
39
  return __awaiter(this, void 0, void 0, function* () {
22
- const resp = yield types_1.dispatch_queryRequestInfo.dispatchModuleAsync([request]);
40
+ const resp = yield backend_1.dispatch_queryRequestInfo.dispatchModuleAsync([request]);
23
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);
24
- return yield BugReportModule_1.BugReportModule.saveFile(body, userId);
42
+ return yield _imports_1.BugReportModule.saveFile(body, userId);
25
43
  });
26
44
  }
27
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":";;;;;;;;;;;A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gB,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"}
@@ -1 +1 @@
1
- export declare const Backend_ModulePack_BugReport: (import("../modules/BugReportModule").BugReportModule_Class | import("../modules/AdminBRModule").AdminBRModule_Class | import("@intuitionrobotics/jira/app-backend/modules/JiraModule").JiraModule_Class | import("../modules/JiraBugReportIntegrator").JiraBugReportIntegrator_Class | import("@intuitionrobotics/thunderstorm/app-backend/modules/SlackModule").SlackModule_Class | import("../modules/SlackBugReportIntegrator").SlackBugReportIntegrator_Class)[];
1
+ export declare const Backend_ModulePack_BugReport: (import("../modules/BugReportModule").BugReportModule_Class | import("../modules/AdminBRModule").AdminBRModule_Class | import("@intuitionrobotics/jira").JiraModule_Class | import("../modules/JiraBugReportIntegrator").JiraBugReportIntegrator_Class | import("@intuitionrobotics/thunderstorm/app-backend/modules/SlackModule").SlackModule_Class | import("../modules/SlackBugReportIntegrator").SlackBugReportIntegrator_Class)[];
@@ -1,17 +1,35 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  Object.defineProperty(exports, "__esModule", { value: true });
3
21
  exports.Backend_ModulePack_BugReport = void 0;
4
22
  const BugReportModule_1 = require("../modules/BugReportModule");
5
23
  const AdminBRModule_1 = require("../modules/AdminBRModule");
6
24
  const JiraBugReportIntegrator_1 = require("../modules/JiraBugReportIntegrator");
25
+ const jira_1 = require("@intuitionrobotics/jira");
7
26
  const SlackBugReportIntegrator_1 = require("../modules/SlackBugReportIntegrator");
8
27
  const SlackModule_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/SlackModule");
9
- const JiraModule_1 = require("@intuitionrobotics/jira/app-backend/modules/JiraModule");
10
28
  exports.Backend_ModulePack_BugReport = [
11
29
  BugReportModule_1.BugReportModule,
12
30
  AdminBRModule_1.AdminBRModule,
13
31
  JiraBugReportIntegrator_1.JiraBugReportIntegrator,
14
- JiraModule_1.JiraModule,
32
+ jira_1.JiraModule,
15
33
  SlackBugReportIntegrator_1.SlackBugReportIntegrator,
16
34
  SlackModule_1.SlackModule
17
35
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";;;AAAA,gEAA2D;AAC3D,4DAAuD;AACvD,gFAA2E;AAC3E,kFAA6E;AAC7E,iGAA4F;AAC5F,uFAAkF;AAErE,QAAA,4BAA4B,GAAG;IACxC,iCAAe;IACf,6BAAa;IACb,iDAAuB;IACvB,uBAAU;IACV,mDAAwB;IACxB,yBAAW;CACd,CAAC"}
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,iGAA4F;AAG/E,QAAA,4BAA4B,GAAG;IAC3C,iCAAe;IACf,6BAAa;IACb,iDAAuB;IACvB,iBAAU;IACV,mDAAwB;IACxB,yBAAW;CACX,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Module } from "@intuitionrobotics/ts-common/core/module";
1
+ import { Module } from "@intuitionrobotics/ts-common";
2
2
  import { DB_BugReport, Paths } from "../../shared/api";
3
3
  declare type Config = {
4
4
  projectId: string;
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,9 +28,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
30
  exports.AdminBRModule = exports.AdminBRModule_Class = void 0;
13
- const module_1 = require("@intuitionrobotics/ts-common/core/module");
14
- const FirebaseModule_1 = require("@intuitionrobotics/firebase/app-backend/FirebaseModule");
15
- class AdminBRModule_Class extends module_1.Module {
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 {
16
34
  constructor() {
17
35
  super("AdminBRModule");
18
36
  this.getFilesFirebase = () => __awaiter(this, void 0, void 0, function* () { return this.bugReport.getAll(); });
@@ -24,7 +42,7 @@ class AdminBRModule_Class extends module_1.Module {
24
42
  });
25
43
  }
26
44
  init() {
27
- const sessAdmin = FirebaseModule_1.FirebaseModule.createAdminSession();
45
+ const sessAdmin = backend_1.FirebaseModule.createAdminSession();
28
46
  const firestore = sessAdmin.getFirestore();
29
47
  this.bugReport = firestore.getCollection('bug-report', ['_id']);
30
48
  this.storage = sessAdmin.getStorage();
@@ -1 +1 @@
1
- {"version":3,"file":"AdminBRModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/AdminBRModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qEAAgE;AAEhE,2FAAsF;AAUtF,MAAa,mBACT,SAAQ,eAAc;IAEtB;QACI,KAAK,CAAC,eAAe,CAAC,CAAC;QAa3B,qBAAgB,GAAG,GAAS,EAAE,gDAAC,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAA,GAAA,CAAC;QAEvD,kBAAa,GAAG,CAAO,IAAW,EAAE,EAAE;;YAClC,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,MAAM,CAAC,CAAC;QAC1C,CAAC,CAAA,CAAA;IAlBD,CAAC;IAKS,IAAI;QACV,MAAM,SAAS,GAAG,+BAAc,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;IAC1C,CAAC;CASJ;AAxBD,kDAwBC;AAEY,QAAA,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
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;IAEtB;QACC,KAAK,CAAC,eAAe,CAAC,CAAC;QAaxB,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,MAAM,CAAC,CAAC;QACvC,CAAC,CAAA,CAAA;IAlBD,CAAC;IAKS,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;AAxBD,kDAwBC;AAEY,QAAA,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Module } from "@intuitionrobotics/ts-common/core/module";
2
- import { BugReport, ReportLogFile, Request_BugReport } from "../../shared/api";
1
+ import { Module } from "@intuitionrobotics/ts-common";
2
+ import { BugReport, ReportLogFile, Request_BugReport } from "../..";
3
3
  export declare type TicketDetails = {
4
4
  platform: string;
5
5
  issueId: string;
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,21 +28,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
30
  exports.BugReportModule = exports.BugReportModule_Class = void 0;
13
- const module_1 = require("@intuitionrobotics/ts-common/core/module");
14
- const string_tools_1 = require("@intuitionrobotics/ts-common/utils/string-tools");
15
- const FirebaseModule_1 = require("@intuitionrobotics/firebase/app-backend/FirebaseModule");
31
+ const ts_common_1 = require("@intuitionrobotics/ts-common");
32
+ const backend_1 = require("@intuitionrobotics/firebase/backend");
16
33
  const JSZip = require("jszip");
17
- const date_time_tools_1 = require("@intuitionrobotics/ts-common/utils/date-time-tools");
18
- const random_tools_1 = require("@intuitionrobotics/ts-common/utils/random-tools");
19
- const array_tools_1 = require("@intuitionrobotics/ts-common/utils/array-tools");
20
- class BugReportModule_Class extends module_1.Module {
34
+ class BugReportModule_Class extends ts_common_1.Module {
21
35
  constructor() {
22
36
  super("BugReportModule");
23
37
  this.ticketCreatorApis = [];
24
38
  this.saveLog = (report, id) => __awaiter(this, void 0, void 0, function* () {
25
39
  var _a;
26
40
  const zip = new JSZip();
27
- report.log.forEach((message, i) => zip.file(`${report.name}_${string_tools_1.padNumber(i, 2)}.txt`, message));
41
+ report.log.forEach((message, i) => zip.file(`${report.name}_${ts_common_1.padNumber(i, 2)}.txt`, message));
28
42
  const buffer = yield zip.generateAsync({ type: "nodebuffer" });
29
43
  const bucket = yield this.storage.getOrCreateBucket((_a = this.config) === null || _a === void 0 ? void 0 : _a.bucket);
30
44
  const fileName = `${id}-${report.name}.zip`;
@@ -37,31 +51,31 @@ class BugReportModule_Class extends module_1.Module {
37
51
  });
38
52
  this.saveFile = (bugReport, email) => __awaiter(this, void 0, void 0, function* () {
39
53
  var _b;
40
- const _id = random_tools_1.generateHex(16);
54
+ const _id = ts_common_1.generateHex(16);
41
55
  const logs = yield Promise.all(bugReport.reports.map(report => this.saveLog(report, _id)));
42
56
  const instance = {
43
57
  _id,
44
58
  subject: bugReport.subject,
45
59
  description: bugReport.description,
46
60
  reports: logs,
47
- _audit: date_time_tools_1.auditBy(email || "bug-report"),
61
+ _audit: ts_common_1.auditBy(email || "bug-report"),
48
62
  };
49
63
  if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.bucket)
50
64
  instance.bucket = this.config.bucket;
51
65
  const tickets = yield Promise.all(this.ticketCreatorApis.map(api => api(bugReport, logs, email)));
52
- instance.tickets = array_tools_1.filterInstances(tickets);
66
+ instance.tickets = ts_common_1.filterInstances(tickets);
53
67
  yield this.bugReport.insert(instance);
54
68
  return instance.tickets;
55
69
  });
56
70
  }
57
71
  init() {
58
- const sessionAdmin = FirebaseModule_1.FirebaseModule.createAdminSession();
72
+ const sessionAdmin = backend_1.FirebaseModule.createAdminSession();
59
73
  const firestore = sessionAdmin.getFirestore();
60
74
  this.bugReport = firestore.getCollection('bug-report', ["_id"]);
61
75
  this.storage = sessionAdmin.getStorage();
62
76
  }
63
77
  addTicketCreator(ticketCreator) {
64
- this.ticketCreatorApis.push(ticketCreator);
78
+ ts_common_1.addItemToArray(this.ticketCreatorApis, ticketCreator);
65
79
  }
66
80
  }
67
81
  exports.BugReportModule_Class = BugReportModule_Class;
@@ -1 +1 @@
1
- {"version":3,"file":"BugReportModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/BugReportModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qEAAgE;AAChE,kFAA0E;AAE1E,2FAAsF;AAGtF,+BAA+B;AAC/B,wFAA2E;AAC3E,kFAA4E;AAC5E,gFAA+E;AAY/E,MAAa,qBACT,SAAQ,eAAc;IAEtB;QACI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAKrB,sBAAiB,GAAuB,EAAE,CAAC;QAanD,YAAO,GAAG,CAAO,MAAiB,EAAE,EAAU,EAA0B,EAAE;;YACtE,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;YAExB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,wBAAS,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAE/F,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC,CAAC;YAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,OAAC,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAC,CAAC;YACzE,MAAM,QAAQ,GAAG,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC;YAC5C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC5C,MAAM,IAA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,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAClG,QAAQ,CAAC,OAAO,GAAG,2BAAe,CAAC,OAAO,CAAC,CAAA;YAC3C,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtC,OAAO,QAAQ,CAAC,OAAO,CAAC;QACzB,CAAC,CAAA,CAAC;IArDF,CAAC;IAMS,IAAI;QACb,MAAM,YAAY,GAAG,wBAAc,CAAC,kBAAkB,EAAE,CAAC;QACzD,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC;QAC9C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,aAAa,CAAe,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;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;AA3DD,sDA2DC;AAEY,QAAA,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
+ import { Module } from "@intuitionrobotics/ts-common";
2
+ import { IssueType, JiraProject, LabelType } from "@intuitionrobotics/jira";
3
+ import { ReportLogFile, Request_BugReport } from "../..";
1
4
  import { TicketDetails } from "./BugReportModule";
2
- import { IssueType, JiraProject, LabelType } from "@intuitionrobotics/jira/app-backend/modules/JiraModule";
3
- import { Module } from "@intuitionrobotics/ts-common/core/module";
4
- import { ReportLogFile, Request_BugReport } from "../../shared/api";
5
5
  declare type Config = {
6
6
  jiraProject: JiraProject;
7
7
  issueType: IssueType;
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,28 +28,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
30
  exports.JiraBugReportIntegrator = exports.JiraBugReportIntegrator_Class = void 0;
13
- const JiraModule_1 = require("@intuitionrobotics/jira/app-backend/modules/JiraModule");
14
- const module_1 = require("@intuitionrobotics/ts-common/core/module");
15
- const api_1 = require("../../shared/api");
16
- const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
17
- class JiraBugReportIntegrator_Class extends module_1.Module {
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 {
18
35
  constructor() {
19
36
  super("JiraBugReportIntegrator");
20
37
  this.parser = (name) => `Bug: ${name}`;
21
38
  this.openTicket = (bugReport, logs, reporter) => __awaiter(this, void 0, void 0, function* () {
22
39
  var _a;
23
- if (bugReport.platforms && !bugReport.platforms.includes(api_1.Platform_Jira))
40
+ if (bugReport.platforms && !bugReport.platforms.includes(__1.Platform_Jira))
24
41
  return;
25
42
  if (!this.config.jiraProject)
26
- throw new exceptions_1.ImplementationMissingException("missing Jira project in bug report configurations");
43
+ throw new ts_common_1.ImplementationMissingException("missing Jira project in bug report configurations");
27
44
  const description = logs.reduce((carry, log, i) => {
28
45
  carry.push({ href: log.path, text: "\nClick to view logs (" + i + ")" });
29
46
  return carry;
30
47
  }, [bugReport.description]);
31
48
  if (reporter)
32
49
  description.push("\nReported by: " + reporter);
33
- const issue = yield JiraModule_1.JiraModule.issue.create(this.config.jiraProject, this.config.issueType, this.parser(bugReport.subject), description, (_a = this.config.label) === null || _a === void 0 ? void 0 : _a.label);
34
- return { platform: api_1.Platform_Jira, issueId: issue.url };
50
+ const issue = yield jira_1.JiraModule.issue.create(this.config.jiraProject, this.config.issueType, this.parser(bugReport.subject), description, (_a = this.config.label) === null || _a === void 0 ? void 0 : _a.label);
51
+ return { platform: __1.Platform_Jira, issueId: issue.url };
35
52
  });
36
53
  }
37
54
  setIssueTitleProcessor(parser) {
@@ -1 +1 @@
1
- {"version":3,"file":"JiraBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/JiraBugReportIntegrator.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uFAAqH;AACrH,qEAAgE;AAChE,0CAAiF;AACjF,6EAA4F;AAS5F,MAAa,6BACT,SAAQ,eAAc;IAEtB;QACI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAO7B,WAAM,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC;QAElD,eAAU,GAAG,CAAO,SAA4B,EAAE,IAAqB,EAAE,QAAiB,EAAsC,EAAE;;YAC9H,IAAI,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,mBAAa,CAAC;gBACnE,OAAO;YAEX,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW;gBACxB,MAAM,IAAI,2CAA8B,CAAC,mDAAmD,CAAC,CAAC;YAElG,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAsB,EAAE,GAAkB,EAAE,CAAS,EAAE,EAAE;gBAC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ics/ts-common";
2
+ import { ReportLogFile, Request_BugReport } from "../..";
1
3
  import { TicketDetails } from "./BugReportModule";
2
- import { Module } from "@intuitionrobotics/ts-common/core/module";
3
- import { ReportLogFile, Request_BugReport } from "../../shared/api";
4
4
  declare type Config = {
5
5
  channel: string;
6
6
  };
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
+ /*
3
+ * Permissions management system, define access level for each of
4
+ * your server apis, and restrict users by giving them access levels
5
+ *
6
+ * Copyright (C) 2020 Intuition Robotics
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
2
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,19 +28,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
28
  };
11
29
  Object.defineProperty(exports, "__esModule", { value: true });
12
30
  exports.SlackBugReportIntegrator = exports.SlackBugReportIntegrator_Class = void 0;
31
+ const ts_common_1 = require("@intuitionrobotics/ts-common");
32
+ const __1 = require("../..");
13
33
  const SlackModule_1 = require("@intuitionrobotics/thunderstorm//app-backend/modules/SlackModule");
14
- const module_1 = require("@intuitionrobotics/ts-common/core/module");
15
- const api_1 = require("../../shared/api");
16
- const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
17
- const random_tools_1 = require("@intuitionrobotics/ts-common/utils/random-tools");
18
- class SlackBugReportIntegrator_Class extends module_1.Module {
34
+ class SlackBugReportIntegrator_Class extends ts_common_1.Module {
19
35
  constructor() {
20
36
  super("SlackBugReportIntegrator");
21
37
  this.openTicket = (bugReport, logs, reporter) => __awaiter(this, void 0, void 0, function* () {
22
- if (bugReport.platforms && !bugReport.platforms.includes(api_1.Platform_Slack))
38
+ if (bugReport.platforms && !bugReport.platforms.includes(__1.Platform_Slack))
23
39
  return;
24
40
  if (!this.config.channel)
25
- throw new exceptions_1.ImplementationMissingException("Missing Slack Channel in bug report configurations");
41
+ throw new ts_common_1.ImplementationMissingException("Missing Slack Channel in bug report configurations");
26
42
  let description = logs.reduce((carry, log, i) => {
27
43
  return carry + "\n" + `<${log.path}|Click to view logs (${i})>`;
28
44
  }, bugReport.subject + "\n" + bugReport.description);
@@ -33,7 +49,7 @@ class SlackBugReportIntegrator_Class extends module_1.Module {
33
49
  channel: this.config.channel
34
50
  };
35
51
  yield SlackModule_1.SlackModule.postMessage(slackMessage);
36
- return { platform: api_1.Platform_Slack, issueId: random_tools_1.generateHex(32) };
52
+ return { platform: __1.Platform_Slack, issueId: ts_common_1.generateHex(32) };
37
53
  });
38
54
  }
39
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SlackBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/SlackBugReportIntegrator.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,kGAA6F;AAC7F,qEAAgE;AAChE,0CAAkF;AAClF,6EAA4F;AAC5F,kFAA4E;AAO5E,MAAa,8BACT,SAAQ,eAAc;IAEtB;QACI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAGtC,eAAU,GAAG,CAAO,SAA4B,EAAE,IAAqB,EAAE,QAAiB,EAAsC,EAAE;YAC9H,IAAI,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAc,CAAC;gBACpE,OAAO;YAEX,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO;gBACpB,MAAM,IAAI,2CAA8B,CAAC,oDAAo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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,yBAAW,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;IAtBF,CAAC;CAuBD;AA5BD,wEA4BC;AAEY,QAAA,wBAAwB,GAAG,IAAI,8BAA8B,EAAE,CAAC"}
@@ -1 +1,3 @@
1
1
  export declare const Frontend_ModulePack_BugReport: (import("../modules/BugReportModule").BugReportModule_Class | import("../modules/AdminBRModule").AdminBRModule_Class)[];
2
+ export * from "../modules/AdminBRModule";
3
+ export * from "../modules/BugReportModule";