@itwin/core-mobile 3.6.0-dev.8 → 3.7.0-dev.1

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/MobileBackend.d.ts +7 -7
  4. package/lib/cjs/MobileBackend.js +24 -24
  5. package/lib/cjs/MobileBackend.js.map +1 -1
  6. package/lib/cjs/MobileFrontend.d.ts +5 -5
  7. package/lib/cjs/MobileFrontend.js +21 -21
  8. package/lib/cjs/MobileFrontend.js.map +1 -1
  9. package/lib/cjs/__DOC_ONLY__.d.ts +33 -33
  10. package/lib/cjs/__DOC_ONLY__.js +52 -52
  11. package/lib/cjs/__DOC_ONLY__.js.map +1 -1
  12. package/lib/cjs/backend/MobileAuthorizationBackend.d.ts +17 -17
  13. package/lib/cjs/backend/MobileAuthorizationBackend.js +46 -46
  14. package/lib/cjs/backend/MobileAuthorizationBackend.js.map +1 -1
  15. package/lib/cjs/backend/MobileFileHandler.d.ts +112 -112
  16. package/lib/cjs/backend/MobileFileHandler.js +263 -263
  17. package/lib/cjs/backend/MobileFileHandler.js.map +1 -1
  18. package/lib/cjs/backend/MobileHost.d.ts +72 -72
  19. package/lib/cjs/backend/MobileHost.d.ts.map +1 -1
  20. package/lib/cjs/backend/MobileHost.js +156 -162
  21. package/lib/cjs/backend/MobileHost.js.map +1 -1
  22. package/lib/cjs/backend/MobileRpcServer.d.ts +19 -19
  23. package/lib/cjs/backend/MobileRpcServer.d.ts.map +1 -1
  24. package/lib/cjs/backend/MobileRpcServer.js +156 -136
  25. package/lib/cjs/backend/MobileRpcServer.js.map +1 -1
  26. package/lib/cjs/backend/Request.d.ts +149 -149
  27. package/lib/cjs/backend/Request.js +267 -267
  28. package/lib/cjs/backend/Request.js.map +1 -1
  29. package/lib/cjs/common/MobileAppChannel.d.ts +4 -4
  30. package/lib/cjs/common/MobileAppChannel.js +11 -11
  31. package/lib/cjs/common/MobileAppChannel.js.map +1 -1
  32. package/lib/cjs/common/MobileAppProps.d.ts +35 -37
  33. package/lib/cjs/common/MobileAppProps.d.ts.map +1 -1
  34. package/lib/cjs/common/MobileAppProps.js +26 -26
  35. package/lib/cjs/common/MobileAppProps.js.map +1 -1
  36. package/lib/cjs/common/MobileEventLoop.d.ts +11 -11
  37. package/lib/cjs/common/MobileEventLoop.js +30 -30
  38. package/lib/cjs/common/MobileEventLoop.js.map +1 -1
  39. package/lib/cjs/common/MobileIpc.d.ts +17 -17
  40. package/lib/cjs/common/MobileIpc.js +70 -70
  41. package/lib/cjs/common/MobileIpc.js.map +1 -1
  42. package/lib/cjs/common/MobilePush.d.ts +20 -20
  43. package/lib/cjs/common/MobilePush.d.ts.map +1 -1
  44. package/lib/cjs/common/MobilePush.js +53 -52
  45. package/lib/cjs/common/MobilePush.js.map +1 -1
  46. package/lib/cjs/common/MobileRpcManager.d.ts +40 -40
  47. package/lib/cjs/common/MobileRpcManager.d.ts.map +1 -1
  48. package/lib/cjs/common/MobileRpcManager.js +110 -109
  49. package/lib/cjs/common/MobileRpcManager.js.map +1 -1
  50. package/lib/cjs/common/MobileRpcProtocol.d.ts +58 -58
  51. package/lib/cjs/common/MobileRpcProtocol.d.ts.map +1 -1
  52. package/lib/cjs/common/MobileRpcProtocol.js +277 -278
  53. package/lib/cjs/common/MobileRpcProtocol.js.map +1 -1
  54. package/lib/cjs/common/MobileRpcRequest.d.ts +20 -20
  55. package/lib/cjs/common/MobileRpcRequest.d.ts.map +1 -1
  56. package/lib/cjs/common/MobileRpcRequest.js +50 -49
  57. package/lib/cjs/common/MobileRpcRequest.js.map +1 -1
  58. package/lib/cjs/frontend/MobileApp.d.ts +23 -23
  59. package/lib/cjs/frontend/MobileApp.d.ts.map +1 -1
  60. package/lib/cjs/frontend/MobileApp.js +80 -66
  61. package/lib/cjs/frontend/MobileApp.js.map +1 -1
  62. package/lib/cjs/frontend/MobileAuthorizationFrontend.d.ts +17 -17
  63. package/lib/cjs/frontend/MobileAuthorizationFrontend.js +46 -46
  64. package/lib/cjs/frontend/MobileAuthorizationFrontend.js.map +1 -1
  65. package/lib/cjs/test/ios/MobilePlatform.test.d.ts +1 -1
  66. package/lib/cjs/test/ios/MobilePlatform.test.js +84 -84
  67. package/lib/cjs/test/ios/MobilePlatform.test.js.map +1 -1
  68. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,6 +1,40 @@
