@webex/webex-core 2.59.2 → 2.59.3-next.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 (189) hide show
  1. package/.eslintrc.js +6 -6
  2. package/README.md +79 -79
  3. package/babel.config.js +3 -3
  4. package/dist/config.js +24 -24
  5. package/dist/config.js.map +1 -1
  6. package/dist/credentials-config.js +56 -56
  7. package/dist/credentials-config.js.map +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/interceptors/auth.js +28 -28
  10. package/dist/interceptors/auth.js.map +1 -1
  11. package/dist/interceptors/default-options.js +24 -24
  12. package/dist/interceptors/default-options.js.map +1 -1
  13. package/dist/interceptors/embargo.js +9 -9
  14. package/dist/interceptors/embargo.js.map +1 -1
  15. package/dist/interceptors/network-timing.js +19 -19
  16. package/dist/interceptors/network-timing.js.map +1 -1
  17. package/dist/interceptors/payload-transformer.js +19 -19
  18. package/dist/interceptors/payload-transformer.js.map +1 -1
  19. package/dist/interceptors/rate-limit.js +40 -40
  20. package/dist/interceptors/rate-limit.js.map +1 -1
  21. package/dist/interceptors/redirect.js +13 -13
  22. package/dist/interceptors/redirect.js.map +1 -1
  23. package/dist/interceptors/request-event.js +23 -23
  24. package/dist/interceptors/request-event.js.map +1 -1
  25. package/dist/interceptors/request-logger.js +13 -13
  26. package/dist/interceptors/request-logger.js.map +1 -1
  27. package/dist/interceptors/request-timing.js +23 -23
  28. package/dist/interceptors/request-timing.js.map +1 -1
  29. package/dist/interceptors/response-logger.js +19 -19
  30. package/dist/interceptors/response-logger.js.map +1 -1
  31. package/dist/interceptors/user-agent.js +29 -29
  32. package/dist/interceptors/user-agent.js.map +1 -1
  33. package/dist/interceptors/webex-tracking-id.js +15 -15
  34. package/dist/interceptors/webex-tracking-id.js.map +1 -1
  35. package/dist/interceptors/webex-user-agent.js +13 -13
  36. package/dist/interceptors/webex-user-agent.js.map +1 -1
  37. package/dist/lib/batcher.js +83 -83
  38. package/dist/lib/batcher.js.map +1 -1
  39. package/dist/lib/credentials/credentials.js +103 -103
  40. package/dist/lib/credentials/credentials.js.map +1 -1
  41. package/dist/lib/credentials/grant-errors.js +17 -17
  42. package/dist/lib/credentials/grant-errors.js.map +1 -1
  43. package/dist/lib/credentials/index.js +2 -2
  44. package/dist/lib/credentials/index.js.map +1 -1
  45. package/dist/lib/credentials/scope.js +11 -11
  46. package/dist/lib/credentials/scope.js.map +1 -1
  47. package/dist/lib/credentials/token-collection.js +2 -2
  48. package/dist/lib/credentials/token-collection.js.map +1 -1
  49. package/dist/lib/credentials/token.js +145 -145
  50. package/dist/lib/credentials/token.js.map +1 -1
  51. package/dist/lib/page.js +49 -49
  52. package/dist/lib/page.js.map +1 -1
  53. package/dist/lib/services/constants.js.map +1 -1
  54. package/dist/lib/services/index.js +2 -2
  55. package/dist/lib/services/index.js.map +1 -1
  56. package/dist/lib/services/interceptors/server-error.js +9 -9
  57. package/dist/lib/services/interceptors/server-error.js.map +1 -1
  58. package/dist/lib/services/interceptors/service.js +24 -24
  59. package/dist/lib/services/interceptors/service.js.map +1 -1
  60. package/dist/lib/services/metrics.js.map +1 -1
  61. package/dist/lib/services/service-catalog.js +104 -104
  62. package/dist/lib/services/service-catalog.js.map +1 -1
  63. package/dist/lib/services/service-fed-ramp.js.map +1 -1
  64. package/dist/lib/services/service-host.js +134 -134
  65. package/dist/lib/services/service-host.js.map +1 -1
  66. package/dist/lib/services/service-registry.js +175 -175
  67. package/dist/lib/services/service-registry.js.map +1 -1
  68. package/dist/lib/services/service-state.js +38 -38
  69. package/dist/lib/services/service-state.js.map +1 -1
  70. package/dist/lib/services/service-url.js +31 -31
  71. package/dist/lib/services/service-url.js.map +1 -1
  72. package/dist/lib/services/services.js +245 -245
  73. package/dist/lib/services/services.js.map +1 -1
  74. package/dist/lib/stateless-webex-plugin.js +28 -28
  75. package/dist/lib/stateless-webex-plugin.js.map +1 -1
  76. package/dist/lib/storage/decorators.js +27 -27
  77. package/dist/lib/storage/decorators.js.map +1 -1
  78. package/dist/lib/storage/errors.js +4 -4
  79. package/dist/lib/storage/errors.js.map +1 -1
  80. package/dist/lib/storage/index.js.map +1 -1
  81. package/dist/lib/storage/make-webex-plugin-store.js +44 -44
  82. package/dist/lib/storage/make-webex-plugin-store.js.map +1 -1
  83. package/dist/lib/storage/make-webex-store.js +40 -40
  84. package/dist/lib/storage/make-webex-store.js.map +1 -1
  85. package/dist/lib/storage/memory-store-adapter.js +9 -9
  86. package/dist/lib/storage/memory-store-adapter.js.map +1 -1
  87. package/dist/lib/webex-core-plugin-mixin.js +13 -13
  88. package/dist/lib/webex-core-plugin-mixin.js.map +1 -1
  89. package/dist/lib/webex-http-error.js +9 -9
  90. package/dist/lib/webex-http-error.js.map +1 -1
  91. package/dist/lib/webex-internal-core-plugin-mixin.js +13 -13
  92. package/dist/lib/webex-internal-core-plugin-mixin.js.map +1 -1
  93. package/dist/lib/webex-plugin.js +36 -36
  94. package/dist/lib/webex-plugin.js.map +1 -1
  95. package/dist/plugins/logger.js +9 -9
  96. package/dist/plugins/logger.js.map +1 -1
  97. package/dist/webex-core.js +104 -104
  98. package/dist/webex-core.js.map +1 -1
  99. package/dist/webex-internal-core.js +12 -12
  100. package/dist/webex-internal-core.js.map +1 -1
  101. package/jest.config.js +3 -3
  102. package/package.json +20 -19
  103. package/process +1 -1
  104. package/src/config.js +90 -90
  105. package/src/credentials-config.js +212 -212
  106. package/src/index.js +62 -62
  107. package/src/interceptors/auth.js +186 -186
  108. package/src/interceptors/default-options.js +55 -55
  109. package/src/interceptors/embargo.js +43 -43
  110. package/src/interceptors/network-timing.js +54 -54
  111. package/src/interceptors/payload-transformer.js +55 -55
  112. package/src/interceptors/rate-limit.js +169 -169
  113. package/src/interceptors/redirect.js +106 -106
  114. package/src/interceptors/request-event.js +93 -93
  115. package/src/interceptors/request-logger.js +78 -78
  116. package/src/interceptors/request-timing.js +65 -65
  117. package/src/interceptors/response-logger.js +98 -98
  118. package/src/interceptors/user-agent.js +77 -77
  119. package/src/interceptors/webex-tracking-id.js +73 -73
  120. package/src/interceptors/webex-user-agent.js +79 -79
  121. package/src/lib/batcher.js +307 -307
  122. package/src/lib/credentials/credentials.js +552 -552
  123. package/src/lib/credentials/grant-errors.js +92 -92
  124. package/src/lib/credentials/index.js +16 -16
  125. package/src/lib/credentials/scope.js +34 -34
  126. package/src/lib/credentials/token-collection.js +17 -17
  127. package/src/lib/credentials/token.js +559 -559
  128. package/src/lib/page.js +159 -159
  129. package/src/lib/services/constants.js +9 -9
  130. package/src/lib/services/index.js +26 -26
  131. package/src/lib/services/interceptors/server-error.js +48 -48
  132. package/src/lib/services/interceptors/service.js +101 -101
  133. package/src/lib/services/metrics.js +4 -4
  134. package/src/lib/services/service-catalog.js +435 -435
  135. package/src/lib/services/service-fed-ramp.js +4 -4
  136. package/src/lib/services/service-host.js +267 -267
  137. package/src/lib/services/service-registry.js +465 -465
  138. package/src/lib/services/service-state.js +78 -78
  139. package/src/lib/services/service-url.js +124 -124
  140. package/src/lib/services/services.js +1018 -1018
  141. package/src/lib/stateless-webex-plugin.js +98 -98
  142. package/src/lib/storage/decorators.js +220 -220
  143. package/src/lib/storage/errors.js +15 -15
  144. package/src/lib/storage/index.js +10 -10
  145. package/src/lib/storage/make-webex-plugin-store.js +211 -211
  146. package/src/lib/storage/make-webex-store.js +140 -140
  147. package/src/lib/storage/memory-store-adapter.js +79 -79
  148. package/src/lib/webex-core-plugin-mixin.js +114 -114
  149. package/src/lib/webex-http-error.js +61 -61
  150. package/src/lib/webex-internal-core-plugin-mixin.js +107 -107
  151. package/src/lib/webex-plugin.js +222 -222
  152. package/src/plugins/logger.js +60 -60
  153. package/src/webex-core.js +745 -745
  154. package/src/webex-internal-core.js +46 -46
  155. package/test/integration/spec/credentials/credentials.js +139 -139
  156. package/test/integration/spec/credentials/token.js +102 -102
  157. package/test/integration/spec/services/service-catalog.js +838 -838
  158. package/test/integration/spec/services/services.js +1221 -1221
  159. package/test/integration/spec/webex-core.js +178 -178
  160. package/test/unit/spec/_setup.js +44 -44
  161. package/test/unit/spec/credentials/credentials.js +1017 -1017
  162. package/test/unit/spec/credentials/token.js +441 -441
  163. package/test/unit/spec/interceptors/auth.js +521 -521
  164. package/test/unit/spec/interceptors/default-options.js +84 -84
  165. package/test/unit/spec/interceptors/embargo.js +144 -144
  166. package/test/unit/spec/interceptors/network-timing.js +49 -49
  167. package/test/unit/spec/interceptors/payload-transformer.js +155 -155
  168. package/test/unit/spec/interceptors/rate-limit.js +302 -302
  169. package/test/unit/spec/interceptors/redirect.js +102 -102
  170. package/test/unit/spec/interceptors/request-timing.js +92 -92
  171. package/test/unit/spec/interceptors/user-agent.js +76 -76
  172. package/test/unit/spec/interceptors/webex-tracking-id.js +76 -76
  173. package/test/unit/spec/interceptors/webex-user-agent.js +159 -159
  174. package/test/unit/spec/lib/batcher.js +330 -330
  175. package/test/unit/spec/lib/page.js +148 -148
  176. package/test/unit/spec/lib/webex-plugin.js +48 -48
  177. package/test/unit/spec/services/interceptors/server-error.js +204 -204
  178. package/test/unit/spec/services/interceptors/service.js +188 -188
  179. package/test/unit/spec/services/service-catalog.js +194 -194
  180. package/test/unit/spec/services/service-host.js +260 -260
  181. package/test/unit/spec/services/service-registry.js +747 -747
  182. package/test/unit/spec/services/service-state.js +60 -60
  183. package/test/unit/spec/services/service-url.js +258 -258
  184. package/test/unit/spec/services/services.js +348 -348
  185. package/test/unit/spec/storage/persist.js +50 -50
  186. package/test/unit/spec/storage/storage-adapter.js +12 -12
  187. package/test/unit/spec/storage/wait-for-value.js +81 -81
  188. package/test/unit/spec/webex-core.js +253 -253
  189. package/test/unit/spec/webex-internal-core.js +91 -91
