@webex/webex-core 3.11.0-next.6 → 3.11.0-next.7

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.
@@ -107,7 +107,7 @@ var RedirectInterceptor = exports.default = /*#__PURE__*/function (_Interceptor)
107
107
  options.uri = _newUrl[0]; // params are already present in the qs
108
108
  } else {
109
109
  // for GET requests
110
- options.uri = options.uri.replace(/(?<=https:\/\/)[^/]+/, response.body.data.siteFullUrl);
110
+ options.uri = options.uri.replace(/(https:\/\/)[^/]+/, "$1".concat(response.body.data.siteFullUrl));
111
111
  }
112
112
  if (options.resource === 'preJoin' && options.service === 'webex-appapi-service') {
113
113
  options.headers.authorization = false;
@@ -1 +1 @@
1
- {"version":3,"names":["_lodash","require","_httpCore","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","requestHeaderName","responseHeaderName","LOCUS_REDIRECT_ERROR","APPAPI_REDIRECT_ERROR","RedirectInterceptor","exports","_Interceptor","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","onRequest","options","uri","includes","webex","config","credentials","samlUrl","tokenUrl","authorizeUrl","headers","_deleteProperty","$redirectCount","onResponse","response","clone","maxAppLevelRedirects","_promise","reject","Error","request","body","errorCode","location","logger","warn","qs","newUrl","split","maxLocusRedirects","code","data","siteFullUrl","replace","resource","service","authorization","create","Interceptor"],"sources":["redirect.js"],"sourcesContent":["/* eslint-disable prefer-destructuring */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {clone} from 'lodash';\nimport {Interceptor} from '@webex/http-core';\n\nconst requestHeaderName = 'cisco-no-http-redirect';\nconst responseHeaderName = 'cisco-location';\nconst LOCUS_REDIRECT_ERROR = 2000002;\nconst APPAPI_REDIRECT_ERROR = 404100;\n\n/**\n * @class\n */\nexport default class RedirectInterceptor extends Interceptor {\n /**\n * @returns {RedirectInterceptor}\n */\n static create() {\n return new RedirectInterceptor({webex: this});\n }\n\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n onRequest(options) {\n if (options && options.uri && typeof options.uri === 'string') {\n if (\n options.uri.includes('https://idbroker') ||\n options.uri.includes(this.webex.config.credentials.samlUrl) ||\n options.uri.includes(this.webex.config.credentials.tokenUrl) ||\n options.uri.includes(this.webex.config.credentials.authorizeUrl)\n ) {\n return options;\n }\n }\n\n // If cisco-no-http-redirect is already set, don't overwrite it\n if (requestHeaderName in options.headers) {\n // If cisco-no-http-redirect is set to null, false, or undefined, delete\n // it to prevent a CORS preflight.\n if (!options.headers[requestHeaderName]) {\n Reflect.deleteProperty(options.headers, requestHeaderName);\n }\n\n return options;\n }\n options.headers[requestHeaderName] = true;\n options.$redirectCount = options.$redirectCount || 0;\n\n return options;\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n onResponse(options, response) {\n /* eslint-disable no-else-return */\n if (response.headers && response.headers[responseHeaderName]) {\n options = clone(options);\n options.uri = response.headers[responseHeaderName];\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxAppLevelRedirects) {\n return Promise.reject(new Error('Maximum redirects exceeded'));\n }\n\n return this.webex.request(options);\n } else if (\n response.headers &&\n response.body &&\n response.body.errorCode === LOCUS_REDIRECT_ERROR &&\n response.body.location\n ) {\n options = clone(options);\n\n this.webex.logger.warn('redirect: url redirects needed from', options.uri);\n if (response.options && response.options.qs) {\n // for POST requests\n const newUrl = response.body.location.split('?');\n\n options.uri = newUrl[0]; // params are already present in the qs\n } else {\n // for GET requests\n options.uri = response.body.location;\n }\n\n this.webex.logger.warn('redirect: url redirects needed to', options.uri);\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxLocusRedirects) {\n return Promise.reject(new Error('Maximum redirects exceeded'));\n }\n\n return this.webex.request(options);\n } else if (\n response.headers &&\n response.body &&\n response.body.code === APPAPI_REDIRECT_ERROR &&\n response.body.data &&\n response.body.data.siteFullUrl\n ) {\n options = clone(options);\n\n this.webex.logger.warn('redirect: url redirects needed from', options.uri);\n if (response.options && response.options.qs) {\n // for POST requests\n const newUrl = response.body.data.siteFullUrl.split('?');\n\n options.uri = newUrl[0]; // params are already present in the qs\n } else {\n // for GET requests\n options.uri = options.uri.replace(/(?<=https:\\/\\/)[^/]+/, response.body.data.siteFullUrl);\n }\n\n if (options.resource === 'preJoin' && options.service === 'webex-appapi-service') {\n options.headers.authorization = false;\n }\n\n this.webex.logger.warn('redirect: url redirects needed to', options.uri);\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxLocusRedirects) {\n return Promise.reject(new Error('Maximum redirects exceeded'));\n }\n\n return this.webex.request(options);\n }\n /* eslint-enable no-else-return */\n\n return response;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA6C,SAAAE,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAI,0BAAA,cAAAN,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAN,kBAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAM,yBAAA,YAAAA,0BAAA,aAAAN,CAAA,UAP7C,0CAEA;AACA;AACA;AAKA,IAAMc,iBAAiB,GAAG,wBAAwB;AAClD,IAAMC,kBAAkB,GAAG,gBAAgB;AAC3C,IAAMC,oBAAoB,G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ACC,GAAG,GAAGD,OAAO,CAACC,GAAG,CAAC+B,OAAO,CAAC,sBAAsB,EAAEnB,QAAQ,CAACO,IAAI,CAACU,IAAI,CAACC,WAAW,CAAC;QAC3F;QAEA,IAAI/B,OAAO,CAACiC,QAAQ,KAAK,SAAS,IAAIjC,OAAO,CAACkC,OAAO,KAAK,sBAAsB,EAAE;UAChFlC,OAAO,CAACS,OAAO,CAAC0B,aAAa,GAAG,KAAK;QACvC;QAEA,IAAI,CAAChC,KAAK,CAACoB,MAAM,CAACC,IAAI,CAAC,mCAAmC,EAAExB,OAAO,CAACC,GAAG,CAAC;QACxED,OAAO,CAACW,cAAc,IAAI,CAAC;QAC3B,IAAIX,OAAO,CAACW,cAAc,GAAG,IAAI,CAACR,KAAK,CAACC,MAAM,CAACwB,iBAAiB,EAAE;UAChE,OAAOZ,QAAA,CAAAxC,OAAA,CAAQyC,MAAM,CAAC,IAAIC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChE;QAEA,OAAO,IAAI,CAACf,KAAK,CAACgB,OAAO,CAACnB,OAAO,CAAC;MACpC;MACA;;MAEA,OAAOa,QAAQ;IACjB;EAAC;IAAAhB,GAAA;IAAAC,KAAA;IAtHD;AACF;AACA;IACE,SAAOsC,MAAMA,CAAA,EAAG;MACd,OAAO,IAAI9C,mBAAmB,CAAC;QAACa,KAAK,EAAE;MAAI,CAAC,CAAC;IAC/C;EAAC;AAAA,EAN8CkC,qBAAW","ignoreList":[]}
1
+ {"version":3,"names":["_lodash","require","_httpCore","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","requestHeaderName","responseHeaderName","LOCUS_REDIRECT_ERROR","APPAPI_REDIRECT_ERROR","RedirectInterceptor","exports","_Interceptor","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","onRequest","options","uri","includes","webex","config","credentials","samlUrl","tokenUrl","authorizeUrl","headers","_deleteProperty","$redirectCount","onResponse","response","clone","maxAppLevelRedirects","_promise","reject","Error","request","body","errorCode","location","logger","warn","qs","newUrl","split","maxLocusRedirects","code","data","siteFullUrl","replace","concat","resource","service","authorization","create","Interceptor"],"sources":["redirect.js"],"sourcesContent":["/* eslint-disable prefer-destructuring */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {clone} from 'lodash';\nimport {Interceptor} from '@webex/http-core';\n\nconst requestHeaderName = 'cisco-no-http-redirect';\nconst responseHeaderName = 'cisco-location';\nconst LOCUS_REDIRECT_ERROR = 2000002;\nconst APPAPI_REDIRECT_ERROR = 404100;\n\n/**\n * @class\n */\nexport default class RedirectInterceptor extends Interceptor {\n /**\n * @returns {RedirectInterceptor}\n */\n static create() {\n return new RedirectInterceptor({webex: this});\n }\n\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n onRequest(options) {\n if (options && options.uri && typeof options.uri === 'string') {\n if (\n options.uri.includes('https://idbroker') ||\n options.uri.includes(this.webex.config.credentials.samlUrl) ||\n options.uri.includes(this.webex.config.credentials.tokenUrl) ||\n options.uri.includes(this.webex.config.credentials.authorizeUrl)\n ) {\n return options;\n }\n }\n\n // If cisco-no-http-redirect is already set, don't overwrite it\n if (requestHeaderName in options.headers) {\n // If cisco-no-http-redirect is set to null, false, or undefined, delete\n // it to prevent a CORS preflight.\n if (!options.headers[requestHeaderName]) {\n Reflect.deleteProperty(options.headers, requestHeaderName);\n }\n\n return options;\n }\n options.headers[requestHeaderName] = true;\n options.$redirectCount = options.$redirectCount || 0;\n\n return options;\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n onResponse(options, response) {\n /* eslint-disable no-else-return */\n if (response.headers && response.headers[responseHeaderName]) {\n options = clone(options);\n options.uri = response.headers[responseHeaderName];\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxAppLevelRedirects) {\n return Promise.reject(new Error('Maximum redirects exceeded'));\n }\n\n return this.webex.request(options);\n } else if (\n response.headers &&\n response.body &&\n response.body.errorCode === LOCUS_REDIRECT_ERROR &&\n response.body.location\n ) {\n options = clone(options);\n\n this.webex.logger.warn('redirect: url redirects needed from', options.uri);\n if (response.options && response.options.qs) {\n // for POST requests\n const newUrl = response.body.location.split('?');\n\n options.uri = newUrl[0]; // params are already present in the qs\n } else {\n // for GET requests\n options.uri = response.body.location;\n }\n\n this.webex.logger.warn('redirect: url redirects needed to', options.uri);\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxLocusRedirects) {\n return Promise.reject(new Error('Maximum redirects exceeded'));\n }\n\n return this.webex.request(options);\n } else if (\n response.headers &&\n response.body &&\n response.body.code === APPAPI_REDIRECT_ERROR &&\n response.body.data &&\n response.body.data.siteFullUrl\n ) {\n options = clone(options);\n\n this.webex.logger.warn('redirect: url redirects needed from', options.uri);\n if (response.options && response.options.qs) {\n // for POST requests\n const newUrl = response.body.data.siteFullUrl.split('?');\n\n options.uri = newUrl[0]; // params are already present in the qs\n } else {\n // for GET requests\n options.uri = options.uri.replace(\n /(https:\\/\\/)[^/]+/,\n `$1${response.body.data.siteFullUrl}`\n );\n }\n\n if (options.resource === 'preJoin' && options.service === 'webex-appapi-service') {\n options.headers.authorization = false;\n }\n\n this.webex.logger.warn('redirect: url redirects needed to', options.uri);\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxLocusRedirects) {\n return Promise.reject(new Error('Maximum redirects exceeded'));\n }\n\n return this.webex.request(options);\n }\n /* eslint-enable no-else-return */\n\n return response;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA6C,SAAAE,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAA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AACF;AACA;IACE,SAAOuC,MAAMA,CAAA,EAAG;MACd,OAAO,IAAI/C,mBAAmB,CAAC;QAACa,KAAK,EAAE;MAAI,CAAC,CAAC;IAC/C;EAAC;AAAA,EAN8CmC,qBAAW","ignoreList":[]}
@@ -286,7 +286,7 @@ var Batcher = _webexPlugin.default.extend({
286
286
  fingerprintResponse: function fingerprintResponse(item) {
287
287
  throw new Error('fingerprintResponse() must be implemented');
288
288
  },
289
- version: "3.11.0-next.6"
289
+ version: "3.11.0-next.7"
290
290
  });
291
291
  var _default2 = exports.default = Batcher;
292
292
  //# sourceMappingURL=batcher.js.map
@@ -556,7 +556,7 @@ var Credentials = _webexPlugin.default.extend((_dec = (0, _common.oneFlight)({
556
556
  this.refresh();
557
557
  }
558
558
  },
559
- version: "3.11.0-next.6"
559
+ version: "3.11.0-next.7"
560
560
  }, (0, _applyDecoratedDescriptor2.default)(_obj, "getUserToken", [_dec, _dec2], (0, _getOwnPropertyDescriptor.default)(_obj, "getUserToken"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "initialize", [_dec3], (0, _getOwnPropertyDescriptor.default)(_obj, "initialize"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "invalidate", [_common.oneFlight, _dec4], (0, _getOwnPropertyDescriptor.default)(_obj, "invalidate"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "refresh", [_common.oneFlight, _dec5, _dec6], (0, _getOwnPropertyDescriptor.default)(_obj, "refresh"), _obj), _obj));
561
561
  var _default = exports.default = Credentials;
562
562
  //# sourceMappingURL=credentials.js.map
@@ -532,7 +532,7 @@ var Token = _webexPlugin.default.extend((_dec = (0, _common.oneFlight)({
532
532
  return res.body;
533
533
  });
534
534
  },
535
- version: "3.11.0-next.6"
535
+ version: "3.11.0-next.7"
536
536
  }, (0, _applyDecoratedDescriptor2.default)(_obj, "downscope", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, "downscope"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "refresh", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, "refresh"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "revoke", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, "revoke"), _obj), _obj));
537
537
  var _default = exports.default = Token;
538
538
  //# sourceMappingURL=token.js.map
@@ -1443,7 +1443,7 @@ var Services = _webexPlugin.default.extend({
1443
1443
  }, _callee4);
1444
1444
  })));