1
1
  # Change Log - @itwin/core-mobile
2
2
 
3
- This log was last generated on Wed, 07 Dec 2022 19:12:37 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 08 Feb 2023 14:58:40 GMT and should not be manually modified.
4
+
5
+ ## 3.6.0
6
+ Wed, 08 Feb 2023 14:58:40 GMT
7
+
8
+ ### Updates
9
+
10
+ - Fixed bug which prevented mobile lifecycle events from being received on frontend.
11
+ - Fix for mobile app lifcycle crash
12
+ - React to RPC deprecations.
13
+
14
+ ## 3.5.5
15
+ Thu, 26 Jan 2023 22:53:27 GMT
16
+
17
+ _Version update only_
18
+
19
+ ## 3.5.4
20
+ Wed, 18 Jan 2023 15:27:15 GMT
21
+
22
+ _Version update only_
23
+
24
+ ## 3.5.3
25
+ Fri, 13 Jan 2023 17:23:07 GMT
26
+
27
+ _Version update only_
28
+
29
+ ## 3.5.2
30
+ Wed, 11 Jan 2023 16:46:30 GMT
31
+
32
+ _Version update only_
33
+
34
+ ## 3.5.1
35
+ Thu, 15 Dec 2022 16:38:28 GMT
36
+
37
+ _Version update only_
4
38
 
5
39
  ## 3.5.0
6
40
  Wed, 07 Dec 2022 19:12:37 GMT
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright © 2017-2022 Bentley Systems, Incorporated. All rights reserved.
3
+ Copyright © 2017-2023 Bentley Systems, Incorporated. All rights reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -1,8 +1,8 @@
1
- export * from "./backend/MobileAuthorizationBackend";
2
- export * from "./backend/MobileFileHandler";
3
- export * from "./backend/MobileHost";
4
- export * from "./common/MobileAppProps";
5
- export * from "./common/MobileRpcManager";
6
- export * from "./common/MobileRpcProtocol";
7
- export * from "./common/MobileRpcRequest";
1
+ export * from "./backend/MobileAuthorizationBackend";
2
+ export * from "./backend/MobileFileHandler";
3
+ export * from "./backend/MobileHost";
4
+ export * from "./common/MobileAppProps";
5
+ export * from "./common/MobileRpcManager";
6
+ export * from "./common/MobileRpcProtocol";
7
+ export * from "./common/MobileRpcRequest";
8
8
  //# sourceMappingURL=MobileBackend.d.ts.map