@@ -9,24 +9,24 @@ exports.default = void 0;
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
11
11
  var _constants = require("./constants");
12
- /**
13
- * The state of a specific catalog to be used by {@link ServiceState}.
14
- *
15
- * @typedef {Record<string, boolean>} CatalogState
16
- * @property {boolean} CatalogState.collecting - If the catalog is collecting.
17
- * @property {boolean} CatalogState.ready - If the catalog is ready.
12
+ /**
13
+ * The state of a specific catalog to be used by {@link ServiceState}.
14
+ *
15
+ * @typedef {Record<string, boolean>} CatalogState
16
+ * @property {boolean} CatalogState.collecting - If the catalog is collecting.
17
+ * @property {boolean} CatalogState.ready - If the catalog is ready.
18
18
  */
19
- /**
20
- * @class
21
- * @classdesc - Manages the state of the service catalogs for a webex instance.
19
+ /**
20
+ * @class
21
+ * @classdesc - Manages the state of the service catalogs for a webex instance.
22
22
  */
23
23
  var ServiceState = /*#__PURE__*/function () {
24
- /**
25
- * Generate a new {@link ServiceState}.
26
- *
27
- * @public
28
- * @constructor
29
- * @memberof ServiceState
24
+ /**
25
+ * Generate a new {@link ServiceState}.
26
+ *
27
+ * @public
28
+ * @constructor
29
+ * @memberof ServiceState
30
30
  */
31
31
  function ServiceState() {
32
32
  var _this = this;
@@ -37,14 +37,14 @@ var ServiceState = /*#__PURE__*/function () {
37
37
  });
38
38
  }