1445
1445
  },
1446
- version: "3.11.0-next.6"
1446
+ version: "3.11.0-next.7"
1447
1447
  });
1448
1448
  /* eslint-enable no-underscore-dangle */
1449
1449
  var _default = exports.default = Services;
@@ -1373,7 +1373,7 @@ var Services = _webexPlugin.default.extend({
1373
1373
  }, _callee3);
1374
1374
  })));
1375
1375
  },
1376
- version: "3.11.0-next.6"
1376
+ version: "3.11.0-next.7"
1377
1377
  });
1378
1378
  /* eslint-enable no-underscore-dangle */
1379
1379
  var _default = exports.default = Services;
@@ -57,7 +57,7 @@ var Logger = _webexPlugin.default.extend({
57
57
  info: wrapConsoleMethod('info'),
58
58
  debug: wrapConsoleMethod('debug'),
59
59
  trace: wrapConsoleMethod('trace'),
60
- version: "3.11.0-next.6"
60
+ version: "3.11.0-next.7"
61
61
  });
62
62
  (0, _webexCore.registerPlugin)('logger', Logger);
63
63
  var _default = exports.default = Logger;
@@ -96,7 +96,7 @@ var MAX_FILE_SIZE_IN_MB = 2048;
96
96
  * @class
97
97
  */