@@ -1,25 +1,25 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- // Barrel file for backend of a mobile application
18
- __exportStar(require("./backend/MobileAuthorizationBackend"), exports);
19
- __exportStar(require("./backend/MobileFileHandler"), exports);
20
- __exportStar(require("./backend/MobileHost"), exports);
21
- __exportStar(require("./common/MobileAppProps"), exports);
22
- __exportStar(require("./common/MobileRpcManager"), exports);
23
- __exportStar(require("./common/MobileRpcProtocol"), exports);
24
- __exportStar(require("./common/MobileRpcRequest"), exports);
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Barrel file for backend of a mobile application
18
+ __exportStar(require("./backend/MobileAuthorizationBackend"), exports);
19
+ __exportStar(require("./backend/MobileFileHandler"), exports);
20
+ __exportStar(require("./backend/MobileHost"), exports);
21
+ __exportStar(require("./common/MobileAppProps"), exports);
22
+ __exportStar(require("./common/MobileRpcManager"), exports);
23
+ __exportStar(require("./common/MobileRpcProtocol"), exports);
24
+ __exportStar(require("./common/MobileRpcRequest"), exports);
25
25
  //# sourceMappingURL=MobileBackend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileBackend.js","sourceRoot":"","sources":["../../src/MobileBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAkD;AAElD,uEAAqD;AACrD,8DAA4C;AAC5C,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n// Barrel file for backend of a mobile application\r\n\r\nexport * from \"./backend/MobileAuthorizationBackend\";\r\nexport * from \"./backend/MobileFileHandler\";\r\nexport * from \"./backend/MobileHost\";\r\nexport * from \"./common/MobileAppProps\";\r\nexport * from \"./common/MobileRpcManager\";\r\nexport * from \"./common/MobileRpcProtocol\";\r\nexport * from \"./common/MobileRpcRequest\";\r\n"]}
1
+ {"version":3,"file":"MobileBackend.js","sourceRoot":"","sources":["../../src/MobileBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAkD;AAElD,uEAAqD;AACrD,8DAA4C;AAC5C,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// Barrel file for backend of a mobile application\n\nexport * from \"./backend/MobileAuthorizationBackend\";\nexport * from \"./backend/MobileFileHandler\";\nexport * from \"./backend/MobileHost\";\nexport * from \"./common/MobileAppProps\";\nexport * from \"./common/MobileRpcManager\";\nexport * from \"./common/MobileRpcProtocol\";\nexport * from \"./common/MobileRpcRequest\";\n"]}
@@ -1,6 +1,6 @@
1
- export * from "./common/MobileAppProps";
2
- export * from "./common/MobileRpcManager";
3
- export * from "./common/MobileRpcProtocol";
4
- export * from "./common/MobileRpcRequest";
5
- export * from "./frontend/MobileApp";
1
+ export * from "./common/MobileAppProps";
2
+ export * from "./common/MobileRpcManager";
3
+ export * from "./common/MobileRpcProtocol";
4
+ export * from "./common/MobileRpcRequest";
5
+ export * from "./frontend/MobileApp";
6
6
  //# sourceMappingURL=MobileFrontend.d.ts.map
@@ -1,22 +1,22 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./common/MobileAppProps"), exports);
18
- __exportStar(require("./common/MobileRpcManager"), exports);
19
- __exportStar(require("./common/MobileRpcProtocol"), exports);
20
- __exportStar(require("./common/MobileRpcRequest"), exports);
21
- __exportStar(require("./frontend/MobileApp"), exports);
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common/MobileAppProps"), exports);
18
+ __exportStar(require("./common/MobileRpcManager"), exports);
19
+ __exportStar(require("./common/MobileRpcProtocol"), exports);
20
+ __exportStar(require("./common/MobileRpcRequest"), exports);
21
+ __exportStar(require("./frontend/MobileApp"), exports);
22
22
  //# sourceMappingURL=MobileFrontend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileFrontend.js","sourceRoot":"","sources":["../../src/MobileFrontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C;AAC1C,uDAAqC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./common/MobileAppProps\";\r\nexport * from \"./common/MobileRpcManager\";\r\nexport * from \"./common/MobileRpcProtocol\";\r\nexport * from \"./common/MobileRpcRequest\";\r\nexport * from \"./frontend/MobileApp\";\r\n"]}
