@intuitionrobotics/thunderstorm 0.45.5 → 0.45.6
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LogClient } from "@intuitionrobotics/ts-common";
|
|
1
2
|
import { HttpServer_Class, RouteResolver } from "../modules/server/HttpServer";
|
|
2
3
|
import { ServerApi } from "../modules/server/server-api";
|
|
3
4
|
import { BaseStorm } from "./BaseStorm";
|
|
@@ -9,7 +10,8 @@ export declare class Storm extends BaseStorm {
|
|
|
9
10
|
private apis;
|
|
10
11
|
private readonly express;
|
|
11
12
|
private readonly httpServer;
|
|
12
|
-
|
|
13
|
+
private logClient;
|
|
14
|
+
constructor(_express?: Express, logClient?: LogClient);
|
|
13
15
|
static getInstance(): Storm;
|
|
14
16
|
getHttpServer(): HttpServer_Class;
|
|
15
17
|
init(): this;
|
|
@@ -29,13 +29,14 @@ const server_api_1 = require("../modules/server/server-api");
|
|
|
29
29
|
const BaseStorm_1 = require("./BaseStorm");
|
|
30
30
|
const express = require("express");
|
|
31
31
|
class Storm extends BaseStorm_1.BaseStorm {
|
|
32
|
-
constructor(_express) {
|
|
32
|
+
constructor(_express, logClient = ts_common_1.LogClient_Function) {
|
|
33
33
|
super();
|
|
34
34
|
this.functions = [];
|
|
35
35
|
this.apis = [];
|
|
36
36
|
this.express = _express || express();
|
|
37
37
|
this.httpServer = new HttpServer_1.HttpServer_Class(this.express);
|
|
38
38
|
this.addModules(this.httpServer, backend_1.FirebaseModule);
|
|
39
|
+
this.logClient = logClient;
|
|
39
40
|
}
|
|
40
41
|
static getInstance() {
|
|
41
42
|
return Storm.instance;
|
|
@@ -45,7 +46,7 @@ class Storm extends BaseStorm_1.BaseStorm {
|
|
|
45
46
|
}
|
|
46
47
|
init() {
|
|
47
48
|
var _a;
|
|
48
|
-
ts_common_1.BeLogged.addClient(process.env.GCLOUD_PROJECT && process.env.FUNCTIONS_EMULATOR ? ts_common_1.LogClient_Terminal :
|
|
49
|
+
ts_common_1.BeLogged.addClient(process.env.GCLOUD_PROJECT && process.env.FUNCTIONS_EMULATOR ? ts_common_1.LogClient_Terminal : this.logClient);
|
|
49
50
|
server_api_1.ServerApi.isDebug = !!((_a = this.config) === null || _a === void 0 ? void 0 : _a.isDebug);
|
|
50
51
|
super.init();
|
|
51
52
|
const urlPrefix = !process.env.GCLOUD_PROJECT ? this.initialPath : "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storm.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/Storm.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,iEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"Storm.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/Storm.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,iEAAmE;AACnE,4DAAiH;AACjH,qFAAyG;AACzG,6DAA6E;AAC7E,6DAAuD;AACvD,2CAAsC;AAEtC,mCAAmC;AAEnC,MAAa,KACT,SAAQ,qBAAS;IASjB,YAAY,QAAkB,EAAE,YAAuB,8BAAkB;QACrE,KAAK,EAAE,CAAC;QAPJ,cAAS,GAAU,EAAE,CAAC;QACtB,SAAI,GAAqB,EAAE,CAAC;QAOhC,IAAI,CAAC,OAAO,GAAG,QAAQ,IAAI,OAAO,EAAE,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,6BAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,wBAAc,CAAC,CAAC;QAEjD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,WAAW;QACd,OAAO,KAAK,CAAC,QAAiB,CAAA;IAClC,CAAC;IAED,aAAa;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,C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