98
98
  var WebexCore = _ampersandState.default.extend((_obj = {
99
- version: "3.11.0-next.6",
99
+ version: "3.11.0-next.7",
100
100
  children: {
101
101
  internal: _webexInternalCore.default
102
102
  },
@@ -634,7 +634,7 @@ var WebexCore = _ampersandState.default.extend((_obj = {
634
634
  });
635
635
  }
636
636
  }, (0, _applyDecoratedDescriptor2.default)(_obj, "_uploadPhaseUpload", [_common.retry], (0, _getOwnPropertyDescriptor.default)(_obj, "_uploadPhaseUpload"), _obj), _obj));
637
- WebexCore.version = "3.11.0-next.6";
637
+ WebexCore.version = "3.11.0-next.7";
638
638
  (0, _webexInternalCorePluginMixin.default)(_webexInternalCore.default, _config.default, interceptors);
639
639
  (0, _webexCorePluginMixin.default)(WebexCore, _config.default, interceptors);
640
640
  var _default = exports.default = WebexCore;
package/package.json CHANGED
@@ -33,10 +33,10 @@
33
33
  "@sinonjs/fake-timers": "^6.0.1",
34
34
  "@webex/babel-config-legacy": "0.0.0",
35
35
  "@webex/eslint-config-legacy": "0.0.0",
