@intuitionrobotics/bug-report 2.2.3 → 2.3.2
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/dist/app-backend/api/routes.d.ts.map +1 -1
- package/dist/app-backend/api/routes.js +8 -8
- package/dist/app-backend/api/routes.js.map +1 -1
- package/dist/app-backend/api/v1/bug-reports/download.d.ts +3 -12
- package/dist/app-backend/api/v1/bug-reports/download.d.ts.map +1 -1
- package/dist/app-backend/api/v1/bug-reports/download.js +5 -10
- package/dist/app-backend/api/v1/bug-reports/download.js.map +1 -1
- package/dist/app-backend/api/v1/bug-reports/get-logs.d.ts +2 -7
- package/dist/app-backend/api/v1/bug-reports/get-logs.d.ts.map +1 -1
- package/dist/app-backend/api/v1/bug-reports/get-logs.js +4 -10
- package/dist/app-backend/api/v1/bug-reports/get-logs.js.map +1 -1
- package/dist/app-backend/api/v1/bug-reports/reports.d.ts +11 -8
- package/dist/app-backend/api/v1/bug-reports/reports.d.ts.map +1 -1
- package/dist/app-backend/api/v1/bug-reports/reports.js +17 -22
- package/dist/app-backend/api/v1/bug-reports/reports.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAe/B,eAAO,MAAM,eAAe,EAAE,MAAiB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Hand-edit this from here. The tool runs ONCE; do not regenerate.
|
|
1
|
+
// Hand-wired handler(fn) routes for the bug-report lib.
|
|
3
2
|
import { Router } from "express";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { handler, validateBody } from "@intuitionrobotics/thunderstorm/backend";
|
|
4
|
+
import { download } from "./v1/bug-reports/download.js";
|
|
5
|
+
import { getLogs } from "./v1/bug-reports/get-logs.js";
|
|
6
|
+
import { reports, reportsValidator } from "./v1/bug-reports/reports.js";
|
|
7
7
|
const bugReports = Router();
|
|
8
|
-
bugReports.post("/download", download
|
|
9
|
-
bugReports.get("/get-logs", getLogs
|
|
10
|
-
bugReports.post("/reports", reports
|
|
8
|
+
bugReports.post("/download", handler(download));
|
|
9
|
+
bugReports.get("/get-logs", handler(getLogs));
|
|
10
|
+
bugReports.post("/reports", validateBody(reportsValidator), handler(reports));
|
|
11
11
|
const v1 = Router();
|
|
12
12
|
v1.use("/bug-reports", bugReports);
|
|
13
13
|
export const bugReportRoutes = Router();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/routes.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAC,OAAO,EAAE,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAE9E,OAAO,EAAC,QAAQ,EAAC,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAC,OAAO,EAAE,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAEtE,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;AAC5B,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAChD,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9C,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAE9E,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AACpB,EAAE,CAAC,GAAG,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAW,MAAM,EAAE,CAAC;AAChD,eAAe,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ApiPostPath
|
|
3
|
-
declare
|
|
4
|
-
constructor();
|
|
5
|
-
protected process(request: ExpressRequest, response: ApiResponse, queryParams: {}, body: Paths): Promise<{
|
|
6
|
-
fileName: string;
|
|
7
|
-
securedUrl: string;
|
|
8
|
-
publicUrl: string;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: ServerApi_DownloadLogs;
|
|
12
|
-
export default _default;
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type ApiPostPath } from "./_imports.js";
|
|
3
|
+
export declare const download: TypedHandler<ApiPostPath>;
|
|
13
4
|
//# sourceMappingURL=download.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAgB,KAAK,WAAW,EAAa,MAAM,eAAe,CAAC;AAC1E,eAAO,MAAM,QAAQ,EAAE,YAAY,CAAC,WAAW,CAG9C,CAAC"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AdminBRModule } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
async process(request, response, queryParams, body) {
|
|
8
|
-
return AdminBRModule.downloadFiles(body);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export default new ServerApi_DownloadLogs();
|
|
3
|
+
export const download = async (req) => {
|
|
4
|
+
const body = req.body;
|
|
5
|
+
return AdminBRModule.downloadFiles(body);
|
|
6
|
+
};
|
|
12
7
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,aAAa,EAA+B,MAAM,eAAe,CAAC;AAC1E,MAAM,CAAC,MAAM,QAAQ,GAA8B,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7D,MAAM,IAAI,GAAG,GAAG,CAAC,IAAa,CAAC;IAC/B,OAAO,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { type ApiGetLog } from "./_imports.js";
|
|
3
|
-
declare
|
|
4
|
-
constructor();
|
|
5
|
-
protected process(_request: ExpressRequest, _response: ApiResponse, _queryParams: {}, _body: void): Promise<import("./_imports.js").DB_BugReport[]>;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: ServerApi_GetReport;
|
|
8
|
-
export default _default;
|
|
3
|
+
export declare const getLogs: TypedHandler<ApiGetLog>;
|
|
9
4
|
//# sourceMappingURL=get-logs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-logs.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/get-logs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-logs.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/get-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAgB,KAAK,SAAS,EAAC,MAAM,eAAe,CAAC;AAC5D,eAAO,MAAM,OAAO,EAAE,YAAY,CAAC,SAAS,CAE3C,CAAC"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { AdminBRModule } from "./_imports.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
async process(_request, _response, _queryParams, _body) {
|
|
8
|
-
return AdminBRModule.getFilesFirebase();
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export default new ServerApi_GetReport();
|
|
3
|
+
export const getLogs = async (req) => {
|
|
4
|
+
return AdminBRModule.getFilesFirebase();
|
|
5
|
+
};
|
|
12
6
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"get-logs.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/get-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAiB,MAAM,eAAe,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAA4B,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1D,OAAO,aAAa,CAAC,gBAAgB,EAAE,CAAC;AAC5C,CAAC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ApiBugReport
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { type TypedHandler } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
+
import { type ApiBugReport } from "./_imports.js";
|
|
3
|
+
export declare const reportsValidator: {
|
|
4
|
+
subject: import("@intuitionrobotics/ts-common").Validator<any>;
|
|
5
|
+
description: import("@intuitionrobotics/ts-common").Validator<any>;
|
|
6
|
+
reports: import("@intuitionrobotics/ts-common").Validator<{
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}[]>;
|
|
9
|
+
platforms: import("@intuitionrobotics/ts-common").Validator<any[]>;
|
|
10
|
+
};
|
|
11
|
+
export declare const reports: TypedHandler<ApiBugReport>;
|
|
9
12
|
//# sourceMappingURL=reports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,YAAY,EAAsB,MAAM,yCAAyC,CAAC;AAC1H,OAAO,EAAC,KAAK,YAAY,EAA0C,MAAM,eAAe,CAAC;AAEzF,eAAO,MAAM,gBAAgB;;;;;;;CAQzB,CAAC;AAEL,eAAO,MAAM,OAAO,EAAE,YAAY,CAAC,YAAY,CAM9C,CAAC"}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dispatch_queryRequestInfo } from "@intuitionrobotics/thunderstorm/backend";
|
|
2
2
|
import { BugReportModule } from "./_imports.js";
|
|
3
3
|
import { validateArray, validateObjectValues, validateString } from "@intuitionrobotics/ts-common";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const userId = resp.find(e => e.key === 'AccountsModule')?.data?.email || resp.find(e => e.key === 'RemoteProxy')?.data;
|
|
21
|
-
return await BugReportModule.saveFile(body, userId);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export default new ServerApi_SendReport();
|
|
4
|
+
export const reportsValidator = {
|
|
5
|
+
subject: validateString(),
|
|
6
|
+
description: validateString(),
|
|
7
|
+
reports: validateArray(validateObjectValues({
|
|
8
|
+
name: validateString(),
|
|
9
|
+
log: validateArray(validateString())
|
|
10
|
+
})),
|
|
11
|
+
platforms: validateArray(validateString())
|
|
12
|
+
};
|
|
13
|
+
export const reports = async (req) => {
|
|
14
|
+
const request = req;
|
|
15
|
+
const body = req.body;
|
|
16
|
+
const resp = await dispatch_queryRequestInfo.dispatchModuleAsync(request);
|
|
17
|
+
const userId = resp.find(e => e.key === 'AccountsModule')?.data?.email || resp.find(e => e.key === 'RemoteProxy')?.data;
|
|
18
|
+
return await BugReportModule.saveFile(body, userId);
|
|
19
|
+
};
|
|
25
20
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/bug-reports/reports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,yBAAyB,EAAyC,MAAM,yCAAyC,CAAC;AAC1H,OAAO,EAAoB,eAAe,EAAyB,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAC;AACjG,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE,cAAc,EAAE;IACzB,WAAW,EAAE,cAAc,EAAE;IAC7B,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC;QAC3C,IAAI,EAAE,cAAc,EAAE;QACtB,GAAG,EAAE,aAAa,CAAC,cAAc,EAAE,CAAC;KAC7B,CAAC,CAAC;IACV,SAAS,EAAE,aAAa,CAAC,cAAc,EAAE,CAAC;CAC1C,CAAC;AAEL,MAAM,CAAC,MAAM,OAAO,GAA+B,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7D,MAAM,OAAO,GAAG,GAAqB,CAAC;IACtC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAyB,CAAC;IAC3C,MAAM,IAAI,GAAG,MAAM,yBAAyB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAuB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,aAAa,CAAC,EAAE,IAAI,CAAC;IAC5I,OAAO,MAAM,eAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC,CAAC"}
|