@intuitionrobotics/thunderstorm 0.42.7 → 0.42.9

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.
@@ -36,7 +36,7 @@ const ForceUpgrade_1 = require("../../../../modules/ForceUpgrade");
36
36
  class ServerApi_AssertAppVersion extends server_api_1.ServerApi {
37
37
  constructor() {
38
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);
39
+ this.addHeaderToLog(force_upgrade_1.HeaderKey_PlatformVersion, force_upgrade_1.HeaderKey_PlatformName);
40
40
  }
41
41
  process(request, response, queryParams, body) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../../../src/main/app-backend/api/v1/utils/version/assert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;AAGH,uEAI6C;AAC7C,sEAG+C;AAC/C,uDAAuD;AACvD,mEAA+D;AAI/D,MAAM,0BACL,SAAQ,sBAAqC;IAE7C;QACC,KAAK,CAAC,kBAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAChC,IAAI,CAAC,cAAc,CAAC,yCAAyB,EAAE,sCAAsB,CAAC,CAAC;IACxE,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"}
@@ -1,16 +1,13 @@
1
1
  import { Module } from "@intuitionrobotics/ts-common";
2
2
  import { ServerApi_Middleware } from "./server/HttpServer";
3
3
  import { UpgradeRequired } from "../../shared/force-upgrade";
4
- import { Browser } from "../../shared/consts";
4
+ import { PlatformName } from "../../shared/consts";
5
5
  import { ExpressRequest } from "../utils/types";
