@webex/webex-core 3.8.1 → 3.9.0

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 (85) hide show
  1. package/README.md +87 -27
  2. package/dist/index.js +9 -33
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/batcher.js +1 -1
  5. package/dist/lib/constants.js +10 -1
  6. package/dist/lib/constants.js.map +1 -1
  7. package/dist/lib/credentials/credentials.js +1 -1
  8. package/dist/lib/credentials/token.js +1 -1
  9. package/dist/lib/{services-v2/interceptors → interceptors}/server-error.js +1 -1
  10. package/dist/lib/interceptors/server-error.js.map +1 -0
  11. package/dist/lib/services/index.js +2 -29
  12. package/dist/lib/services/index.js.map +1 -1
  13. package/dist/lib/services/service-host.js +1 -1
  14. package/dist/lib/services/service-host.js.map +1 -1
  15. package/dist/lib/services/service-registry.js +1 -1
  16. package/dist/lib/services/service-registry.js.map +1 -1
  17. package/dist/lib/services/service-state.js +1 -1
  18. package/dist/lib/services/service-state.js.map +1 -1
  19. package/dist/lib/services/services.js +3 -3
  20. package/dist/lib/services/services.js.map +1 -1
  21. package/dist/lib/services-v2/index.js +0 -29
  22. package/dist/lib/services-v2/index.js.map +1 -1
  23. package/dist/lib/services-v2/metrics.js.map +1 -1
  24. package/dist/lib/services-v2/service-catalog.js +11 -10
  25. package/dist/lib/services-v2/service-catalog.js.map +1 -1
  26. package/dist/lib/services-v2/services-v2.js +56 -67
  27. package/dist/lib/services-v2/services-v2.js.map +1 -1
  28. package/dist/lib/services-v2/types.js.map +1 -1
  29. package/dist/plugins/logger.js +1 -1
  30. package/dist/webex-core.js +3 -3
  31. package/dist/webex-core.js.map +1 -1
  32. package/package.json +13 -13
  33. package/src/index.js +5 -14
  34. package/src/lib/constants.js +29 -1
  35. package/src/lib/{services/interceptors → interceptors}/server-error.js +1 -1
  36. package/src/lib/services/index.js +2 -7
  37. package/src/lib/services/service-host.js +1 -1
  38. package/src/lib/services/service-registry.js +1 -1
  39. package/src/lib/services/service-state.js +1 -1
  40. package/src/lib/services/services.js +2 -2
  41. package/src/lib/services-v2/index.ts +0 -16
  42. package/src/lib/services-v2/service-catalog.ts +20 -19
  43. package/src/lib/services-v2/{services-v2.js → services-v2.ts} +116 -94
  44. package/src/lib/services-v2/types.ts +62 -2
  45. package/src/webex-core.js +1 -1
  46. package/test/fixtures/host-catalog-v2.ts +30 -122
  47. package/test/integration/spec/services/services.js +11 -0
  48. package/test/integration/spec/services-v2/service-catalog.js +664 -0
  49. package/test/integration/spec/services-v2/services-v2.js +1061 -0
  50. package/test/unit/spec/services-v2/service-detail.ts +1 -1
  51. package/test/unit/spec/services-v2/services-v2.ts +390 -436
  52. package/dist/lib/services/constants.js +0 -17
  53. package/dist/lib/services/constants.js.map +0 -1
  54. package/dist/lib/services/interceptors/hostmap.js +0 -64
  55. package/dist/lib/services/interceptors/hostmap.js.map +0 -1
  56. package/dist/lib/services/interceptors/server-error.js +0 -77
  57. package/dist/lib/services/interceptors/server-error.js.map +0 -1
  58. package/dist/lib/services/interceptors/service.js +0 -137
  59. package/dist/lib/services/interceptors/service.js.map +0 -1
  60. package/dist/lib/services-v2/constants.js +0 -17
  61. package/dist/lib/services-v2/constants.js.map +0 -1
  62. package/dist/lib/services-v2/interceptors/server-error.js.map +0 -1
  63. package/dist/lib/services-v2/service-host.js +0 -300
  64. package/dist/lib/services-v2/service-host.js.map +0 -1
  65. package/dist/lib/services-v2/service-registry.js +0 -534
  66. package/dist/lib/services-v2/service-registry.js.map +0 -1
  67. package/dist/lib/services-v2/service-state.js +0 -97
  68. package/dist/lib/services-v2/service-state.js.map +0 -1
  69. package/dist/lib/services-v2/service-url.js +0 -119
  70. package/dist/lib/services-v2/service-url.js.map +0 -1
  71. package/src/lib/services/constants.js +0 -21
  72. package/src/lib/services/interceptors/hostmap.js +0 -36
  73. package/src/lib/services/interceptors/service.js +0 -101
  74. package/src/lib/services-v2/constants.ts +0 -21
  75. package/src/lib/services-v2/interceptors/server-error.js +0 -48
  76. /package/dist/lib/{services-v2/interceptors → interceptors}/hostmap.js +0 -0
  77. /package/dist/lib/{services-v2/interceptors → interceptors}/hostmap.js.map +0 -0
  78. /package/dist/lib/{services-v2/interceptors → interceptors}/service.js +0 -0
  79. /package/dist/lib/{services-v2/interceptors → interceptors}/service.js.map +0 -0
  80. /package/dist/lib/{services/metrics.js → metrics.js} +0 -0
  81. /package/dist/lib/{services/metrics.js.map → metrics.js.map} +0 -0
  82. /package/src/lib/{services-v2/interceptors → interceptors}/hostmap.js +0 -0
  83. /package/src/lib/{services-v2/interceptors → interceptors}/service.js +0 -0
  84. /package/src/lib/{services-v2/metrics.js → metrics.js} +0 -0
  85. /package/src/lib/{services/metrics.js → services-v2/metrics.ts} +0 -0
