@objectstack/runtime 3.2.1 → 3.2.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/http-dispatcher.test.ts +3 -3
- package/src/http-dispatcher.ts +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -486,7 +486,7 @@ declare class HttpDispatcher {
|
|
|
486
486
|
* Handles Analytics requests
|
|
487
487
|
* path: sub-path after /analytics/
|
|
488
488
|
*/
|
|
489
|
-
handleAnalytics(path: string, method: string, body: any,
|
|
489
|
+
handleAnalytics(path: string, method: string, body: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
|
|
490
490
|
/**
|
|
491
491
|
* Handles i18n requests
|
|
492
492
|
* path: sub-path after /i18n/
|
package/dist/index.d.ts
CHANGED
|
@@ -486,7 +486,7 @@ declare class HttpDispatcher {
|
|
|
486
486
|
* Handles Analytics requests
|
|
487
487
|
* path: sub-path after /analytics/
|
|
488
488
|
*/
|
|
489
|
-
handleAnalytics(path: string, method: string, body: any,
|
|
489
|
+
handleAnalytics(path: string, method: string, body: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
|
|
490
490
|
/**
|
|
491
491
|
* Handles i18n requests
|
|
492
492
|
* path: sub-path after /i18n/
|
package/dist/index.js
CHANGED
|
@@ -565,21 +565,21 @@ var HttpDispatcher = class {
|
|
|
565
565
|
* Handles Analytics requests
|
|
566
566
|
* path: sub-path after /analytics/
|
|
567
567
|
*/
|
|
568
|
-
async handleAnalytics(path, method, body,
|
|
568
|
+
async handleAnalytics(path, method, body, _context) {
|
|
569
569
|
const analyticsService = await this.getService(CoreServiceName.enum.analytics);
|
|
570
570
|
if (!analyticsService) return { handled: false };
|
|
571
571
|
const m = method.toUpperCase();
|
|
572
572
|
const subPath = path.replace(/^\/+/, "");
|
|
573
573
|
if (subPath === "query" && m === "POST") {
|
|
574
|
-
const result = await analyticsService.query(body
|
|
574
|
+
const result = await analyticsService.query(body);
|
|
575
575
|
return { handled: true, response: this.success(result) };
|
|
576
576
|
}
|
|
577
577
|
if (subPath === "meta" && m === "GET") {
|
|
578
|
-
const result = await analyticsService.
|
|
578
|
+
const result = await analyticsService.getMeta();
|
|
579
579
|
return { handled: true, response: this.success(result) };
|
|
580
580
|
}
|
|
581
581
|
if (subPath === "sql" && m === "POST") {
|
|
582
|
-
const result = await analyticsService.generateSql(body
|
|
582
|
+
const result = await analyticsService.generateSql(body);
|
|
583
583
|
return { handled: true, response: this.success(result) };
|
|
584
584
|
}
|
|
585
585
|
return { handled: false };
|