6
6
  declare type VersionConfig = {
7
- regexp: {
8
- [K in Browser]: string;
7
+ [K in PlatformName]: {
8
+ regexp: string;
9
+ minimumValidVersion?: string;
9
10
  };
10
- browser: {
11
- [K in Browser]: string;
12
- };
13
- app: string;
14
11
  };
15
12
  declare class ForceUpgrade_Class extends Module<VersionConfig> {
16
13
  static readonly Middleware: ServerApi_Middleware;
@@ -34,39 +34,54 @@ const ts_common_1 = require("@intuitionrobotics/ts-common");
34
34
  const HttpServer_1 = require("./server/HttpServer");
35
35
  const exceptions_1 = require("../exceptions");
36
36
  const force_upgrade_1 = require("../../shared/force-upgrade");
37
- const Header_AppVersion = new HttpServer_1.HeaderKey(force_upgrade_1.HeaderKey_AppVersion);
38
- const Header_BrowserType = new HttpServer_1.HeaderKey(force_upgrade_1.HeaderKey_BrowserType);
39
- const Header_UserAgent = new HttpServer_1.HeaderKey(force_upgrade_1.HeaderKey_UserAgent);
40
- const DefaultRegexps = {
41
- chrome: "Chrome/([0-9\.]+)"
42
- };
37
+ const Header_PlatformVersion = new HttpServer_1.HeaderKey(force_upgrade_1.HeaderKey_PlatformVersion);
38
+ const Header_PlatformName = new HttpServer_1.HeaderKey(force_upgrade_1.HeaderKey_PlatformName);
39
+ // const DefaultRegexps: { [k in PlatformName]: string } = {
40
+ // chrome: "Chrome/([0-9\.]+)"
41
+ // };
43
42
  class ForceUpgrade_Class extends ts_common_1.Module {
44
43
  compareVersion(request) {
45
- var _a, _b, _c;
46
- const appVersion = Header_AppVersion.get(request);
47
- const userAgentString = Header_UserAgent.get(request);
48
- const browserType = Header_BrowserType.get(request);
49
- if (!browserType)
50
- throw new ts_common_1.ImplementationMissingException(`Browser type not specified`);
51
- const chromeRegexp = ((_a = this.config.regexp) === null || _a === void 0 ? void 0 : _a[browserType]) || DefaultRegexps[browserType];
52
- const version = (_b = userAgentString.match(new RegExp(chromeRegexp))) === null || _b === void 0 ? void 0 : _b[1];
53
- if (!version)
54
- throw new ts_common_1.BadImplementationException(`Error extracting version.. \nUserAgent: '${userAgentString}'\n config: '${ts_common_1.__stringify(this.config)}'`);
55
- const requiredBrowserVersion = (_c = this.config.browser) === null || _c === void 0 ? void 0 : _c[browserType];
56
- if (!requiredBrowserVersion)
57
- throw new ts_common_1.ImplementationMissingException(`Unsupported browser type: ${browserType}`);
58
- let app = false;
59
- let browser = false;
60
- if (this.config.app)
61
- app = ts_common_1.compareVersions(appVersion, this.config.app) === 1;
62
- if (requiredBrowserVersion)
63
- browser = ts_common_1.compareVersions(version, requiredBrowserVersion) === 1;
64
- return { app, browser };
44
+ const platformVersion = Header_PlatformVersion.get(request);
45
+ const platformName = Header_PlatformName.get(request);
46
+ if (!platformName)
47
+ throw new exceptions_1.ApiException(500, `Platform name was not specified`);
48
+ if (!platformVersion)
49
+ throw new exceptions_1.ApiException(500, `Platform version was not specified`);
50
+ const platformNameConfig = this.config[platformName];
51
+ if (!platformNameConfig || !platformNameConfig.regexp)
52
+ return {}; // no info about this platformName
53
+ const regex = new RegExp(platformNameConfig.regexp);
54
+ const match = platformVersion.match(regex);
55
+ if (!match)
56
+ throw new ts_common_1.BadImplementationException(`Error extracting version.. \nVersion: '${platformVersion}'\n config: '${ts_common_1.__stringify(this.config)}'`);
57
+ const minimumValidVersion = platformNameConfig.minimumValidVersion;
58
+ if (!minimumValidVersion)
59
+ return {
60
+ upgradeRequired: false
61
+ };
62
+ const matchGroups = match.groups;
63
+ if (!matchGroups)
64
+ throw new ts_common_1.BadImplementationException(`If minimumValidVersion is provided ${platformNameConfig.minimumValidVersion}, then groups in regex have to be defined ${ts_common_1.__stringify(match)}. i.e. "(?<first>[0-9]+).(?<second>[0-9]+).(?<third>[0-9]+)"`);
65
+ const minimumVersionMatch = minimumValidVersion.match(regex);
66
+ if (!minimumVersionMatch)
67
+ throw new ts_common_1.BadImplementationException(`Error extracting minimum valid version. \nVersion: '${minimumValidVersion}'\n config: '${ts_common_1.__stringify(this.config)}'`);
68
+ const versionsGroups = minimumVersionMatch.groups;
69
+ if (!versionsGroups)
70
+ throw new ts_common_1.BadImplementationException(`If minimumValidVersion is provided ${platformNameConfig.minimumValidVersion}, then groups in regex have to be defined ${ts_common_1.__stringify(minimumVersionMatch)}. i.e. "(?<first>[0-9]+).(?<second>[0-9]+).(?<third>[0-9]+)"`);
71
+ const versions = Object.values(matchGroups);
72
+ const minimumVersions = Object.values(versionsGroups);
73
+ for (let i = 0; i < versions.length; i++) {
74
+ const v = versions[i];
75
+ const minV = minimumVersions[i];
76
+ if (v < minV)
77
+ return { upgradeRequired: true };
78
+ }
79
+ return { upgradeRequired: false };
65
80
  }
66
81
  assertVersion(request) {
67
82
  return __awaiter(this, void 0, void 0, function* () {
68
83
  const upgradeRequired = this.compareVersion(request);
69
- if (upgradeRequired.app || upgradeRequired.browser)
84
+ if (upgradeRequired.upgradeRequired)
70
85
  throw new exceptions_1.ApiException(426, "require upgrade..").setErrorBody({ type: "upgrade-required", body: upgradeRequired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AAA;;AA9De,6BAAU,GAAyB,CAAO,OAAuB,EAAE,EAAE,kDAAC,OAAA,oBAAY,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA,GAAA,CAAC;AAiE9G,QAAA,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
@@ -41,8 +41,8 @@ class ForceUpgrade_Class extends ts_common_1.Module {
41
41
  };
42
42
  }
43
43
  init() {
44
- XhrHttpModule_1.XhrHttpModule.addDefaultHeader(force_upgrade_1.HeaderKey_AppVersion, `${process.env.appVersion}`);
45
- XhrHttpModule_1.XhrHttpModule.addDefaultHeader(force_upgrade_1.HeaderKey_BrowserType, `${tools_1.browserType()}`);
44
+ XhrHttpModule_1.XhrHttpModule.addDefaultHeader(force_upgrade_1.HeaderKey_PlatformVersion, `${process.env.appVersion}`);
45
+ XhrHttpModule_1.XhrHttpModule.addDefaultHeader(force_upgrade_1.HeaderKey_PlatformName, `${tools_1.browserType()}`);
46
46
  }
47
47
  }
48
48
  exports.ForceUpgrade = new ForceUpgrade_Class();
@@ -1 +1 @@
1
- {"version":3,"file":"ForceUpgrade.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/ForceUpgrade.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,4DAGsC;AACtC,wDAAmD;AACnD,8DAKoC;AACpC,8CAA8C;AAC9C,0CAA2C;AAE9B,QAAA,2BAA2B,GAAG,oBAAoB,CAAC;AAShE,MAAM,0BAA0B,GAAG,IAAI,sBAAU,CAA2C,qBAAqB,CAAC,CAAC;AAEnH,MAAM,kBACL,SAAQ,kBAAc;IADvB;;QAQC,mBAAc,GAAG,GAAG,EAAE;YACrB,6BAAa;iBACX,aAAa,CAA6B,kBAAU,CAAC,GAAG,EAAE,mCAA2B,CAAC;iBACtF,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;iBAC5C,OAAO,CAAC,CAAC,QAAyB,EAAE,EAAE;gBACtC,0BAA0B,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AAE,CAAC,CAAC;IAC5E,CAAC;CAUD;AAEY,QAAA,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Browser } from "../../shared/consts";
1
+ import { PlatformName } from "../../shared/consts";
2
2
  import * as React from "react";
3
- export declare function browserType(): Browser;
3
+ export declare function browserType(): PlatformName;
4
4
  export declare function convertBase64ToFile(fileName: string, base64: string, _mimeType?: string): File;
5
5
  export declare const stopPropagation: (e: MouseEvent | React.MouseEvent | KeyboardEvent | React.KeyboardEvent) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuitionrobotics/thunderstorm",
3
- "version": "0.42.7",
3
+ "version": "0.42.9",
4
4
  "description": "Thunderstorm",
5
5
  "keywords": [
6
6
  "IR",
@@ -1,3 +1,3 @@
1
1
  export declare const HeaderKey_Env = "x-env";
2
2
  export declare const HeaderKey_CurrentPage = "x-current-page";
3
- export declare type Browser = "chrome";
3
+ export declare type PlatformName = string;
@@ -1,9 +1,7 @@
1
1
  import { ApiWithQuery } from "./types";
2
- export declare const HeaderKey_AppVersion = "x-app-version";
3
- export declare const HeaderKey_BrowserType = "x-browser-type";
4
- export declare const HeaderKey_UserAgent = "user-agent";
2
+ export declare const HeaderKey_PlatformVersion = "x-platform-version";
3
+ export declare const HeaderKey_PlatformName = "x-platform-name";
5
4
  export declare type UpgradeRequired = {
6
- browser: boolean;
7
- app: boolean;
5
+ upgradeRequired?: boolean;
8
6
  };
9
7
  export declare type ApiBinder_AssertAppVersion = ApiWithQuery<string, UpgradeRequired>;
@@ -20,8 +20,7 @@
20
20
  * limitations under the License.
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.HeaderKey_UserAgent = exports.HeaderKey_BrowserType = exports.HeaderKey_AppVersion = void 0;
24
- exports.HeaderKey_AppVersion = "x-app-version";
25
- exports.HeaderKey_BrowserType = "x-browser-type";
26
- exports.HeaderKey_UserAgent = "user-agent";
23
+ exports.HeaderKey_PlatformName = exports.HeaderKey_PlatformVersion = void 0;
24
+ exports.HeaderKey_PlatformVersion = "x-platform-version";
25
+ exports.HeaderKey_PlatformName = "x-platform-name";
27
26
  //# sourceMappingURL=force-upgrade.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"force-upgrade.js","sourceRoot":"","sources":["../../src/main/shared/force-upgrade.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIU,QAAA,oBAAoB,GAAG,eAAe,CAAC;AACvC,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AACzC,QAAA,mBAAmB,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"force-upgrade.js","sourceRoot":"","sources":["../../src/main/shared/force-upgrade.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIU,QAAA,yBAAyB,GAAG,oBAAoB,CAAC;AACjD,QAAA,sBAAsB,GAAG,iBAAiB,CAAC"}