1
+ {"version":3,"file":"MobileFrontend.js","sourceRoot":"","sources":["../../src/MobileFrontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C;AAC1C,uDAAqC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./common/MobileAppProps\";\nexport * from \"./common/MobileRpcManager\";\nexport * from \"./common/MobileRpcProtocol\";\nexport * from \"./common/MobileRpcRequest\";\nexport * from \"./frontend/MobileApp\";\n"]}
@@ -1,34 +1,34 @@
1
- export * from "./MobileBackend";
2
- export * from "./MobileFrontend";
3
- /** @docs-package-description
4
- * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
5
- */
6
- /**
7
- * @docs-group-description MobileApp
8
- * Classes for configuring and administering an iTwin.js application on mobile.
9
- */
10
- /**
11
- * @docs-group-description MobileAppProps
12
- * Configuration options for use with MobileApp.
13
- */
14
- /**
15
- * @docs-group-description MobileHost
16
- * Classes for configuring and administering the backend host on mobile.
17
- */
18
- /**
19
- * @docs-group-description MobileRpcManager
20
- * Coordinates usage of RPC interfaces for mobile applications.
21
- */
22
- /**
23
- * @docs-group-description MobileRpcServer
24
- * Provides RPC handling for the backend host on mobile.
25
- */
26
- /**
27
- * @docs-group-description iModelHub
28
- * Classes for interacting with iModelHub.
29
- */
30
- /**
31
- * @docs-group-description RpcInterface
32
- * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
33
- */
1
+ export * from "./MobileBackend";
2
+ export * from "./MobileFrontend";
3
+ /** @docs-package-description
4
+ * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
5
+ */
6
+ /**
7
+ * @docs-group-description MobileApp
8
+ * Classes for configuring and administering an iTwin.js application on mobile.
9
+ */
10
+ /**
11
+ * @docs-group-description MobileAppProps
12
+ * Configuration options for use with MobileApp.
13
+ */
14
+ /**
15
+ * @docs-group-description MobileHost
16
+ * Classes for configuring and administering the backend host on mobile.
17
+ */
18
+ /**
19
+ * @docs-group-description MobileRpcManager
20
+ * Coordinates usage of RPC interfaces for mobile applications.
21
+ */
22
+ /**
23
+ * @docs-group-description MobileRpcServer
24
+ * Provides RPC handling for the backend host on mobile.
25
+ */
26
+ /**
27
+ * @docs-group-description iModelHub
28
+ * Classes for interacting with iModelHub.
29
+ */
30
+ /**
31
+ * @docs-group-description RpcInterface
32
+ * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
33
+ */
34
34
  //# sourceMappingURL=__DOC_ONLY__.d.ts.map