39
39
 
40
- /**
41
- * Set a catalog to be collecting or not.
42
- *
43
- * @public
44
- * @memberof ServiceState
45
- * @param {string} catalog - Catalog to target.
46
- * @param {boolean} collecting - If the target is collecting or not.
47
- * @returns {undefined}
40
+ /**
41
+ * Set a catalog to be collecting or not.
42
+ *
43
+ * @public
44
+ * @memberof ServiceState
45
+ * @param {string} catalog - Catalog to target.
46
+ * @param {boolean} collecting - If the target is collecting or not.
47
+ * @returns {undefined}
48
48
  */
49
49
  (0, _createClass2.default)(ServiceState, [{
50
50
  key: "setCollecting",
@@ -56,14 +56,14 @@ var ServiceState = /*#__PURE__*/function () {
56
56
  }
57
57
  }
58
58
 
59
- /**
60
- * Set a catalog to be ready or not.
61
- *
62
- * @public
63
- * @memberof ServiceState
64
- * @param {string} catalog - Catalog to target.
65
- * @param {boolean} ready - If the target is ready or not.
66
- * @returns {undefined}
59
+ /**
60
+ * Set a catalog to be ready or not.
61
+ *
62
+ * @public
63
+ * @memberof ServiceState
64
+ * @param {string} catalog - Catalog to target.
65
+ * @param {boolean} ready - If the target is ready or not.
66
+ * @returns {undefined}
67
67
  */
68
68
  }, {
69
69
  key: "setReady",
@@ -75,13 +75,13 @@ var ServiceState = /*#__PURE__*/function () {
75
75
  }
76
76
  }
77
77
 
78
- /**
79
- * Generate a {@link CatalogState}.
80
- *
81
- * @public
82
- * @static
83
- * @memberof ServiceState
84
- * @returns {CatalogState} - The generated {@link CatalogState}.
78
+ /**
79
+ * Generate a {@link CatalogState}.
80
+ *
81
+ * @public
82
+ * @static
83
+ * @memberof ServiceState
84
+ * @returns {CatalogState} - The generated {@link CatalogState}.
85
85
  */
86
86
  }], [{
87
87
  key: "generateCatalogState",
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","require","ServiceState","_this","_classCallCheck2","default","SERVICE_CATALOGS","forEach","catalog","generateCatalogState","_createClass2","key","value","setCollecting","collecting","setReady","ready","exports"],"sources":["service-state.js"],"sourcesContent":["import {SERVICE_CATALOGS} from './constants';\n\n/**\n * The state of a specific catalog to be used by {@link ServiceState}.\n *\n * @typedef {Record<string, boolean>} CatalogState\n * @property {boolean} CatalogState.collecting - If the catalog is collecting.\n * @property {boolean} CatalogState.ready - If the catalog is ready.\n */\n\n/**\n * @class\n * @classdesc - Manages the state of the service catalogs for a webex instance.\n */\nexport default class ServiceState {\n /**\n * Generate a new {@link ServiceState}.\n *\n * @public\n * @constructor\n * @memberof ServiceState\n */\n constructor() {\n // Iterate over the possible catalog names and generate their states.\n SERVICE_CATALOGS.forEach((catalog) => {\n this[catalog] = ServiceState.generateCatalogState();\n });\n }\n\n /**\n * Set a catalog to be collecting or not.\n *\n * @public\n * @memberof ServiceState\n * @param {string} catalog - Catalog to target.\n * @param {boolean} collecting - If the target is collecting or not.\n * @returns {undefined}\n */\n setCollecting(catalog, collecting) {\n // Validate that the catalog state exists.\n if (this[catalog]) {\n // Set the 'collecting' status of the catalog state.\n this[catalog].collecting = collecting;\n }\n }\n\n /**\n * Set a catalog to be ready or not.\n *\n * @public\n * @memberof ServiceState\n * @param {string} catalog - Catalog to target.\n * @param {boolean} ready - If the target is ready or not.\n * @returns {undefined}\n */\n setReady(catalog, ready) {\n // Validate that the catalog state exists.\n if (this[catalog]) {\n // Set the 'ready' status of the catalog state.\n this[catalog].ready = ready;\n }\n }\n\n /**\n * Generate a {@link CatalogState}.\n *\n * @public\n * @static\n * @memberof ServiceState\n * @returns {CatalogState} - The generated {@link CatalogState}.\n */\n static generateCatalogState() {\n return {\n collecting: false,\n ready: false,\n };\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAHA,IAIqBC,YAAY;EAC/B;AACF;AACA;AACA;AACA;AACA;AACA;EACE,SAAAA,aAAA,EAAc;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAH,YAAA;IACZ;IACAI,2BAAgB,CAACC,OAAO,CAAC,UAACC,OAAO,EAAK;MACpCL,KAAI,CAACK,OAAO,CAAC,GAAGN,YAAY,CAACO,oBAAoB,EAAE;IACrD,CAAC,CAAC;EACJ;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE,IAAAC,aAAA,CAAAL,OAAA,EAAAH,YAAA;IAAAS,GAAA;IAAAC,KAAA,EASA,SAAAC,cAAcL,OAAO,EAAEM,UAAU,EAAE;MACjC;MACA,IAAI,IAAI,CAACN,OAAO,CAAC,EAAE;QACjB;QACA,IAAI,CAACA,OAAO,CAAC,CAACM,UAAU,GAAGA,UAAU;MACvC;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAH,GAAA;IAAAC,KAAA,EASA,SAAAG,SAASP,OAAO,EAAEQ,KAAK,EAAE;MACvB;MACA,IAAI,IAAI,CAACR,OAAO,CAAC,EAAE;QACjB;QACA,IAAI,CAACA,OAAO,CAAC,CAACQ,KAAK,GAAGA,KAAK;MAC7B;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAAL,GAAA;IAAAC,KAAA,EAQA,SAAAH,qBAAA,EAA8B;MAC5B,OAAO;QACLK,UAAU,EAAE,KAAK;QACjBE,KAAK,EAAE;MACT,CAAC;IACH;EAAC;EAAA,OAAAd,YAAA;AAAA;AAAAe,OAAA,CAAAZ,OAAA,GAAAH,YAAA"}
1
+ {"version":3,"names":["_constants","require","ServiceState","_this","_classCallCheck2","default","SERVICE_CATALOGS","forEach","catalog","generateCatalogState","_createClass2","key","value","setCollecting","collecting","setReady","ready","exports"],"sources":["service-state.js"],"sourcesContent":["import {SERVICE_CATALOGS} from './constants';\r\n\r\n/**\r\n * The state of a specific catalog to be used by {@link ServiceState}.\r\n *\r\n * @typedef {Record<string, boolean>} CatalogState\r\n * @property {boolean} CatalogState.collecting - If the catalog is collecting.\r\n * @property {boolean} CatalogState.ready - If the catalog is ready.\r\n */\r\n\r\n/**\r\n * @class\r\n * @classdesc - Manages the state of the service catalogs for a webex instance.\r\n */\r\nexport default class ServiceState {\r\n /**\r\n * Generate a new {@link ServiceState}.\r\n *\r\n * @public\r\n * @constructor\r\n * @memberof ServiceState\r\n */\r\n constructor() {\r\n // Iterate over the possible catalog names and generate their states.\r\n SERVICE_CATALOGS.forEach((catalog) => {\r\n this[catalog] = ServiceState.generateCatalogState();\r\n });\r\n }\r\n\r\n /**\r\n * Set a catalog to be collecting or not.\r\n *\r\n * @public\r\n * @memberof ServiceState\r\n * @param {string} catalog - Catalog to target.\r\n * @param {boolean} collecting - If the target is collecting or not.\r\n * @returns {undefined}\r\n */\r\n setCollecting(catalog, collecting) {\r\n // Validate that the catalog state exists.\r\n if (this[catalog]) {\r\n // Set the 'collecting' status of the catalog state.\r\n this[catalog].collecting = collecting;\r\n }\r\n }\r\n\r\n /**\r\n * Set a catalog to be ready or not.\r\n *\r\n * @public\r\n * @memberof ServiceState\r\n * @param {string} catalog - Catalog to target.\r\n * @param {boolean} ready - If the target is ready or not.\r\n * @returns {undefined}\r\n */\r\n setReady(catalog, ready) {\r\n // Validate that the catalog state exists.\r\n if (this[catalog]) {\r\n // Set the 'ready' status of the catalog state.\r\n this[catalog].ready = ready;\r\n }\r\n }\r\n\r\n /**\r\n * Generate a {@link CatalogState}.\r\n *\r\n * @public\r\n * @static\r\n * @memberof ServiceState\r\n * @returns {CatalogState} - The generated {@link CatalogState}.\r\n */\r\n static generateCatalogState() {\r\n return {\r\n collecting: false,\r\n ready: false,\r\n };\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAHA,IAIqBC,YAAY;EAC/B;AACF;AACA;AACA;AACA;AACA;AACA;EACE,SAAAA,aAAA,EAAc;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAH,YAAA;IACZ;IACAI,2BAAgB,CAACC,OAAO,CAAC,UAACC,OAAO,EAAK;MACpCL,KAAI,CAACK,OAAO,CAAC,GAAGN,YAAY,CAACO,oBAAoB,EAAE;IACrD,CAAC,CAAC;EACJ;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE,IAAAC,aAAA,CAAAL,OAAA,EAAAH,YAAA;IAAAS,GAAA;IAAAC,KAAA,EASA,SAAAC,cAAcL,OAAO,EAAEM,UAAU,EAAE;MACjC;MACA,IAAI,IAAI,CAACN,OAAO,CAAC,EAAE;QACjB;QACA,IAAI,CAACA,OAAO,CAAC,CAACM,UAAU,GAAGA,UAAU;MACvC;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAH,GAAA;IAAAC,KAAA,EASA,SAAAG,SAASP,OAAO,EAAEQ,KAAK,EAAE;MACvB;MACA,IAAI,IAAI,CAACR,OAAO,CAAC,EAAE;QACjB;QACA,IAAI,CAACA,OAAO,CAAC,CAACQ,KAAK,GAAGA,KAAK;MAC7B;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAAL,GAAA;IAAAC,KAAA,EAQA,SAAAH,qBAAA,EAA8B;MAC5B,OAAO;QACLK,UAAU,EAAE,KAAK;QACjBE,KAAK,EAAE;MACT,CAAC;IACH;EAAC;EAAA,OAAAd,YAAA;AAAA;AAAAe,OAAA,CAAAZ,OAAA,GAAAH,YAAA"}
@@ -9,8 +9,8 @@ exports.default = void 0;
9
9
  var _url = _interopRequireDefault(require("url"));
10
10
  var _ampersandState = _interopRequireDefault(require("ampersand-state"));
11
11
  /* eslint-disable no-underscore-dangle */
12
- /**
13
- * @class
12
+ /**
13
+ * @class
14
14
  */
15
15
  var ServiceUrl = _ampersandState.default.extend({
16
16
  namespace: 'ServiceUrl',
@@ -21,11 +21,11 @@ var ServiceUrl = _ampersandState.default.extend({
21
21
  }],
22
22
  name: ['string', true, undefined]
23
23
  },
24
- /**
25
- * Generate a host url based on the host
26
- * uri provided.
27
- * @param {string} hostUri
28
- * @returns {string}
24
+ /**
25
+ * Generate a host url based on the host
26
+ * uri provided.
27
+ * @param {string} hostUri
28
+ * @returns {string}
29
29
  */
30
30
  _generateHostUrl: function _generateHostUrl(hostUri) {
31
31
  var url = _url.default.parse(this.defaultUrl);
@@ -35,10 +35,10 @@ var ServiceUrl = _ampersandState.default.extend({
35
35
  url.host = "".concat(hostUri).concat(url.port ? ":".concat(url.port) : '');
36
36
  return _url.default.format(url);
37
37
  },
38
- /**
39
- * Generate a list of urls based on this
40
- * `ServiceUrl`'s known hosts.
41
- * @returns {string[]}
38
+ /**
39
+ * Generate a list of urls based on this
40
+ * `ServiceUrl`'s known hosts.
41
+ * @returns {string[]}
42
42
  */
43
43
  _getHostUrls: function _getHostUrls() {
44
44
  var _this = this;
@@ -49,13 +49,13 @@ var ServiceUrl = _ampersandState.default.extend({
49
49
  };
50
50
  });
51
51
  },
52
- /**
53
- * Get the current host url with the highest priority. If a clusterId is not
54
- * provided, this will only return a URL with a filtered host that has the
55
- * `homeCluster` value set to `true`.
56
- *
57
- * @param {string} [clusterId] - The clusterId to filter for a priority host.
58
- * @returns {string} - The priority host url.
52
+ /**
53
+ * Get the current host url with the highest priority. If a clusterId is not
54
+ * provided, this will only return a URL with a filtered host that has the
55
+ * `homeCluster` value set to `true`.
56
+ *
57
+ * @param {string} [clusterId] - The clusterId to filter for a priority host.
58
+ * @returns {string} - The priority host url.
59
59
  */
60
60
  _getPriorityHostUrl: function _getPriorityHostUrl(clusterId) {
61
61
  if (this.hosts.length === 0) {
@@ -78,12 +78,12 @@ var ServiceUrl = _ampersandState.default.extend({
78
78
  return previous.priority > current.priority || !previous.homeCluster ? current : previous;
79
79
  }, {}).host);
80
80
  },
81
- /**
82
- * Attempt to mark a host from this `ServiceUrl` as failed and return true
83
- * if the provided url has a host that could be successfully marked as failed.
84
- *
85
- * @param {string} url
86
- * @returns {boolean}
81
+ /**
82
+ * Attempt to mark a host from this `ServiceUrl` as failed and return true
83
+ * if the provided url has a host that could be successfully marked as failed.
84
+ *
85
+ * @param {string} url
86
+ * @returns {boolean}
87
87
  */
88
88
  failHost: function failHost(url) {
89
89
  if (url === this.defaultUrl) {
@@ -99,13 +99,13 @@ var ServiceUrl = _ampersandState.default.extend({
99
99
  }
100
100
  return foundHost !== undefined;
101
101
  },
102
- /**
103
- * Get the current `defaultUrl` or generate a url using the host with the
104
- * highest priority via host rendering.
105
- *
106
- * @param {boolean} [priorityHost] - Retrieve the priority host.
107
- * @param {string} [clusterId] - Cluster to match a host against.
108
- * @returns {string} - The full service url.
102
+ /**
103
+ * Get the current `defaultUrl` or generate a url using the host with the
104
+ * highest priority via host rendering.
105
+ *
106
+ * @param {boolean} [priorityHost] - Retrieve the priority host.
107
+ * @param {string} [clusterId] - Cluster to match a host against.
108
+ * @returns {string} - The full service url.
109
109
  */
110
110
  get: function get(priorityHost, clusterId) {
111
111
  if (!priorityHost) {
@@ -1 +1 @@
1
- {"version":3,"names":["_url","_interopRequireDefault","require","_ampersandState","ServiceUrl","AmpState","extend","namespace","props","defaultUrl","undefined","hosts","name","_generateHostUrl","hostUri","url","Url","parse","host","concat","port","format","_getHostUrls","_this","map","priority","_getPriorityHostUrl","clusterId","length","filteredHosts","filter","id","homeCluster","aliveHosts","failed","reduce","previous","current","failHost","_Url$parse","hostname","foundHost","find","hostObj","get","priorityHost","_default","exports","default"],"sources":["service-url.js"],"sourcesContent":["import Url from 'url';\n\nimport AmpState from 'ampersand-state';\n\n/* eslint-disable no-underscore-dangle */\n/**\n * @class\n */\nconst ServiceUrl = AmpState.extend({\n namespace: 'ServiceUrl',\n\n props: {\n defaultUrl: ['string', true, undefined],\n hosts: ['array', false, () => []],\n name: ['string', true, undefined],\n },\n\n /**\n * Generate a host url based on the host\n * uri provided.\n * @param {string} hostUri\n * @returns {string}\n */\n _generateHostUrl(hostUri) {\n const url = Url.parse(this.defaultUrl);\n\n // setting url.hostname will not apply during Url.format(), set host via\n // a string literal instead.\n url.host = `${hostUri}${url.port ? `:${url.port}` : ''}`;\n\n return Url.format(url);\n },\n\n /**\n * Generate a list of urls based on this\n * `ServiceUrl`'s known hosts.\n * @returns {string[]}\n */\n _getHostUrls() {\n return this.hosts.map((host) => ({\n url: this._generateHostUrl(host.host),\n priority: host.priority,\n }));\n },\n\n /**\n * Get the current host url with the highest priority. If a clusterId is not\n * provided, this will only return a URL with a filtered host that has the\n * `homeCluster` value set to `true`.\n *\n * @param {string} [clusterId] - The clusterId to filter for a priority host.\n * @returns {string} - The priority host url.\n */\n _getPriorityHostUrl(clusterId) {\n if (this.hosts.length === 0) {\n return this.defaultUrl;\n }\n\n let filteredHosts = clusterId\n ? this.hosts.filter((host) => host.id === clusterId)\n : this.hosts.filter((host) => host.homeCluster);\n\n const aliveHosts = filteredHosts.filter((host) => !host.failed);\n\n filteredHosts =\n aliveHosts.length === 0\n ? filteredHosts.map((host) => {\n /* eslint-disable-next-line no-param-reassign */\n host.failed = false;\n\n return host;\n })\n : aliveHosts;\n\n return this._generateHostUrl(\n filteredHosts.reduce(\n (previous, current) =>\n previous.priority > current.priority || !previous.homeCluster ? current : previous,\n {}\n ).host\n );\n },\n\n /**\n * Attempt to mark a host from this `ServiceUrl` as failed and return true\n * if the provided url has a host that could be successfully marked as failed.\n *\n * @param {string} url\n * @returns {boolean}\n */\n failHost(url) {\n if (url === this.defaultUrl) {\n return true;\n }\n\n const {hostname} = Url.parse(url);\n const foundHost = this.hosts.find((hostObj) => hostObj.host === hostname);\n\n if (foundHost) {\n foundHost.failed = true;\n }\n\n return foundHost !== undefined;\n },\n\n /**\n * Get the current `defaultUrl` or generate a url using the host with the\n * highest priority via host rendering.\n *\n * @param {boolean} [priorityHost] - Retrieve the priority host.\n * @param {string} [clusterId] - Cluster to match a host against.\n * @returns {string} - The full service url.\n */\n get(priorityHost, clusterId) {\n if (!priorityHost) {\n return this.defaultUrl;\n }\n\n return this._getPriorityHostUrl(clusterId);\n },\n});\n/* eslint-enable no-underscore-dangle */\n\nexport default ServiceUrl;\n"],"mappings":";;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA,IAAME,UAAU,GAAGC,uBAAQ,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAE,YAAY;EAEvBC,KAAK,EAAE;IACLC,UAAU,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAEC,SAAS,CAAC;IACvCC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE;MAAA,OAAM,EAAE;IAAA,EAAC;IACjCC,IAAI,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAEF,SAAS;EAClC,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;EACEG,gBAAgB,WAAAA,iBAACC,OAAO,EAAE;IACxB,IAAM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ersandState","ServiceUrl","AmpState","extend","namespace","props","defaultUrl","undefined","hosts","name","_generateHostUrl","hostUri","url","Url","parse","host","concat","port","format","_getHostUrls","_this","map","priority","_getPriorityHostUrl","clusterId","length","filteredHosts","filter","id","homeCluster","aliveHosts","failed","reduce","previous","current","failHost","_Url$parse","hostname","foundHost","find","hostObj","get","priorityHost","_default","exports","default"],"sources":["service-url.js"],"sourcesContent":["import Url from 'url';\r\n\r\nimport AmpState from 'ampersand-state';\r\n\r\n/* eslint-disable no-underscore-dangle */\r\n/**\r\n * @class\r\n */\r\nconst ServiceUrl = AmpState.extend({\r\n namespace: 'ServiceUrl',\r\n\r\n props: {\r\n defaultUrl: ['string', true, undefined],\r\n hosts: ['array', false, () => []],\r\n name: ['string', true, undefined],\r\n },\r\n\r\n /**\r\n * Generate a host url based on the host\r\n * uri provided.\r\n * @param {string} hostUri\r\n * @returns {string}\r\n */\r\n _generateHostUrl(hostUri) {\r\n const url = Url.parse(this.defaultUrl);\r\n\r\n // setting url.hostname will not apply during Url.format(), set host via\r\n // a string literal instead.\r\n url.host = `${hostUri}${url.port ? `:${url.port}` : ''}`;\r\n\r\n return Url.format(url);\r\n },\r\n\r\n /**\r\n * Generate a list of urls based on this\r\n * `ServiceUrl`'s known hosts.\r\n * @returns {string[]}\r\n */\r\n _getHostUrls() {\r\n return this.hosts.map((host) => ({\r\n url: this._generateHostUrl(host.host),\r\n priority: host.priority,\r\n }));\r\n },\r\n\r\n /**\r\n * Get the current host url with the highest priority. If a clusterId is not\r\n * provided, this will only return a URL with a filtered host that has the\r\n * `homeCluster` value set to `true`.\r\n *\r\n * @param {string} [clusterId] - The clusterId to filter for a priority host.\r\n * @returns {string} - The priority host url.\r\n */\r\n _getPriorityHostUrl(clusterId) {\r\n if (this.hosts.length === 0) {\r\n return this.defaultUrl;\r\n }\r\n\r\n let filteredHosts = clusterId\r\n ? this.hosts.filter((host) => host.id === clusterId)\r\n : this.hosts.filter((host) => host.homeCluster);\r\n\r\n const aliveHosts = filteredHosts.filter((host) => !host.failed);\r\n\r\n filteredHosts =\r\n aliveHosts.length === 0\r\n ? filteredHosts.map((host) => {\r\n /* eslint-disable-next-line no-param-reassign */\r\n host.failed = false;\r\n\r\n return host;\r\n })\r\n : aliveHosts;\r\n\r\n return this._generateHostUrl(\r\n filteredHosts.reduce(\r\n (previous, current) =>\r\n previous.priority > current.priority || !previous.homeCluster ? current : previous,\r\n {}\r\n ).host\r\n );\r\n },\r\n\r\n /**\r\n * Attempt to mark a host from this `ServiceUrl` as failed and return true\r\n * if the provided url has a host that could be successfully marked as failed.\r\n *\r\n * @param {string} url\r\n * @returns {boolean}\r\n */\r\n failHost(url) {\r\n if (url === this.defaultUrl) {\r\n return true;\r\n }\r\n\r\n const {hostname} = Url.parse(url);\r\n const foundHost = this.hosts.find((hostObj) => hostObj.host === hostname);\r\n\r\n if (foundHost) {\r\n foundHost.failed = true;\r\n }\r\n\r\n return foundHost !== undefined;\r\n },\r\n\r\n /**\r\n * Get the current `defaultUrl` or generate a url using the host with the\r\n * highest priority via host rendering.\r\n *\r\n * @param {boolean} [priorityHost] - Retrieve the priority host.\r\n * @param {string} [clusterId] - Cluster to match a host against.\r\n * @returns {string} - The full service url.\r\n */\r\n get(priorityHost, clusterId) {\r\n if (!priorityHost) {\r\n return this.defaultUrl;\r\n }\r\n\r\n return this._getPriorityHostUrl(clusterId);\r\n },\r\n});\r\n/* eslint-enable no-underscore-dangle */\r\n\r\nexport default ServiceUrl;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA,IAAME,UAAU,GAAGC,uBAAQ,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAE,YAAY;EAEvBC,KAAK,EAAE;IACLC,UAAU,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAEC,SAAS,CAAC;IACvCC,KAAK,EAAE,CAAC,O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