@intuitionrobotics/bug-report 0.45.3 → 0.46.0
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 +2 -20
- package/app-backend/api/_bug-report.js.map +1 -1
- package/app-backend/api/v1/bug-reports/download.js +4 -22
- package/app-backend/api/v1/bug-reports/download.js.map +1 -1
- package/app-backend/api/v1/bug-reports/get-logs.js +4 -22
- package/app-backend/api/v1/bug-reports/get-logs.js.map +1 -1
- package/app-backend/api/v1/bug-reports/reports.js +6 -24
- package/app-backend/api/v1/bug-reports/reports.js.map +1 -1
- package/app-backend/core/module-pack.d.ts +1 -1
- package/app-backend/core/module-pack.js +2 -20
- package/app-backend/core/module-pack.js.map +1 -1
- package/app-backend/modules/AdminBRModule.d.ts +1 -1
- package/app-backend/modules/AdminBRModule.js +4 -22
- package/app-backend/modules/AdminBRModule.js.map +1 -1
- package/app-backend/modules/BugReportModule.d.ts +2 -2
- package/app-backend/modules/BugReportModule.js +13 -27
- package/app-backend/modules/BugReportModule.js.map +1 -1
- package/app-backend/modules/JiraBugReportIntegrator.d.ts +3 -3
- package/app-backend/modules/JiraBugReportIntegrator.js +9 -26
- package/app-backend/modules/JiraBugReportIntegrator.js.map +1 -1
- package/app-backend/modules/SlackBugReportIntegrator.d.ts +2 -2
- package/app-backend/modules/SlackBugReportIntegrator.js +8 -24
- package/app-backend/modules/SlackBugReportIntegrator.js.map +1 -1
- package/app-frontend/core/module-pack.d.ts +0 -2
- package/app-frontend/core/module-pack.js +0 -30
- package/app-frontend/core/module-pack.js.map +1 -1
- package/app-frontend/modules/AdminBRModule.d.ts +1 -1
- package/app-frontend/modules/AdminBRModule.js +8 -26
- package/app-frontend/modules/AdminBRModule.js.map +1 -1
- package/app-frontend/modules/BugReportModule.d.ts +1 -1
- package/app-frontend/modules/BugReportModule.js +12 -28
- package/app-frontend/modules/BugReportModule.js.map +1 -1
- package/app-frontend/ui/AdminBR.d.ts +2 -2
- package/app-frontend/ui/AdminBR.js +21 -24
- package/app-frontend/ui/AdminBR.js.map +1 -1
- package/app-frontend/ui/BugReport.js +15 -29
- package/app-frontend/ui/BugReport.js.map +1 -1
- package/app-frontend/ui/Dialog_JiraOpened.d.ts +1 -1
- package/app-frontend/ui/Dialog_JiraOpened.js +1 -1
- package/app-frontend/ui/Dialog_JiraOpened.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +0 -30
- package/index.js.map +1 -1
- package/package.json +7 -7
- package/shared/api.d.ts +2 -6
- package/shared/api.js +0 -18
- package/shared/api.js.map +1 -1
- package/app-backend/api/v1/bug-reports/_imports.d.ts +0 -3
- package/app-backend/api/v1/bug-reports/_imports.js +0 -34
- package/app-backend/api/v1/bug-reports/_imports.js.map +0 -1
- package/backend.d.ts +0 -5
- package/backend.js +0 -36
- package/backend.js.map +0 -1
- package/frontend.d.ts +0 -3
- package/frontend.js +0 -34
- package/frontend.js.map +0 -1
|
@@ -1,23 +1,5 @@
|
|
|
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
|
-
*/
|
|
20
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
const
|
|
22
|
-
module.exports = new
|
|
3
|
+
const HttpServer_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/HttpServer");
|
|
4
|
+
module.exports = new HttpServer_1.RouteResolver(require, __dirname);
|
|
23
5
|
//# 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":"
|
|
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,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,15 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
9
|
});
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
class ServerApi_DownloadLogs extends
|
|
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 {
|
|
33
15
|
constructor() {
|
|
34
16
|
super("download-logs");
|
|
35
17
|
}
|
|
36
18
|
process(request, response, queryParams, body) {
|
|
37
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
return
|
|
20
|
+
return AdminBRModule_1.AdminBRModule.downloadFiles(body);
|
|
39
21
|
});
|
|
40
22
|
}
|
|
41
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":"
|
|
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,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,15 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
9
|
});
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
class ServerApi_GetReport extends
|
|
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 {
|
|
33
15
|
constructor() {
|
|
34
16
|
super("get-logs");
|
|
35
17
|
}
|
|
36
18
|
process(request, response, queryParams, body) {
|
|
37
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
return
|
|
20
|
+
return AdminBRModule_1.AdminBRModule.getFilesFirebase();
|
|
39
21
|
});
|
|
40
22
|
}
|
|
41
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-logs.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/get-logs.ts"],"names":[],"mappings":"
|
|
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,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,19 +9,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
9
|
});
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
class ServerApi_SendReport extends
|
|
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 {
|
|
34
16
|
constructor() {
|
|
35
17
|
super("report");
|
|
36
18
|
}
|
|
37
19
|
process(request, response, queryParams, body) {
|
|
38
20
|
var _a, _b, _c;
|
|
39
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const resp = yield
|
|
22
|
+
const resp = yield types_1.dispatch_queryRequestInfo.dispatchModuleAsync([request]);
|
|
41
23
|
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
|
|
24
|
+
return yield BugReportModule_1.BugReportModule.saveFile(body, userId);
|
|
43
25
|
});
|
|
44
26
|
}
|
|
45
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sGAAkH;AAClH,mFAAkH;AAElH,sEAAiE;AAEjE,MAAM,oBACF,SAAQ,2BAA4B;IAEpC;QACI,KAAK,CAAC,QAAQ,CAAC,CAAC;IACpB,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAuB;;;YAC5G,MAAM,IAAI,GAAG,MAAM,iCAAyB,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,iCAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;;KACvD;CACJ;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").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/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,35 +1,17 @@
|
|
|
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
|
-
*/
|
|
20
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
3
|
exports.Backend_ModulePack_BugReport = void 0;
|
|
22
4
|
const BugReportModule_1 = require("../modules/BugReportModule");
|
|
23
5
|
const AdminBRModule_1 = require("../modules/AdminBRModule");
|
|
24
6
|
const JiraBugReportIntegrator_1 = require("../modules/JiraBugReportIntegrator");
|
|
25
|
-
const jira_1 = require("@intuitionrobotics/jira");
|
|
26
7
|
const SlackBugReportIntegrator_1 = require("../modules/SlackBugReportIntegrator");
|
|
27
8
|
const SlackModule_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/SlackModule");
|
|
9
|
+
const JiraModule_1 = require("@intuitionrobotics/jira/app-backend/modules/JiraModule");
|
|
28
10
|
exports.Backend_ModulePack_BugReport = [
|
|
29
11
|
BugReportModule_1.BugReportModule,
|
|
30
12
|
AdminBRModule_1.AdminBRModule,
|
|
31
13
|
JiraBugReportIntegrator_1.JiraBugReportIntegrator,
|
|
32
|
-
|
|
14
|
+
JiraModule_1.JiraModule,
|
|
33
15
|
SlackBugReportIntegrator_1.SlackBugReportIntegrator,
|
|
34
16
|
SlackModule_1.SlackModule
|
|
35
17
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":"
|
|
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,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -28,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
12
|
exports.AdminBRModule = exports.AdminBRModule_Class = void 0;
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
class AdminBRModule_Class extends
|
|
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 {
|
|
34
16
|
constructor() {
|
|
35
17
|
super("AdminBRModule");
|
|
36
18
|
this.getFilesFirebase = () => __awaiter(this, void 0, void 0, function* () { return this.bugReport.getAll(); });
|
|
@@ -42,7 +24,7 @@ class AdminBRModule_Class extends ts_common_1.Module {
|
|
|
42
24
|
});
|
|
43
25
|
}
|
|
44
26
|
init() {
|
|
45
|
-
const sessAdmin =
|
|
27
|
+
const sessAdmin = FirebaseModule_1.FirebaseModule.createAdminSession();
|
|
46
28
|
const firestore = sessAdmin.getFirestore();
|
|
47
29
|
this.bugReport = firestore.getCollection('bug-report', ['_id']);
|
|
48
30
|
this.storage = sessAdmin.getStorage();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminBRModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/AdminBRModule.ts"],"names":[],"mappings":"
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { Module } from "@intuitionrobotics/ts-common";
|
|
2
|
-
import { BugReport, ReportLogFile, Request_BugReport } from "
|
|
1
|
+
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
2
|
+
import { BugReport, ReportLogFile, Request_BugReport } from "../../shared/api";
|
|
3
3
|
export declare type TicketDetails = {
|
|
4
4
|
platform: string;
|
|
5
5
|
issueId: string;
|
|
@@ -1,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -28,17 +10,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
12
|
exports.BugReportModule = exports.BugReportModule_Class = void 0;
|
|
31
|
-
const
|
|
32
|
-
const
|
|
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");
|
|
33
16
|
const JSZip = require("jszip");
|
|
34
|
-
|
|
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 {
|
|
35
21
|
constructor() {
|
|
36
22
|
super("BugReportModule");
|
|
37
23
|
this.ticketCreatorApis = [];
|
|
38
24
|
this.saveLog = (report, id) => __awaiter(this, void 0, void 0, function* () {
|
|
39
25
|
var _a;
|
|
40
26
|
const zip = new JSZip();
|
|
41
|
-
report.log.forEach((message, i) => zip.file(`${report.name}_${
|
|
27
|
+
report.log.forEach((message, i) => zip.file(`${report.name}_${string_tools_1.padNumber(i, 2)}.txt`, message));
|
|
42
28
|
const buffer = yield zip.generateAsync({ type: "nodebuffer" });
|
|
43
29
|
const bucket = yield this.storage.getOrCreateBucket((_a = this.config) === null || _a === void 0 ? void 0 : _a.bucket);
|
|
44
30
|
const fileName = `${id}-${report.name}.zip`;
|
|
@@ -51,31 +37,31 @@ class BugReportModule_Class extends ts_common_1.Module {
|
|
|
51
37
|
});
|
|
52
38
|
this.saveFile = (bugReport, email) => __awaiter(this, void 0, void 0, function* () {
|
|
53
39
|
var _b;
|
|
54
|
-
const _id =
|
|
40
|
+
const _id = random_tools_1.generateHex(16);
|
|
55
41
|
const logs = yield Promise.all(bugReport.reports.map(report => this.saveLog(report, _id)));
|
|
56
42
|
const instance = {
|
|
57
43
|
_id,
|
|
58
44
|
subject: bugReport.subject,
|
|
59
45
|
description: bugReport.description,
|
|
60
46
|
reports: logs,
|
|
61
|
-
_audit:
|
|
47
|
+
_audit: date_time_tools_1.auditBy(email || "bug-report"),
|
|
62
48
|
};
|
|
63
49
|
if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.bucket)
|
|
64
50
|
instance.bucket = this.config.bucket;
|
|
65
51
|
const tickets = yield Promise.all(this.ticketCreatorApis.map(api => api(bugReport, logs, email)));
|
|
66
|
-
instance.tickets =
|
|
52
|
+
instance.tickets = array_tools_1.filterInstances(tickets);
|
|
67
53
|
yield this.bugReport.insert(instance);
|
|
68
54
|
return instance.tickets;
|
|
69
55
|
});
|
|
70
56
|
}
|
|
71
57
|
init() {
|
|
72
|
-
const sessionAdmin =
|
|
58
|
+
const sessionAdmin = FirebaseModule_1.FirebaseModule.createAdminSession();
|
|
73
59
|
const firestore = sessionAdmin.getFirestore();
|
|
74
60
|
this.bugReport = firestore.getCollection('bug-report', ["_id"]);
|
|
75
61
|
this.storage = sessionAdmin.getStorage();
|
|
76
62
|
}
|
|
77
63
|
addTicketCreator(ticketCreator) {
|
|
78
|
-
|
|
64
|
+
this.ticketCreatorApis.push(ticketCreator);
|
|
79
65
|
}
|
|
80
66
|
}
|
|
81
67
|
exports.BugReportModule_Class = BugReportModule_Class;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugReportModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/BugReportModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BugReportModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/BugReportModule.ts"],"names":[],"mappings":"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"}
|
|
@@ -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 "../..";
|
|
4
1
|
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,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -28,27 +10,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
12
|
exports.JiraBugReportIntegrator = exports.JiraBugReportIntegrator_Class = void 0;
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
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 {
|
|
35
18
|
constructor() {
|
|
36
19
|
super("JiraBugReportIntegrator");
|
|
37
20
|
this.parser = (name) => `Bug: ${name}`;
|
|
38
21
|
this.openTicket = (bugReport, logs, reporter) => __awaiter(this, void 0, void 0, function* () {
|
|
39
22
|
var _a;
|
|
40
|
-
if (bugReport.platforms && !bugReport.platforms.includes(
|
|
23
|
+
if (bugReport.platforms && !bugReport.platforms.includes(api_1.Platform_Jira))
|
|
41
24
|
return;
|
|
42
25
|
if (!this.config.jiraProject)
|
|
43
|
-
throw new
|
|
26
|
+
throw new exceptions_1.ImplementationMissingException("missing Jira project in bug report configurations");
|
|
44
27
|
const description = logs.reduce((carry, log, i) => {
|
|
45
28
|
carry.push({ href: log.path, text: "\nClick to view logs (" + i + ")" });
|
|
46
29
|
return carry;
|
|
47
30
|
}, [bugReport.description]);
|
|
48
31
|
if (reporter)
|
|
49
32
|
description.push("\nReported by: " + reporter);
|
|
50
|
-
const issue = yield
|
|
51
|
-
return { platform:
|
|
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 };
|
|
52
35
|
});
|
|
53
36
|
}
|
|
54
37
|
setIssueTitleProcessor(parser) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JiraBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/JiraBugReportIntegrator.ts"],"names":[],"mappings":"
|
|
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;gBACtF,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;YACjB,CAAC,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;YAE5B,IAAI,QAAQ;gBACR,WAAW,CAAC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,CAAC;YAEnD,MAAM,KAAK,GAAG,MAAM,uBAAU,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,QACnI,IAAI,CAAC,MAAM,CAAC,KAAK,0CAAE,KAAK,CAAC,CAAC;YAC9B,OAAO,EAAC,QAAQ,EAAE,mBAAa,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,EAAC,CAAC;QACzD,CAAC,CAAA,CAAC;IA1BF,CAAC;IAED,sBAAsB,CAAC,MAAgC;QACnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CAuBJ;AAhCD,sEAgCC;AAEY,QAAA,uBAAuB,GAAG,IAAI,6BAA6B,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Module } from "@intuitionrobotics/ts-common";
|
|
2
|
-
import { ReportLogFile, Request_BugReport } from "../..";
|
|
3
1
|
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,22 +1,4 @@
|
|
|
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
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -28,17 +10,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
12
|
exports.SlackBugReportIntegrator = exports.SlackBugReportIntegrator_Class = void 0;
|
|
31
|
-
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
-
const __1 = require("../..");
|
|
33
13
|
const SlackModule_1 = require("@intuitionrobotics/thunderstorm//app-backend/modules/SlackModule");
|
|
34
|
-
|
|
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 {
|
|
35
19
|
constructor() {
|
|
36
20
|
super("SlackBugReportIntegrator");
|
|
37
21
|
this.openTicket = (bugReport, logs, reporter) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
if (bugReport.platforms && !bugReport.platforms.includes(
|
|
22
|
+
if (bugReport.platforms && !bugReport.platforms.includes(api_1.Platform_Slack))
|
|
39
23
|
return;
|
|
40
24
|
if (!this.config.channel)
|
|
41
|
-
throw new
|
|
25
|
+
throw new exceptions_1.ImplementationMissingException("Missing Slack Channel in bug report configurations");
|
|
42
26
|
let description = logs.reduce((carry, log, i) => {
|
|
43
27
|
return carry + "\n" + `<${log.path}|Click to view logs (${i})>`;
|
|
44
28
|
}, bugReport.subject + "\n" + bugReport.description);
|
|
@@ -49,7 +33,7 @@ class SlackBugReportIntegrator_Class extends ts_common_1.Module {
|
|
|
49
33
|
channel: this.config.channel
|
|
50
34
|
};
|
|
51
35
|
yield SlackModule_1.SlackModule.postMessage(slackMessage);
|
|
52
|
-
return { platform:
|
|
36
|
+
return { platform: api_1.Platform_Slack, issueId: random_tools_1.generateHex(32) };
|
|
53
37
|
});
|
|
54
38
|
}
|
|
55
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackBugReportIntegrator.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/SlackBugReportIntegrator.ts"],"names":[],"mappings":"
|
|
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,oDAAoD,CAAC,CAAC;YAEnG,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAa,EAAE,GAAkB,EAAE,CAAS,EAAE,EAAE;gBAC3E,OAAO,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,wBAAwB,CAAC,IAAI,CAAC;YACpE,CAAC,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;YAErD,IAAI,QAAQ;gBACR,WAAW,IAAI,iBAAiB,GAAG,QAAQ,CAAC;YAEhD,MAAM,YAAY,GAAG;gBACjB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;aAC/B,CAAC;YACF,MAAM,yBAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;YAC3C,OAAO,EAAC,QAAQ,EAAE,oBAAc,EAAE,OAAO,EAAE,0BAAW,CAAC,EAAE,CAAC,EAAC,CAAC;QAChE,CAAC,CAAA,CAAC;IAtBF,CAAC;CAuBJ;AA5BD,wEA4BC;AAEY,QAAA,wBAAwB,GAAG,IAAI,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,32 +1,4 @@
|
|
|
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
|
-
*/
|
|
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
3
|
exports.Frontend_ModulePack_BugReport = void 0;
|
|
32
4
|
const BugReportModule_1 = require("../modules/BugReportModule");
|
|
@@ -35,6 +7,4 @@ exports.Frontend_ModulePack_BugReport = [
|
|
|
35
7
|
BugReportModule_1.BugReportModule,
|
|
36
8
|
AdminBRModule_1.AdminBRModule
|
|
37
9
|
];
|
|
38
|
-
__exportStar(require("../modules/AdminBRModule"), exports);
|
|
39
|
-
__exportStar(require("../modules/BugReportModule"), exports);
|
|
40
10
|
//# sourceMappingURL=module-pack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";;;AAAA,gEAA2D;AAC3D,4DAAuD;AAE1C,QAAA,6BAA6B,GAAG;IACzC,iCAAe;IACf,6BAAa;CAChB,CAAC"}
|