@@ -1,300 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
- var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
11
- var _url = _interopRequireDefault(require("url"));
12
- var _constants = require("./constants");
13
- /**
14
- * The parameter transfer object for {@link ServiceHost#constructor}.
15
- *
16
- * @typedef {Object} ServiceHostConstructorPTO
17
- * @property {string} ServiceHostConstructorPTO.catalog - The host's catalog.
18
- * @property {string} ServiceHostConstructorPTO.defaultUri - The host's default.
19
- * @property {string} ServiceHostConstructorPTO.hostGroup - The host's group.
20
- * @property {string} ServiceHostConstructorPTO.id - The host's clusterId.
21
- * @property {number} ServiceHostConstructorPTO.priority - The host's priority.
22
- * @property {string} ServiceHostConstructorPTO.uri - The host's uri.
23
- */
24
- /**
25
- * The parameter transfer object for {@link ServiceHost#polyGenerate}.
26
- *
27
- * @typedef {Object} ServiceHostPolyGeneratePTO
28
- * @property {string} ServiceHostPolyGeneratePTO.catalog - The target catalog.
29
- * @property {string} ServiceHostPolyGeneratePTO.name - The service name.
30
- * @property {string} ServiceHostPolyGeneratePTO.url - The service url.
31
- */
32
- /**
33
- * @class
34
- * @classdesc - Manages a single service host and its associated data.
35
- */
36
- var ServiceHost = exports.default = /*#__PURE__*/function () {
37
- /**
38
- * Generate a new {@link ServiceHost}.
39
- *
40
- * @public
41
- * @constructor
42
- * @memberof ServiceHost
43
- * @param {ServiceHostConstructorPTO} pto
44
- */
45
- function ServiceHost(pto) {
46
- (0, _classCallCheck2.default)(this, ServiceHost);
47
- // Validate the parameter transfer object.
48
- ServiceHost.validate(pto);
49
-
50
- // Map the parameter transfer object to the class object.
51
- /**
52
- * The catalog name that the {@link ServiceHost} is associated with.
53
- *
54
- * @instance
55
- * @type {string}
56
- * @public
57
- * @memberof ServiceHost
58
- */
59
- this.catalog = pto.catalog;
60
-
61
- /**
62
- * The default URI for the {@link ServiceHost}.
63
- *
64
- * @instance
65
- * @type {string}
66
- * @public
67
- * @memberof ServiceHost
68
- */
69
- this.default = pto.defaultUri;
70
-
71
- /**
72
- * The host group that the {@link ServiceHost} is associated with.
73
- *
74
- * @instance
75
- * @type {string}
76
- * @public
77
- * @memberof ServiceHost
78
- */
79
- this.hostGroup = pto.hostGroup;
80
-
81
- /**
82
- * The cluster ID of the {@link ServiceHost}.
83
- *
84
- * @instance
85
- * @type {string}
86
- * @public
87
- * @memberof ServiceHost
88
- */
89
- this.id = pto.id;
90
-
91
- /**
92
- * The priority value of the {@link ServiceHost}. The lower the number, the
93
- * higher the priority.
94
- *
95
- * @instance
96
- * @type {number}
97
- * @public
98
- * @memberof ServiceHost
99
- */
100
- this.priority = pto.priority;
101
-
102
- /**
103
- * The host uri of the {@link ServiceHost}.
104
- *
105
- * @instance
106
- * @type {string}
107
- * @public
108
- * @memberof ServiceHost
109
- */
110
- this.uri = pto.uri;
111
-
112
- // Generate flags.
113
- /**
114
- * If the {@link ServiceHost} is marked as failed.
115
- *
116
- * @instance
117
- * @type {boolean}
118
- * @protected
119
- * @memberof ServiceHost
120
- */
121
- this.failed = false;
122
-
123
- /**
124
- * If the {@link ServiceHost} is marked as replaced.
125
- *
126
- * @instance
127
- * @type {boolean}
128
- * @protected
129
- * @memberof ServiceHost
130
- */
131
- this.replaced = false;
132
- }
133
-
134
- /**
135
- * If the {@link ServiceHost} is in an active state.
136
- *
137
- * @public
138
- * @memberof ServiceHost
139
- * @type {boolean} - `true` if the service is active and usable.
140
- */
141
- (0, _createClass2.default)(ServiceHost, [{
142
- key: "active",
143
- get: function get() {
144
- // Validate that the `ServiceHost` was not marked as failed or replaced.
145
- return !this.failed && !this.replaced;
146
- }
147
-
148
- /**
149
- * If the host is local to the user's cluster.
150
- *
151
- * @public
152
- * @memberof ServiceHost
153
- * @type {boolean} - If the host is local.
154
- */
155
- }, {
156
- key: "local",
157
- get: function get() {
158
- return this.default.includes(this.hostGroup);
159
- }
160
-
161
- /**
162
- * The service value.
163
- *
164
- * @public
165
- * @memberof ServiceHost
166
- * @type {string} - The service value.
167
- */
168
- }, {
169
- key: "service",
170
- get: function get() {
171
- return this.id.split(':')[3];
172
- }
173
-
174
- /**
175
- * The formatted url for the host.
176
- *
177
- * @public
178
- * @memberof ServiceHost
179
- * @type {string} - The service url.
180
- */
181
- }, {
182
- key: "url",
183
- get: function get() {
184
- // Generate a url object from the default url.
185
- var urlObj = _url.default.parse(this.default);
186
-
187
- // Format the host of the generated url object.
188
- urlObj.host = "".concat(this.uri).concat(urlObj.port ? ":".concat(urlObj.port) : '');
189
-
190
- // Assign the formatted url to this.
191
- return _url.default.format(urlObj);
192
- }
193
-
194
- /**
195
- * Set one or more of the status properties of the class object.
196
- *
197
- * @public
198
- * @memberof ServiceHost
199
- * @param {Object} pto - The parameter transfer object.
200
- * @property {boolean} [pto.failed] - The failed status to set.
201
- * @property {boolean} [pto.replaced] - the replaced status to set.
202
- * @returns {this}
203
- */
204
- }, {
205
- key: "setStatus",
206
- value: function setStatus(_ref) {
207
- var failed = _ref.failed,
208
- replaced = _ref.replaced;
209
- if (failed !== undefined) {
210
- this.failed = failed;
211
- }
212
- if (replaced !== undefined) {
213
- this.replaced = replaced;
214
- }
215
- return this;
216
- }
217
-
218
- /**
219
- * Generate a service host using only a catalog, name, and URL.
220
- *
221
- * @public
222
- * @static
223
- * @memberof ServiceHost
224
- * @param {ServiceHostPolyGeneratePTO} pto
225
- * @returns {ServiceHost} - The generated service host.
226
- */
227
- }], [{
228
- key: "polyGenerate",
229
- value: function polyGenerate(_ref2) {
230
- var catalog = _ref2.catalog,
231
- name = _ref2.name,
232
- url = _ref2.url;
233
- return new ServiceHost({
234
- catalog: catalog,
235
- defaultUri: url,
236
- hostGroup: _url.default.parse(url).host,
237
- id: name ? "poly-head:poly-group:poly-cluster:".concat(name) : undefined,
238
- priority: 1,
239
- uri: _url.default.parse(url).host
240
- });
241
- }
242
-
243
- /**
244
- * Validate that a constructor parameter transfer object is valid.
245
- *
246
- * @public
247
- * @static
248
- * @memberof ServiceHost
249
- * @param {ServiceHostConstructorPTO} pto
250
- * @throws - If the parameter transfer object is not valid.
251
- * @returns {undefined}
252
- */
253
- }, {
254
- key: "validate",
255
- value: function validate(_ref3) {
256
- var catalog = _ref3.catalog,
257
- defaultUri = _ref3.defaultUri,
258
- hostGroup = _ref3.hostGroup,
259
- id = _ref3.id,
260
- priority = _ref3.priority,
261
- uri = _ref3.uri;
262
- // Generate error-throwing method.
263
- var throwError = function throwError(msg) {
264
- throw new Error("service-host: invalid constructor parameters, ".concat(msg));
265
- };
266
-
267
- // Validate the catalog property.
268
- if (!_constants.SERVICE_CATALOGS.includes(catalog)) {
269
- throwError("'catalog' must be a string");
270
- }
271
-
272
- // Validate the `defaultUri` property.
273
- if (typeof defaultUri !== 'string') {
274
- throwError("'defaultUri' must be a string");
275
- }
276
-
277
- // Validate the `hostGroup` property.
278
- if (typeof hostGroup !== 'string') {
279
- throwError("'hostGroup' must be a string");
280
- }
281
-
282
- // Validate the `id` property.
283
- if (typeof id !== 'string' || id.split(':').length !== 4) {
284
- throwError("'id' must be a string that contains 3 ':' characters");
285
- }
286
-
287
- // Validate the `priority` property.
288
- if (typeof priority !== 'number') {
289
- throwError("'priority' must be a number");
290
- }
291
-
292
- // Validate the `uri` property.
293
- if (typeof uri !== 'string') {
294
- throwError("'uri' must be a string");
295
- }
296
- }
297
- }]);
298
- return ServiceHost;
299
- }();
300
- //# sourceMappingURL=service-host.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_url","_interopRequireDefault","require","_constants","ServiceHost","exports","default","pto","_classCallCheck2","validate","catalog","defaultUri","hostGroup","id","priority","uri","failed","replaced","_createClass2","key","get","includes","split","urlObj","Url","parse","host","concat","port","format","value","setStatus","_ref","undefined","polyGenerate","_ref2","name","url","_ref3","throwError","msg","Error","SERVICE_CATALOGS","length"],"sources":["service-host.js"],"sourcesContent":["import Url from 'url';\n\nimport {SERVICE_CATALOGS} from './constants';\n\n/**\n * The parameter transfer object for {@link ServiceHost#constructor}.\n *\n * @typedef {Object} ServiceHostConstructorPTO\n * @property {string} ServiceHostConstructorPTO.catalog - The host's catalog.\n * @property {string} ServiceHostConstructorPTO.defaultUri - The host's default.\n * @property {string} ServiceHostConstructorPTO.hostGroup - The host's group.\n * @property {string} ServiceHostConstructorPTO.id - The host's clusterId.\n * @property {number} ServiceHostConstructorPTO.priority - The host's priority.\n * @property {string} ServiceHostConstructorPTO.uri - The host's uri.\n */\n\n/**\n * The parameter transfer object for {@link ServiceHost#polyGenerate}.\n *\n * @typedef {Object} ServiceHostPolyGeneratePTO\n * @property {string} ServiceHostPolyGeneratePTO.catalog - The target catalog.\n * @property {string} ServiceHostPolyGeneratePTO.name - The service name.\n * @property {string} ServiceHostPolyGeneratePTO.url - The service url.\n */\n\n/**\n * @class\n * @classdesc - Manages a single service host and its associated data.\n */\nexport default class ServiceHost {\n /**\n * Generate a new {@link ServiceHost}.\n *\n * @public\n * @constructor\n * @memberof ServiceHost\n * @param {ServiceHostConstructorPTO} pto\n */\n constructor(pto) {\n // Validate the parameter transfer object.\n ServiceHost.validate(pto);\n\n // Map the parameter transfer object to the class object.\n /**\n * The catalog name that the {@link ServiceHost} is associated with.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.catalog = pto.catalog;\n\n /**\n * The default URI for the {@link ServiceHost}.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.default = pto.defaultUri;\n\n /**\n * The host group that the {@link ServiceHost} is associated with.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.hostGroup = pto.hostGroup;\n\n /**\n * The cluster ID of the {@link ServiceHost}.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.id = pto.id;\n\n /**\n * The priority value of the {@link ServiceHost}. The lower the number, the\n * higher the priority.\n *\n * @instance\n * @type {number}\n * @public\n * @memberof ServiceHost\n */\n this.priority = pto.priority;\n\n /**\n * The host uri of the {@link ServiceHost}.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.uri = pto.uri;\n\n // Generate flags.\n /**\n * If the {@link ServiceHost} is marked as failed.\n *\n * @instance\n * @type {boolean}\n * @protected\n * @memberof ServiceHost\n */\n this.failed = false;\n\n /**\n * If the {@link ServiceHost} is marked as replaced.\n *\n * @instance\n * @type {boolean}\n * @protected\n * @memberof ServiceHost\n */\n this.replaced = false;\n }\n\n /**\n * If the {@link ServiceHost} is in an active state.\n *\n * @public\n * @memberof ServiceHost\n * @type {boolean} - `true` if the service is active and usable.\n */\n get active() {\n // Validate that the `ServiceHost` was not marked as failed or replaced.\n return !this.failed && !this.replaced;\n }\n\n /**\n * If the host is local to the user's cluster.\n *\n * @public\n * @memberof ServiceHost\n * @type {boolean} - If the host is local.\n */\n get local() {\n return this.default.includes(this.hostGroup);\n }\n\n /**\n * The service value.\n *\n * @public\n * @memberof ServiceHost\n * @type {string} - The service value.\n */\n get service() {\n return this.id.split(':')[3];\n }\n\n /**\n * The formatted url for the host.\n *\n * @public\n * @memberof ServiceHost\n * @type {string} - The service url.\n */\n get url() {\n // Generate a url object from the default url.\n const urlObj = Url.parse(this.default);\n\n // Format the host of the generated url object.\n urlObj.host = `${this.uri}${urlObj.port ? `:${urlObj.port}` : ''}`;\n\n // Assign the formatted url to this.\n return Url.format(urlObj);\n }\n\n /**\n * Set one or more of the status properties of the class object.\n *\n * @public\n * @memberof ServiceHost\n * @param {Object} pto - The parameter transfer object.\n * @property {boolean} [pto.failed] - The failed status to set.\n * @property {boolean} [pto.replaced] - the replaced status to set.\n * @returns {this}\n */\n setStatus({failed, replaced}) {\n if (failed !== undefined) {\n this.failed = failed;\n }\n\n if (replaced !== undefined) {\n this.replaced = replaced;\n }\n\n return this;\n }\n\n /**\n * Generate a service host using only a catalog, name, and URL.\n *\n * @public\n * @static\n * @memberof ServiceHost\n * @param {ServiceHostPolyGeneratePTO} pto\n * @returns {ServiceHost} - The generated service host.\n */\n static polyGenerate({catalog, name, url}) {\n return new ServiceHost({\n catalog,\n defaultUri: url,\n hostGroup: Url.parse(url).host,\n id: name ? `poly-head:poly-group:poly-cluster:${name}` : undefined,\n priority: 1,\n uri: Url.parse(url).host,\n });\n }\n\n /**\n * Validate that a constructor parameter transfer object is valid.\n *\n * @public\n * @static\n * @memberof ServiceHost\n * @param {ServiceHostConstructorPTO} pto\n * @throws - If the parameter transfer object is not valid.\n * @returns {undefined}\n */\n static validate({catalog, defaultUri, hostGroup, id, priority, uri}) {\n // Generate error-throwing method.\n const throwError = (msg) => {\n throw new Error(`service-host: invalid constructor parameters, ${msg}`);\n };\n\n // Validate the catalog property.\n if (!SERVICE_CATALOGS.includes(catalog)) {\n throwError(\"'catalog' must be a string\");\n }\n\n // Validate the `defaultUri` property.\n if (typeof defaultUri !== 'string') {\n throwError(\"'defaultUri' must be a string\");\n }\n\n // Validate the `hostGroup` property.\n if (typeof hostGroup !== 'string') {\n throwError(\"'hostGroup' must be a string\");\n }\n\n // Validate the `id` property.\n if (typeof id !== 'string' || id.split(':').length !== 4) {\n throwError(\"'id' must be a string that contains 3 ':' characters\");\n }\n\n // Validate the `priority` property.\n if (typeof priority !== 'number') {\n throwError(\"'priority' must be a number\");\n }\n\n // Validate the `uri` property.\n if (typeof uri !== 'string') {\n throwError(\"'uri' must be a string\");\n }\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAHA,IAIqBE,WAAW,GAAAC,OAAA,CAAAC,OAAA;EAC9B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,SAAAF,YAAYG,GAAG,EAAE;IAAA,IAAAC,gBAAA,CAAAF,OAAA,QAAAF,WAAA;IACf;IACAA,WAAW,CAACK,QAAQ,CAACF,GAAG,CAAC;;IAEzB;IACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACG,OAAO,GAAGH,GAAG,CAACG,OAAO;;IAE1B;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACJ,OAAO,GAAGC,GAAG,CAACI,UAAU;;IAE7B;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,SAAS,GAAGL,GAAG,CAACK,SAAS;;IAE9B;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,EAAE,GAAGN,GAAG,CAACM,EAAE;;IAEhB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,QAAQ,GAAGP,GAAG,CAACO,QAAQ;;IAE5B;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,GAAG,GAAGR,GAAG,CAACQ,GAAG;;I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