@@ -1,53 +1,53 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- // THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.
18
- // It imports both frontend and backend code, which is not legal anywhere.
19
- // Do not import it in real code!
20
- __exportStar(require("./MobileBackend"), exports);
21
- __exportStar(require("./MobileFrontend"), exports);
22
- /** @docs-package-description
23
- * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
24
- */
25
- /**
26
- * @docs-group-description MobileApp
27
- * Classes for configuring and administering an iTwin.js application on mobile.
28
- */
29
- /**
30
- * @docs-group-description MobileAppProps
31
- * Configuration options for use with MobileApp.
32
- */
33
- /**
34
- * @docs-group-description MobileHost
35
- * Classes for configuring and administering the backend host on mobile.
36
- */
37
- /**
38
- * @docs-group-description MobileRpcManager
39
- * Coordinates usage of RPC interfaces for mobile applications.
40
- */
41
- /**
42
- * @docs-group-description MobileRpcServer
43
- * Provides RPC handling for the backend host on mobile.
44
- */
45
- /**
46
- * @docs-group-description iModelHub
47
- * Classes for interacting with iModelHub.
48
- */
49
- /**
50
- * @docs-group-description RpcInterface
51
- * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
52
- */
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.
18
+ // It imports both frontend and backend code, which is not legal anywhere.
19
+ // Do not import it in real code!
20
+ __exportStar(require("./MobileBackend"), exports);
21
+ __exportStar(require("./MobileFrontend"), exports);
22
+ /** @docs-package-description
23
+ * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
24
+ */
25
+ /**
26
+ * @docs-group-description MobileApp
27
+ * Classes for configuring and administering an iTwin.js application on mobile.
28
+ */
29
+ /**
30
+ * @docs-group-description MobileAppProps
31
+ * Configuration options for use with MobileApp.
32
+ */
33
+ /**
34
+ * @docs-group-description MobileHost
35
+ * Classes for configuring and administering the backend host on mobile.
36
+ */
37
+ /**
38
+ * @docs-group-description MobileRpcManager
39
+ * Coordinates usage of RPC interfaces for mobile applications.
40
+ */
41
+ /**
42
+ * @docs-group-description MobileRpcServer
43
+ * Provides RPC handling for the backend host on mobile.
44
+ */
45
+ /**
46
+ * @docs-group-description iModelHub
47
+ * Classes for interacting with iModelHub.
48
+ */
49
+ /**
50
+ * @docs-group-description RpcInterface
51
+ * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
52
+ */
53
53
  //# sourceMappingURL=__DOC_ONLY__.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__DOC_ONLY__.js","sourceRoot":"","sources":["../../src/__DOC_ONLY__.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,sDAAsD;AACtD,0EAA0E;AAC1E,iCAAiC;AAEjC,kDAAgC;AAChC,mDAAiC;AAEjC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n// THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.\r\n// It imports both frontend and backend code, which is not legal anywhere.\r\n// Do not import it in real code!\r\n\r\nexport * from \"./MobileBackend\";\r\nexport * from \"./MobileFrontend\";\r\n\r\n/** @docs-package-description\r\n * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.\r\n */\r\n/**\r\n * @docs-group-description MobileApp\r\n * Classes for configuring and administering an iTwin.js application on mobile.\r\n */\r\n/**\r\n * @docs-group-description MobileAppProps\r\n * Configuration options for use with MobileApp.\r\n */\r\n/**\r\n * @docs-group-description MobileHost\r\n * Classes for configuring and administering the backend host on mobile.\r\n */\r\n/**\r\n * @docs-group-description MobileRpcManager\r\n * Coordinates usage of RPC interfaces for mobile applications.\r\n */\r\n/**\r\n * @docs-group-description MobileRpcServer\r\n * Provides RPC handling for the backend host on mobile.\r\n */\r\n/**\r\n * @docs-group-description iModelHub\r\n * Classes for interacting with iModelHub.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.\r\n */\r\n"]}
