@intuitionrobotics/thunderstorm 0.41.69 → 0.41.70
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/v1/utils/version/_assert.js +1 -1
- package/app-backend/api/v1/utils/version/_assert.js.map +1 -1
- package/app-backend/api/v1/utils/version/assert.js +13 -58
- package/app-backend/api/v1/utils/version/assert.js.map +1 -1
- package/app-backend/core/BaseStorm.js +34 -87
- package/app-backend/core/BaseStorm.js.map +1 -1
- package/app-backend/core/Storm.js +42 -112
- package/app-backend/core/Storm.js.map +1 -1
- package/app-backend/exceptions.js +11 -27
- package/app-backend/exceptions.js.map +1 -1
- package/app-backend/modules/CleanupScheduler.js +24 -92
- package/app-backend/modules/CleanupScheduler.js.map +1 -1
- package/app-backend/modules/FirestoreBackupScheduler.js +47 -138
- package/app-backend/modules/FirestoreBackupScheduler.js.map +1 -1
- package/app-backend/modules/ForceUpgrade.js +31 -82
- package/app-backend/modules/ForceUpgrade.js.map +1 -1
- package/app-backend/modules/http/AxiosHttpModule.js +116 -184
- package/app-backend/modules/http/AxiosHttpModule.js.map +1 -1
- package/app-backend/modules/proxy/RemoteProxy.js +40 -90
- package/app-backend/modules/proxy/RemoteProxy.js.map +1 -1
- package/app-backend/modules/proxy/RemoteProxyCaller.js +49 -122
- package/app-backend/modules/proxy/RemoteProxyCaller.js.map +1 -1
- package/app-backend/modules/server/HttpServer.js +153 -216
- package/app-backend/modules/server/HttpServer.js.map +1 -1
- package/app-backend/modules/server/server-api.js +236 -361
- package/app-backend/modules/server/server-api.js.map +1 -1
- package/app-backend/modules/server/server-errors.js +51 -91
- package/app-backend/modules/server/server-errors.js.map +1 -1
- package/app-backend/utils/LogClient_File.js +23 -42
- package/app-backend/utils/LogClient_File.js.map +1 -1
- package/app-backend/utils/file.js +7 -50
- package/app-backend/utils/file.js.map +1 -1
- package/app-backend/utils/promisify-request.js +13 -43
- package/app-backend/utils/promisify-request.js.map +1 -1
- package/app-backend/utils/to-be-removed.js +7 -8
- package/app-backend/utils/to-be-removed.js.map +1 -1
- package/app-backend/utils/types.js +1 -1
- package/app-backend/utils/types.js.map +1 -1
- package/app-frontend/components/ActionButton.js +5 -5
- package/app-frontend/components/ActionButton.js.map +1 -1
- package/app-frontend/components/DropDown.js +91 -119
- package/app-frontend/components/DropDown.js.map +1 -1
- package/app-frontend/components/FilterInput.js +31 -48
- package/app-frontend/components/FilterInput.js.map +1 -1
- package/app-frontend/components/GenericSelect.js +30 -59
- package/app-frontend/components/GenericSelect.js.map +1 -1
- package/app-frontend/components/GenericTabs.js +5 -23
- package/app-frontend/components/GenericTabs.js.map +1 -1
- package/app-frontend/components/Overlay.js +15 -34
- package/app-frontend/components/Overlay.js.map +1 -1
- package/app-frontend/components/TS_Input.js +43 -60
- package/app-frontend/components/TS_Input.js.map +1 -1
- package/app-frontend/components/TS_Table.js +31 -48
- package/app-frontend/components/TS_Table.js.map +1 -1
- package/app-frontend/components/TS_TextArea.js +21 -48
- package/app-frontend/components/TS_TextArea.js.map +1 -1
- package/app-frontend/components/Tabs.js +16 -33
- package/app-frontend/components/Tabs.js.map +1 -1
- package/app-frontend/components/adapter/Adapter.js +103 -154
- package/app-frontend/components/adapter/Adapter.js.map +1 -1
- package/app-frontend/components/adapter/BaseRenderer.js +9 -32
- package/app-frontend/components/adapter/BaseRenderer.js.map +1 -1
- package/app-frontend/components/checkbox/TS_Checkbox.js +12 -29
- package/app-frontend/components/checkbox/TS_Checkbox.js.map +1 -1
- package/app-frontend/components/checkbox/TS_CheckboxField.js +16 -34
- package/app-frontend/components/checkbox/TS_CheckboxField.js.map +1 -1
- package/app-frontend/components/form/Form.js +21 -39
- package/app-frontend/components/form/Form.js.map +1 -1
- package/app-frontend/components/playground/Example_NewProps.js +25 -53
- package/app-frontend/components/playground/Example_NewProps.js.map +1 -1
- package/app-frontend/components/playground/Playground.js +21 -49
- package/app-frontend/components/playground/Playground.js.map +1 -1
- package/app-frontend/components/tree/MenuComponent.js +11 -27
- package/app-frontend/components/tree/MenuComponent.js.map +1 -1
- package/app-frontend/components/tree/MultiTypeAdaptor.js +16 -32
- package/app-frontend/components/tree/MultiTypeAdaptor.js.map +1 -1
- package/app-frontend/components/tree/SimpleTreeNodeRenderer.js +18 -52
- package/app-frontend/components/tree/SimpleTreeNodeRenderer.js.map +1 -1
- package/app-frontend/components/tree/Tree.js +142 -178
- package/app-frontend/components/tree/Tree.js.map +1 -1
- package/app-frontend/components/treeicons.js +5 -5
- package/app-frontend/components/treeicons.js.map +1 -1
- package/app-frontend/core/AbstractThunder.js +27 -43
- package/app-frontend/core/AbstractThunder.js.map +1 -1
- package/app-frontend/core/AppPage.js +16 -32
- package/app-frontend/core/AppPage.js.map +1 -1
- package/app-frontend/core/AppWrapper.js +9 -10
- package/app-frontend/core/AppWrapper.js.map +1 -1
- package/app-frontend/core/BaseComponent.js +62 -106
- package/app-frontend/core/BaseComponent.js.map +1 -1
- package/app-frontend/core/SimpleScriptInjector.js +12 -31
- package/app-frontend/core/SimpleScriptInjector.js.map +1 -1
- package/app-frontend/core/Thunder.js +32 -48
- package/app-frontend/core/Thunder.js.map +1 -1
- package/app-frontend/core/thunder-dispatcher.js +18 -67
- package/app-frontend/core/thunder-dispatcher.js.map +1 -1
- package/app-frontend/modules/ConnectivityModule.js +16 -32
- package/app-frontend/modules/ConnectivityModule.js.map +1 -1
- package/app-frontend/modules/ForceUpgrade.js +17 -33
- package/app-frontend/modules/ForceUpgrade.js.map +1 -1
- package/app-frontend/modules/HistoryModule.js +51 -79
- package/app-frontend/modules/HistoryModule.js.map +1 -1
- package/app-frontend/modules/ResourcesModule.js +12 -28
- package/app-frontend/modules/ResourcesModule.js.map +1 -1
- package/app-frontend/modules/StorageModule.js +47 -68
- package/app-frontend/modules/StorageModule.js.map +1 -1
- package/app-frontend/modules/ThunderstormModule.js +15 -31
- package/app-frontend/modules/ThunderstormModule.js.map +1 -1
- package/app-frontend/modules/component-loader/ReactEntryComponentInjector.js +24 -41
- package/app-frontend/modules/component-loader/ReactEntryComponentInjector.js.map +1 -1
- package/app-frontend/modules/component-loader/entry-component-loading-module.js +19 -36
- package/app-frontend/modules/component-loader/entry-component-loading-module.js.map +1 -1
- package/app-frontend/modules/dialog/Dialog.js +55 -96
- package/app-frontend/modules/dialog/Dialog.js.map +1 -1
- package/app-frontend/modules/dialog/DialogModule.js +48 -84
- package/app-frontend/modules/dialog/DialogModule.js.map +1 -1
- package/app-frontend/modules/http/HttpClient.js +46 -93
- package/app-frontend/modules/http/HttpClient.js.map +1 -1
- package/app-frontend/modules/http/XhrHttpModule.js +66 -88
- package/app-frontend/modules/http/XhrHttpModule.js.map +1 -1
- package/app-frontend/modules/locale/LocaleModule.js +23 -50
- package/app-frontend/modules/locale/LocaleModule.js.map +1 -1
- package/app-frontend/modules/menu/MenuAndButton.js +23 -40
- package/app-frontend/modules/menu/MenuAndButton.js.map +1 -1
- package/app-frontend/modules/menu/MenuModule.js +25 -42
- package/app-frontend/modules/menu/MenuModule.js.map +1 -1
- package/app-frontend/modules/menu/PopupMenu.js +37 -64
- package/app-frontend/modules/menu/PopupMenu.js.map +1 -1
- package/app-frontend/modules/routing/RoutingModule.js +47 -66
- package/app-frontend/modules/routing/RoutingModule.js.map +1 -1
- package/app-frontend/modules/routing/route.js +31 -33
- package/app-frontend/modules/routing/route.js.map +1 -1
- package/app-frontend/modules/toaster/BaseToaster.js +18 -36
- package/app-frontend/modules/toaster/BaseToaster.js.map +1 -1
- package/app-frontend/modules/toaster/Toaster.js +12 -38
- package/app-frontend/modules/toaster/Toaster.js.map +1 -1
- package/app-frontend/modules/toaster/ToasterModule.js +61 -88
- package/app-frontend/modules/toaster/ToasterModule.js.map +1 -1
- package/app-frontend/modules/tooltip/Tooltip.js +25 -52
- package/app-frontend/modules/tooltip/Tooltip.js.map +1 -1
- package/app-frontend/modules/tooltip/TooltipModule.js +32 -51
- package/app-frontend/modules/tooltip/TooltipModule.js.map +1 -1
- package/app-frontend/tools/KeyboardListener.js +24 -41
- package/app-frontend/tools/KeyboardListener.js.map +1 -1
- package/app-frontend/tools/Stylable.js +14 -28
- package/app-frontend/tools/Stylable.js.map +1 -1
- package/app-frontend/utils/tools.js +8 -8
- package/app-frontend/utils/tools.js.map +1 -1
- package/app-frontend/widgets/FieldEditor.js +16 -32
- package/app-frontend/widgets/FieldEditor.js.map +1 -1
- package/app-frontend/widgets/FieldEditorClick.js +32 -49
- package/app-frontend/widgets/FieldEditorClick.js.map +1 -1
- package/app-frontend/widgets/FieldEditorWithButtons.js +33 -49
- package/app-frontend/widgets/FieldEditorWithButtons.js.map +1 -1
- package/app-frontend/widgets/click-to-drag/ClickToDrag.js +25 -41
- package/app-frontend/widgets/click-to-drag/ClickToDrag.js.map +1 -1
- package/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.js +22 -38
- package/app-frontend/widgets/click-to-drag/OverlayWithDocumentListener.js.map +1 -1
- package/package.json +4 -4
- package/shared/BaseHttpModule.js +44 -64
- package/shared/BaseHttpModule.js.map +1 -1
- package/shared/BaseHttpRequest.js +122 -176
- package/shared/BaseHttpRequest.js.map +1 -1
- package/shared/request-types.js +4 -19
- package/shared/request-types.js.map +1 -1
- package/test-backend/StormTester.js +37 -90
- package/test-backend/StormTester.js.map +1 -1
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
|
|
23
|
+
const HttpServer_1 = require("../../../../modules/server/HttpServer");
|
|
24
24
|
module.exports = new HttpServer_1.RouteResolver(require, __dirname);
|
|
25
25
|
//# sourceMappingURL=_assert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_assert.js","sourceRoot":"","sources":["../../../../../../src/main/app-backend/api/v1/utils/version/_assert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAEH,
|
|
1
|
+
{"version":3,"file":"_assert.js","sourceRoot":"","sources":["../../../../../../src/main/app-backend/api/v1/utils/version/_assert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAEH,sEAAoE;AAEpE,MAAM,CAAC,OAAO,GAAG,IAAI,0BAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -19,19 +19,6 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
23
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
24
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -41,53 +28,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
41
28
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
29
|
});
|
|
43
30
|
};
|
|
44
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
45
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
46
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
47
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
48
|
-
function step(op) {
|
|
49
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
50
|
-
while (_) try {
|
|
51
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
52
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
53
|
-
switch (op[0]) {
|
|
54
|
-
case 0: case 1: t = op; break;
|
|
55
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
56
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
57
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
58
|
-
default:
|
|
59
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
60
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
62
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
63
|
-
if (t[2]) _.ops.pop();
|
|
64
|
-
_.trys.pop(); continue;
|
|
65
|
-
}
|
|
66
|
-
op = body.call(thisArg, _);
|
|
67
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
68
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
_this.addHeaderToLog(force_upgrade_1.HeaderKey_AppVersion, force_upgrade_1.HeaderKey_BrowserType, force_upgrade_1.HeaderKey_UserAgent);
|
|
81
|
-
return _this;
|
|
32
|
+
const force_upgrade_1 = require("../../../../../shared/force-upgrade");
|
|
33
|
+
const server_api_1 = require("../../../../modules/server/server-api");
|
|
34
|
+
const types_1 = require("../../../../../shared/types");
|
|
35
|
+
const ForceUpgrade_1 = require("../../../../modules/ForceUpgrade");
|
|
36
|
+
class ServerApi_AssertAppVersion extends server_api_1.ServerApi {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(types_1.HttpMethod.GET, "assert");
|
|
39
|
+
this.addHeaderToLog(force_upgrade_1.HeaderKey_AppVersion, force_upgrade_1.HeaderKey_BrowserType, force_upgrade_1.HeaderKey_UserAgent);
|
|
82
40
|
}
|
|
83
|
-
|
|
84
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
return
|
|
86
|
-
return [2 /*return*/, ForceUpgrade_1.ForceUpgrade.compareVersion(request)];
|
|
87
|
-
});
|
|
41
|
+
process(request, response, queryParams, body) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return ForceUpgrade_1.ForceUpgrade.compareVersion(request);
|
|
88
44
|
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}(server_api_1.ServerApi));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
92
47
|
module.exports = new ServerApi_AssertAppVersion();
|
|
93
48
|
//# sourceMappingURL=assert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../../../src/main/app-backend/api/v1/utils/version/assert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../../../src/main/app-backend/api/v1/utils/version/assert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;AAGH,uEAK6C;AAC7C,sEAG+C;AAC/C,uDAAuD;AACvD,mEAE0C;AAI1C,MAAM,0BACL,SAAQ,sBAAqC;IAE7C;QACC,KAAK,CAAC,kBAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAChC,IAAI,CAAC,cAAc,CAAC,oCAAoB,EAAE,qCAAqB,EAAE,mCAAmB,CAAC,CAAC;IACvF,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAU;;YAClG,OAAO,2BAAY,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;KAAA;CACD;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,0BAA0B,EAAE,CAAC"}
|
|
@@ -19,19 +19,6 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
23
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
24
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -41,87 +28,47 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
41
28
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
29
|
});
|
|
43
30
|
};
|
|
44
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
45
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
46
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
47
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
48
|
-
function step(op) {
|
|
49
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
50
|
-
while (_) try {
|
|
51
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
52
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
53
|
-
switch (op[0]) {
|
|
54
|
-
case 0: case 1: t = op; break;
|
|
55
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
56
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
57
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
58
|
-
default:
|
|
59
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
60
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
62
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
63
|
-
if (t[2]) _.ops.pop();
|
|
64
|
-
_.trys.pop(); continue;
|
|
65
|
-
}
|
|
66
|
-
op = body.call(thisArg, _);
|
|
67
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
68
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72
32
|
exports.BaseStorm = void 0;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
database = backend_1.FirebaseModule.createAdminSession().getDatabase();
|
|
88
|
-
initialized = 0;
|
|
89
|
-
listener = function (resolve) { return function (snapshot) {
|
|
90
|
-
if (initialized >= 2) {
|
|
91
|
-
console.log("CONFIGURATION HAS CHANGED... KILLING PROCESS!!!");
|
|
92
|
-
process.exit(2);
|
|
93
|
-
}
|
|
94
|
-
resolve(snapshot || {});
|
|
95
|
-
initialized++;
|
|
96
|
-
}; };
|
|
97
|
-
defaultPromise = new Promise(function (resolve) {
|
|
98
|
-
database.listen("/_config/default", listener(resolve));
|
|
99
|
-
});
|
|
100
|
-
envPromise = new Promise(function (resolve) {
|
|
101
|
-
database.listen("/_config/" + _this.envKey, listener(resolve));
|
|
102
|
-
});
|
|
103
|
-
return [4 /*yield*/, Promise.all([
|
|
104
|
-
defaultPromise,
|
|
105
|
-
envPromise
|
|
106
|
-
])];
|
|
107
|
-
case 1:
|
|
108
|
-
_a = _b.sent(), defaultConfig = _a[0], overrideConfig = _a[1];
|
|
109
|
-
merge1 = ts_common_1.merge(defaultConfig, overrideConfig);
|
|
110
|
-
this.setConfig(ts_common_1.merge(merge1, this.override) || {});
|
|
111
|
-
return [2 /*return*/];
|
|
33
|
+
const backend_1 = require("@intuitionrobotics/firebase/backend");
|
|
34
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
35
|
+
class BaseStorm extends ts_common_1.ModuleManager {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this.envKey = "dev";
|
|
39
|
+
this.override = {};
|
|
40
|
+
this.resolveConfig = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const database = backend_1.FirebaseModule.createAdminSession().getDatabase();
|
|
42
|
+
let initialized = 0;
|
|
43
|
+
const listener = (resolve) => (snapshot) => {
|
|
44
|
+
if (initialized >= 2) {
|
|
45
|
+
console.log("CONFIGURATION HAS CHANGED... KILLING PROCESS!!!");
|
|
46
|
+
process.exit(2);
|
|
112
47
|
}
|
|
48
|
+
resolve(snapshot || {});
|
|
49
|
+
initialized++;
|
|
50
|
+
};
|
|
51
|
+
const defaultPromise = new Promise((resolve) => {
|
|
52
|
+
database.listen(`/_config/default`, listener(resolve));
|
|
53
|
+
});
|
|
54
|
+
const envPromise = new Promise((resolve) => {
|
|
55
|
+
database.listen(`/_config/${this.envKey}`, listener(resolve));
|
|
113
56
|
});
|
|
114
|
-
|
|
115
|
-
|
|
57
|
+
const [defaultConfig, overrideConfig] = yield Promise.all([
|
|
58
|
+
defaultPromise,
|
|
59
|
+
envPromise
|
|
60
|
+
]);
|
|
61
|
+
const merge1 = ts_common_1.merge(defaultConfig, overrideConfig);
|
|
62
|
+
this.setConfig(ts_common_1.merge(merge1, this.override) || {});
|
|
63
|
+
});
|
|
116
64
|
}
|
|
117
|
-
|
|
65
|
+
setEnvironment(envKey) {
|
|
118
66
|
this.envKey = envKey;
|
|
119
67
|
return this;
|
|
120
|
-
}
|
|
121
|
-
|
|
68
|
+
}
|
|
69
|
+
setOverride(override) {
|
|
122
70
|
this.override = override;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}(ts_common_1.ModuleManager));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
126
73
|
exports.BaseStorm = BaseStorm;
|
|
127
74
|
//# sourceMappingURL=BaseStorm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseStorm.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/BaseStorm.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"BaseStorm.js","sourceRoot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AAE,cAAc,CAAC,CAAC;YACpD,IAAI,CAAC,SAAS,CAAC,iBAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QACpD,CAAC,CAAA,CAAC;IACH,CAAC;IA3CA,cAAc,CAAC,MAAc;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,WAAW,CAAC,QAAkB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IACzB,CAAC;CAoCD;AAjDD,8BAiDC"}
|
|
@@ -19,19 +19,6 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
23
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
24
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -41,127 +28,70 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
41
28
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
29
|
});
|
|
43
30
|
};
|
|
44
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
45
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
46
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
47
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
48
|
-
function step(op) {
|
|
49
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
50
|
-
while (_) try {
|
|
51
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
52
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
53
|
-
switch (op[0]) {
|
|
54
|
-
case 0: case 1: t = op; break;
|
|
55
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
56
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
57
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
58
|
-
default:
|
|
59
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
60
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
62
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
63
|
-
if (t[2]) _.ops.pop();
|
|
64
|
-
_.trys.pop(); continue;
|
|
65
|
-
}
|
|
66
|
-
op = body.call(thisArg, _);
|
|
67
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
68
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
72
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
73
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
74
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
75
|
-
r[k] = a[j];
|
|
76
|
-
return r;
|
|
77
|
-
};
|
|
78
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
32
|
exports.Storm = void 0;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
33
|
+
const backend_1 = require("@intuitionrobotics/firebase/backend");
|
|
34
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
35
|
+
const backend_functions_1 = require("@intuitionrobotics/firebase/backend-functions");
|
|
36
|
+
const BaseStorm_1 = require("./BaseStorm");
|
|
37
|
+
const HttpServer_1 = require("../modules/server/HttpServer");
|
|
38
|
+
const server_api_1 = require("../modules/server/server-api");
|
|
39
|
+
const modules = [
|
|
87
40
|
HttpServer_1.HttpServer,
|
|
88
41
|
backend_1.FirebaseModule,
|
|
89
42
|
];
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
_this.addModules.apply(_this, modules);
|
|
96
|
-
return _this;
|
|
43
|
+
class Storm extends BaseStorm_1.BaseStorm {
|
|
44
|
+
constructor() {
|
|
45
|
+
super();
|
|
46
|
+
this.functions = [];
|
|
47
|
+
this.addModules(...modules);
|
|
97
48
|
}
|
|
98
|
-
|
|
49
|
+
init() {
|
|
99
50
|
ts_common_1.BeLogged.addClient(process.env.GCLOUD_PROJECT && process.env.FUNCTIONS_EMULATOR ? ts_common_1.LogClient_Terminal : ts_common_1.LogClient_Function);
|
|
100
51
|
server_api_1.ServerApi.isDebug = !!this.config.isDebug;
|
|
101
|
-
|
|
52
|
+
super.init();
|
|
102
53
|
HttpServer_1.HttpServer.resolveApi(this.routeResolver, !process.env.GCLOUD_PROJECT ? this.initialPath : "");
|
|
103
54
|
HttpServer_1.HttpServer.printRoutes(process.env.GCLOUD_PROJECT ? this.initialPath : "");
|
|
104
55
|
return this;
|
|
105
|
-
}
|
|
106
|
-
|
|
56
|
+
}
|
|
57
|
+
setInitialRouteResolver(routeResolver) {
|
|
107
58
|
this.routeResolver = routeResolver;
|
|
108
59
|
return this;
|
|
109
|
-
}
|
|
110
|
-
|
|
60
|
+
}
|
|
61
|
+
setInitialRoutePath(initialPath) {
|
|
111
62
|
this.initialPath = initialPath;
|
|
112
63
|
return this;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
this.functions = __spreadArrays([new backend_functions_1.Firebase_ExpressFunction(HttpServer_1.HttpServer.express)], modulesAsFunction);
|
|
64
|
+
}
|
|
65
|
+
startServer(onStarted) {
|
|
66
|
+
const modulesAsFunction = this.modules.filter((module) => module instanceof backend_functions_1.FirebaseFunction);
|
|
67
|
+
this.functions = [new backend_functions_1.Firebase_ExpressFunction(HttpServer_1.HttpServer.express), ...modulesAsFunction];
|
|
118
68
|
this.startServerImpl(onStarted)
|
|
119
|
-
.then(
|
|
120
|
-
.catch(
|
|
121
|
-
|
|
69
|
+
.then(() => console.log("Server Started!!"))
|
|
70
|
+
.catch(reason => {
|
|
71
|
+
this.logError("failed to launch server", reason);
|
|
122
72
|
throw reason;
|
|
123
73
|
});
|
|
124
|
-
return this.functions.reduce(
|
|
74
|
+
return this.functions.reduce((toRet, _function) => {
|
|
125
75
|
toRet[_function.getName()] = _function.getFunction();
|
|
126
76
|
return toRet;
|
|
127
77
|
}, {});
|
|
128
|
-
}
|
|
129
|
-
|
|
78
|
+
}
|
|
79
|
+
build(onStarted) {
|
|
130
80
|
return this.startServer(onStarted);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
console.timeEnd(label);
|
|
144
|
-
this.init();
|
|
145
|
-
return [4 /*yield*/, HttpServer_1.HttpServer.startServer()];
|
|
146
|
-
case 2:
|
|
147
|
-
_b.sent();
|
|
148
|
-
return [4 /*yield*/, Promise.all(this.functions.map(function (moduleAsFunction) { return moduleAsFunction.onFunctionReady(); }))];
|
|
149
|
-
case 3:
|
|
150
|
-
functions = _b.sent();
|
|
151
|
-
_a = onStarted;
|
|
152
|
-
if (!_a) return [3 /*break*/, 5];
|
|
153
|
-
return [4 /*yield*/, onStarted()];
|
|
154
|
-
case 4:
|
|
155
|
-
_a = (_b.sent());
|
|
156
|
-
_b.label = 5;
|
|
157
|
-
case 5:
|
|
158
|
-
_a;
|
|
159
|
-
return [2 /*return*/, functions];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
81
|
+
}
|
|
82
|
+
startServerImpl(onStarted) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const label = 'Resolving Config';
|
|
85
|
+
console.time(label);
|
|
86
|
+
yield this.resolveConfig();
|
|
87
|
+
console.timeEnd(label);
|
|
88
|
+
this.init();
|
|
89
|
+
yield HttpServer_1.HttpServer.startServer();
|
|
90
|
+
const functions = yield Promise.all(this.functions.map(moduleAsFunction => moduleAsFunction.onFunctionReady()));
|
|
91
|
+
onStarted && (yield onStarted());
|
|
92
|
+
return functions;
|
|
162
93
|
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}(BaseStorm_1.BaseStorm));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
166
96
|
exports.Storm = Storm;
|
|
167
97
|
//# sourceMappingURL=Storm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storm.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/Storm.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
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OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;YAChH,SAAS,KAAI,MAAM,SAAS,EAAE,CAAA,CAAC;YAE/B,OAAO,SAAS,CAAC;QAClB,CAAC;KAAA;CACD;AApED,sBAoEC"}
|
|
@@ -19,36 +19,20 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
-
var __extends = (this && this.__extends) || (function () {
|
|
23
|
-
var extendStatics = function (d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
return function (d, b) {
|
|
30
|
-
extendStatics(d, b);
|
|
31
|
-
function __() { this.constructor = d; }
|
|
32
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
23
|
exports.ApiException = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return _this;
|
|
24
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
25
|
+
class ApiException extends ts_common_1.CustomException {
|
|
26
|
+
constructor(responseCode, debugMessage, cause) {
|
|
27
|
+
super(ApiException, `${responseCode}-${JSON.stringify(debugMessage)}`, cause);
|
|
28
|
+
this.responseBody = {};
|
|
29
|
+
this.setErrorBody = (errorBody) => {
|
|
30
|
+
this.responseBody.error = errorBody;
|
|
31
|
+
return this;
|
|
46
32
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return _this;
|
|
33
|
+
this.responseCode = responseCode;
|
|
34
|
+
this.responseBody.debugMessage = debugMessage;
|
|
50
35
|
}
|
|
51
|
-
|
|
52
|
-
}(ts_common_1.CustomException));
|
|
36
|
+
}
|
|
53
37
|
exports.ApiException = ApiException;
|
|
54
38
|
//# sourceMappingURL=exceptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../src/main/app-backend/exceptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG
|
|
1
|
+
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../src/main/app-backend/exceptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,4DAA8D;AAM9D,MAAa,YACZ,SAAQ,2BAAe;IAUvB,YAAY,YAAoB,EAAE,YAAqB,EAAE,KAAa;QACrE,KAAK,CAAC,YAAY,EAAE,GAAG,YAAY,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAT/D,iBAAY,GAAqB,EAAE,CAAC;QAGpC,iBAAY,GAAG,CAAC,SAAuB,EAAE,EAAE;YAC1D,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC;YACpC,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;QAKD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,CAAC,YAAY,GAAG,YAAY,CAAC;IAC/C,CAAC;CAED;AAlBD,oCAkBC"}
|