36
- "@webex/internal-plugin-device": "3.11.0-next.6",
36
+ "@webex/internal-plugin-device": "3.11.0-next.7",
37
37
  "@webex/jest-config-legacy": "0.0.0",
38
38
  "@webex/legacy-tools": "0.0.0",
39
- "@webex/plugin-logger": "3.11.0-next.6",
39
+ "@webex/plugin-logger": "3.11.0-next.7",
40
40
  "@webex/test-helper-chai": "3.11.0-next.1",
41
41
  "@webex/test-helper-make-local-url": "3.11.0-next.1",
42
42
  "@webex/test-helper-mocha": "3.11.0-next.1",
@@ -73,5 +73,5 @@
73
73
  "test:style": "eslint ./src/**/*.*",
74
74
  "test:unit": "webex-legacy-tools test --unit --runner jest"
75
75
  },
76
- "version": "3.11.0-next.6"
76
+ "version": "3.11.0-next.7"
77
77
  }
@@ -116,7 +116,10 @@ export default class RedirectInterceptor extends Interceptor {
116
116
  options.uri = newUrl[0]; // params are already present in the qs
117
117
  } else {
118
118
  // for GET requests
119
- options.uri = options.uri.replace(/(?<=https:\/\/)[^/]+/, response.body.data.siteFullUrl);
119
+ options.uri = options.uri.replace(
120
+ /(https:\/\/)[^/]+/,
121
+ `$1${response.body.data.siteFullUrl}`
122
+ );
120
123
  }
121
124
 
122
125
  if (options.resource === 'preJoin' && options.service === 'webex-appapi-service') {