1
+ {"version":3,"file":"__DOC_ONLY__.js","sourceRoot":"","sources":["../../src/__DOC_ONLY__.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,sDAAsD;AACtD,0EAA0E;AAC1E,iCAAiC;AAEjC,kDAAgC;AAChC,mDAAiC;AAEjC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.\n// It imports both frontend and backend code, which is not legal anywhere.\n// Do not import it in real code!\n\nexport * from \"./MobileBackend\";\nexport * from \"./MobileFrontend\";\n\n/** @docs-package-description\n * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.\n */\n/**\n * @docs-group-description MobileApp\n * Classes for configuring and administering an iTwin.js application on mobile.\n */\n/**\n * @docs-group-description MobileAppProps\n * Configuration options for use with MobileApp.\n */\n/**\n * @docs-group-description MobileHost\n * Classes for configuring and administering the backend host on mobile.\n */\n/**\n * @docs-group-description MobileRpcManager\n * Coordinates usage of RPC interfaces for mobile applications.\n */\n/**\n * @docs-group-description MobileRpcServer\n * Provides RPC handling for the backend host on mobile.\n */\n/**\n * @docs-group-description iModelHub\n * Classes for interacting with iModelHub.\n */\n/**\n * @docs-group-description RpcInterface\n * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.\n */\n"]}
@@ -1,18 +1,18 @@
1
- /** @packageDocumentation
2
- * @module OIDC
3
- */
4
- import { AccessToken } from "@itwin/core-bentley";
5
- import { AuthorizationClient } from "@itwin/core-common";
6
- /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
7
- * @internal
8
- */
9
- export declare class MobileAuthorizationBackend implements AuthorizationClient {
10
- private _accessToken;
11
- private _expirationDate;
12
- private _expiryBuffer;
13
- private _fetchingToken;
14
- private get _hasExpired();
15
- getAccessToken(): Promise<AccessToken>;
16
- setAccessToken(accessToken?: string, expirationDate?: string): void;
17
- }
1
+ /** @packageDocumentation
2
+ * @module OIDC
3
+ */
4
+ import { AccessToken } from "@itwin/core-bentley";
5
+ import { AuthorizationClient } from "@itwin/core-common";
6
+ /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
7
+ * @internal
8
+ */
9
+ export declare class MobileAuthorizationBackend implements AuthorizationClient {
10
+ private _accessToken;
11
+ private _expirationDate;
12
+ private _expiryBuffer;
13
+ private _fetchingToken;
14
+ private get _hasExpired();
15
+ getAccessToken(): Promise<AccessToken>;
16
+ setAccessToken(accessToken?: string, expirationDate?: string): void;
17
+ }
18
18
  //# sourceMappingURL=MobileAuthorizationBackend.d.ts.map
@@ -1,47 +1,47 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module OIDC
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MobileAuthorizationBackend = void 0;
11
- const MobileHost_1 = require("./MobileHost");
12
- /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
13
- * @internal
14
- */
15
- class MobileAuthorizationBackend {
16
- constructor() {
17
- this._accessToken = "";
18
- this._expiryBuffer = 60 * 10; // ten minutes
19
- this._fetchingToken = false;
20
- }
21
- get _hasExpired() {
22
- return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;
23
- }
24
- async getAccessToken() {
25
- if (this._fetchingToken) {
26
- return Promise.reject(); // short-circuits any recursive use of this function
27
- }
28
- if (this._accessToken && !this._hasExpired) {
29
- return this._accessToken;
30
- }
31
- else {
32
- this._fetchingToken = true;
33
- const result = await MobileHost_1.MobileHost.authGetAccessToken();
34
- this._accessToken = result[0];
35
- if (result[1])
36
- this._expirationDate = new Date(result[1]);
37
- this._fetchingToken = false;
38
- return this._accessToken;
39
- }
40
- }
41
- setAccessToken(accessToken, expirationDate) {
42
- this._accessToken = accessToken !== null && accessToken !== void 0 ? accessToken : "";
43
- this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;
44
- }
45
- }
46
- exports.MobileAuthorizationBackend = MobileAuthorizationBackend;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module OIDC
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.MobileAuthorizationBackend = void 0;
11
+ const MobileHost_1 = require("./MobileHost");
12
+ /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
13
+ * @internal
14
+ */
15
+ class MobileAuthorizationBackend {
16
+ constructor() {
17
+ this._accessToken = "";
18
+ this._expiryBuffer = 60 * 10; // ten minutes
19
+ this._fetchingToken = false;
20
+ }
21
+ get _hasExpired() {
22
+ return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;
23
+ }
24
+ async getAccessToken() {
25
+ if (this._fetchingToken) {
26
+ return Promise.reject(); // short-circuits any recursive use of this function
27
+ }
28
+ if (this._accessToken && !this._hasExpired) {
29
+ return this._accessToken;
30
+ }
31
+ else {
32
+ this._fetchingToken = true;
33
+ const result = await MobileHost_1.MobileHost.authGetAccessToken();
34
+ this._accessToken = result[0];
35
+ if (result[1])
36
+ this._expirationDate = new Date(result[1]);
37
+ this._fetchingToken = false;
38
+ return this._accessToken;
39
+ }
40
+ }
41
+ setAccessToken(accessToken, expirationDate) {
42
+ this._accessToken = accessToken !== null && accessToken !== void 0 ? accessToken : "";
43
+ this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;
44
+ }
45
+ }
46
+ exports.MobileAuthorizationBackend = MobileAuthorizationBackend;
47
47
  //# sourceMappingURL=MobileAuthorizationBackend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileAuthorizationBackend.js","sourceRoot":"","sources":["../../../src/backend/MobileAuthorizationBackend.ts"],"names":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C,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,CAAC;CACF;AAhCD,gEAgCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OIDC\r\n */\r\n\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\nimport { AuthorizationClient } from \"@itwin/core-common\";\r\nimport { MobileHost } from \"./MobileHost\";\r\n\r\n/** Utility to provide and cache auth tokens from native mobile apps to IModelHost.\r\n * @internal\r\n */\r\nexport class MobileAuthorizationBackend implements AuthorizationClient {\r\n private _accessToken: AccessToken = \"\";\r\n private _expirationDate: Date | undefined;\r\n private _expiryBuffer = 60 * 10; // ten minutes\r\n private _fetchingToken = false;\r\n\r\n private get _hasExpired(): boolean {\r\n return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;\r\n }\r\n\r\n public async getAccessToken(): Promise<AccessToken> {\r\n if (this._fetchingToken) {\r\n return Promise.reject(); // short-circuits any recursive use of this function\r\n }\r\n\r\n if (this._accessToken && !this._hasExpired) {\r\n return this._accessToken;\r\n } else {\r\n this._fetchingToken = true;\r\n const result = await MobileHost.authGetAccessToken();\r\n this._accessToken = result[0];\r\n if (result[1])\r\n this._expirationDate = new Date(result[1]);\r\n this._fetchingToken = false;\r\n return this._accessToken;\r\n }\r\n }\r\n\r\n public setAccessToken(accessToken?: string, expirationDate?: string) {\r\n this._accessToken = accessToken ?? \"\";\r\n this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MobileAuthorizationBackend.js","sourceRoot":"","sources":["../../../src/backend/MobileAuthorizationBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,6CAA0C;AAE1C;;GAEG;AACH,MAAa,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Content":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OIDC\n */\n\nimport { AccessToken } from \"@itwin/core-bentley\";\nimport { AuthorizationClient } from \"@itwin/core-common\";\nimport { MobileHost } from \"./MobileHost\";\n\n/** Utility to provide and cache auth tokens from native mobile apps to IModelHost.\n * @internal\n */\nexport class MobileAuthorizationBackend implements AuthorizationClient {\n private _accessToken: AccessToken = \"\";\n private _expirationDate: Date | undefined;\n private _expiryBuffer = 60 * 10; // ten minutes\n private _fetchingToken = false;\n\n private get _hasExpired(): boolean {\n return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;\n }\n\n public async getAccessToken(): Promise<AccessToken> {\n if (this._fetchingToken) {\n return Promise.reject(); // short-circuits any recursive use of this function\n }\n\n if (this._accessToken && !this._hasExpired) {\n return this._accessToken;\n } else {\n this._fetchingToken = true;\n const result = await MobileHost.authGetAccessToken();\n this._accessToken = result[0];\n if (result[1])\n this._expirationDate = new Date(result[1]);\n this._fetchingToken = false;\n return this._accessToken;\n }\n }\n\n public setAccessToken(accessToken?: string, expirationDate?: string) {\n this._accessToken = accessToken ?? \"\";\n this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;\n }\n}\n"]}