@webex/webex-core 3.10.0-webex-services-ready.2 → 3.10.0-webex-services-ready.4
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.
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -1
- package/dist/lib/batcher.js +1 -1
- package/dist/lib/credentials/credentials.js +1 -1
- package/dist/lib/credentials/token.js +1 -1
- package/dist/lib/services/services.js +415 -97
- package/dist/lib/services/services.js.map +1 -1
- package/dist/lib/services-v2/services-v2.js +329 -46
- package/dist/lib/services-v2/services-v2.js.map +1 -1
- package/dist/lib/services-v2/types.js.map +1 -1
- package/dist/plugins/logger.js +1 -1
- package/dist/webex-core.js +2 -2
- package/package.json +13 -13
- package/src/config.js +7 -0
- package/src/lib/services/services.js +285 -5
- package/src/lib/services-v2/services-v2.ts +250 -4
- package/src/lib/services-v2/types.ts +5 -0
- package/test/integration/spec/services/service-catalog.js +6 -7
- package/test/integration/spec/services/services.js +15 -3
- package/test/integration/spec/services-v2/services-v2.js +15 -3
- package/test/unit/spec/services/services.js +341 -12
- package/test/unit/spec/services-v2/services-v2.ts +198 -0
- package/test/unit/spec/webex-core.js +2 -0
- package/test/unit/spec/webex-internal-core.js +2 -0
package/dist/config.js
CHANGED
|
@@ -82,6 +82,13 @@ var _default = exports.default = {
|
|
|
82
82
|
metrics: {
|
|
83
83
|
type: ['behavioral', 'operational']
|
|
84
84
|
},
|
|
85
|
+
calling: {
|
|
86
|
+
/**
|
|
87
|
+
* Controls whether U2C service catalogs should be cached and warmed from cache.
|
|
88
|
+
* When false, the services layer will skip reading and writing the U2C cache.
|
|
89
|
+
*/
|
|
90
|
+
cacheU2C: false
|
|
91
|
+
},
|
|
85
92
|
payloadTransformer: {
|
|
86
93
|
predicates: [],
|
|
87
94
|
transforms: []
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_storage","require","_credentialsConfig","_interopRequireDefault","_default","exports","default","maxAppLevelRedirects","maxLocusRedirects","maxAuthenticationReplays","maxReconnectAttempts","onBeforeLogout","trackingIdPrefix","trackingIdSuffix","AlternateLogger","undefined","credentials","CredentialsConfig","fedramp","process","env","ENABLE_FEDRAMP","services","useUserOnboardingServiceForActivations","discovery","hydra","HYDRA_SERVICE_URL","sqdiscovery","SQDISCOVERY_SERVICE_URL","u2c","U2C_SERVICE_URL","validateDomains","servicesNotNeedValidation","allowedDomains","device","preDiscoveryServices","hydraServiceUrl","metrics","type","payloadTransformer","predicates","transforms","storage","boundedAdapter","MemoryStoreAdapter","unboundedAdapter"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint camelcase: [0] */\n\nimport {MemoryStoreAdapter} from './lib/storage';\nimport CredentialsConfig from './credentials-config';\n\nexport default {\n maxAppLevelRedirects: 10,\n maxLocusRedirects: 5,\n maxAuthenticationReplays: 1,\n maxReconnectAttempts: 1,\n onBeforeLogout: [],\n trackingIdPrefix: 'webex-js-sdk',\n trackingIdSuffix: '',\n AlternateLogger: undefined,\n credentials: new CredentialsConfig(),\n fedramp: process.env.ENABLE_FEDRAMP || false,\n services: {\n /**\n * When true, uses the user-onboarding service for user activation.\n * When false (default), uses the license service.\n *\n * @type {boolean}\n */\n useUserOnboardingServiceForActivations: false,\n\n /**\n * A list of services that are available prior to catalog collection.\n *\n * @type {Object}\n */\n discovery: {\n /**\n * The hydra discovery url.\n *\n * @type {string}\n */\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n\n /**\n * load balanced region info url\n */\n sqdiscovery: process.env.SQDISCOVERY_SERVICE_URL || 'https://ds.ciscospark.com/v1/region',\n\n /**\n * The u2c discovery url\n *\n * @type {string}\n */\n u2c: process.env.U2C_SERVICE_URL || 'https://u2c.wbx2.com/u2c/api/v1',\n },\n\n /**\n * When true, considers all urls in `allowedDomains` as safe for auth tokens\n *\n * @type {boolean}\n */\n validateDomains: true,\n\n /**\n * services that don't need auth validation\n */\n\n servicesNotNeedValidation: ['webex-appapi-service'],\n\n /**\n * Contains a list of allowed domain host addresses.\n *\n * @type {Array<string>}\n */\n allowedDomains: [],\n },\n device: {\n preDiscoveryServices: {\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n },\n validateDomains: true,\n },\n metrics: {\n type: ['behavioral', 'operational'],\n },\n payloadTransformer: {\n predicates: [],\n transforms: [],\n },\n storage: {\n boundedAdapter: MemoryStoreAdapter,\n unboundedAdapter: MemoryStoreAdapter,\n },\n};\n"],"mappings":";;;;;;;;AAMA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAPA;AACA;AACA;AAEA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKe;EACbC,oBAAoB,EAAE,EAAE;EACxBC,iBAAiB,EAAE,CAAC;EACpBC,wBAAwB,EAAE,CAAC;EAC3BC,oBAAoB,EAAE,CAAC;EACvBC,cAAc,EAAE,EAAE;EAClBC,gBAAgB,EAAE,cAAc;EAChCC,gBAAgB,EAAE,EAAE;EACpBC,eAAe,EAAEC,SAAS;EAC1BC,WAAW,EAAE,IAAIC,0BAAiB,CAAC,CAAC;EACpCC,OAAO,EAAEC,OAAO,CAACC,GAAG,CAACC,cAAc,IAAI,KAAK;EAC5CC,QAAQ,EAAE;IACR;AACJ;AACA;AACA;AACA;AACA;IACIC,sCAAsC,EAAE,KAAK;IAE7C;AACJ;AACA;AACA;AACA;IACIC,SAAS,EAAE;MACT;AACN;AACA;AACA;AACA;MACMC,KAAK,EAAEN,OAAO,CAACC,GAAG,CAACM,iBAAiB,IAAI,+BAA+B;MAEvE;AACN;AACA;MACMC,WAAW,EAAER,OAAO,CAACC,GAAG,CAACQ,uBAAuB,IAAI,qCAAqC;MAEzF;AACN;AACA;AACA;AACA;MACMC,GAAG,EAAEV,OAAO,CAACC,GAAG,CAACU,eAAe,IAAI;IACtC,CAAC;IAED;AACJ;AACA;AACA;AACA;IACIC,eAAe,EAAE,IAAI;IAErB;AACJ;AACA;;IAEIC,yBAAyB,EAAE,CAAC,sBAAsB,CAAC;IAEnD;AACJ;AACA;AACA;AACA;IACIC,cAAc,EAAE;EAClB,CAAC;EACDC,MAAM,EAAE;IACNC,oBAAoB,EAAE;MACpBV,KAAK,EAAEN,OAAO,CAACC,GAAG,CAACM,iBAAiB,IAAI,+BAA+B;MACvEU,eAAe,EAAEjB,OAAO,CAACC,GAAG,CAACM,iBAAiB,IAAI;IACpD,CAAC;IACDK,eAAe,EAAE;EACnB,CAAC;EACDM,OAAO,EAAE;IACPC,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa;EACpC,CAAC;EACDC,kBAAkB,EAAE;IAClBC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE;EACd,CAAC;EACDC,OAAO,EAAE;IACPC,cAAc,EAAEC,2BAAkB;IAClCC,gBAAgB,EAAED;EACpB;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_storage","require","_credentialsConfig","_interopRequireDefault","_default","exports","default","maxAppLevelRedirects","maxLocusRedirects","maxAuthenticationReplays","maxReconnectAttempts","onBeforeLogout","trackingIdPrefix","trackingIdSuffix","AlternateLogger","undefined","credentials","CredentialsConfig","fedramp","process","env","ENABLE_FEDRAMP","services","useUserOnboardingServiceForActivations","discovery","hydra","HYDRA_SERVICE_URL","sqdiscovery","SQDISCOVERY_SERVICE_URL","u2c","U2C_SERVICE_URL","validateDomains","servicesNotNeedValidation","allowedDomains","device","preDiscoveryServices","hydraServiceUrl","metrics","type","calling","cacheU2C","payloadTransformer","predicates","transforms","storage","boundedAdapter","MemoryStoreAdapter","unboundedAdapter"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint camelcase: [0] */\n\nimport {MemoryStoreAdapter} from './lib/storage';\nimport CredentialsConfig from './credentials-config';\n\nexport default {\n maxAppLevelRedirects: 10,\n maxLocusRedirects: 5,\n maxAuthenticationReplays: 1,\n maxReconnectAttempts: 1,\n onBeforeLogout: [],\n trackingIdPrefix: 'webex-js-sdk',\n trackingIdSuffix: '',\n AlternateLogger: undefined,\n credentials: new CredentialsConfig(),\n fedramp: process.env.ENABLE_FEDRAMP || false,\n services: {\n /**\n * When true, uses the user-onboarding service for user activation.\n * When false (default), uses the license service.\n *\n * @type {boolean}\n */\n useUserOnboardingServiceForActivations: false,\n\n /**\n * A list of services that are available prior to catalog collection.\n *\n * @type {Object}\n */\n discovery: {\n /**\n * The hydra discovery url.\n *\n * @type {string}\n */\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n\n /**\n * load balanced region info url\n */\n sqdiscovery: process.env.SQDISCOVERY_SERVICE_URL || 'https://ds.ciscospark.com/v1/region',\n\n /**\n * The u2c discovery url\n *\n * @type {string}\n */\n u2c: process.env.U2C_SERVICE_URL || 'https://u2c.wbx2.com/u2c/api/v1',\n },\n\n /**\n * When true, considers all urls in `allowedDomains` as safe for auth tokens\n *\n * @type {boolean}\n */\n validateDomains: true,\n\n /**\n * services that don't need auth validation\n */\n\n servicesNotNeedValidation: ['webex-appapi-service'],\n\n /**\n * Contains a list of allowed domain host addresses.\n *\n * @type {Array<string>}\n */\n allowedDomains: [],\n },\n device: {\n preDiscoveryServices: {\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n },\n validateDomains: true,\n },\n metrics: {\n type: ['behavioral', 'operational'],\n },\n calling: {\n /**\n * Controls whether U2C service catalogs should be cached and warmed from cache.\n * When false, the services layer will skip reading and writing the U2C cache.\n */\n cacheU2C: false,\n },\n payloadTransformer: {\n predicates: [],\n transforms: [],\n },\n storage: {\n boundedAdapter: MemoryStoreAdapter,\n unboundedAdapter: MemoryStoreAdapter,\n },\n};\n"],"mappings":";;;;;;;;AAMA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAPA;AACA;AACA;AAEA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKe;EACbC,oBAAoB,EAAE,EAAE;EACxBC,iBAAiB,EAAE,CAAC;EACpBC,wBAAwB,EAAE,CAAC;EAC3BC,oBAAoB,EAAE,CAAC;EACvBC,cAAc,EAAE,EAAE;EAClBC,gBAAgB,EAAE,cAAc;EAChCC,gBAAgB,EAAE,EAAE;EACpBC,eAAe,EAAEC,SAAS;EAC1BC,WAAW,EAAE,IAAIC,0BAAiB,CAAC,CAAC;EACpCC,OAAO,EAAEC,OAAO,CAACC,GAAG,CAACC,cAAc,IAAI,KAAK;EAC5CC,QAAQ,EAAE;IACR;AACJ;AACA;AACA;AACA;AACA;IACIC,sCAAsC,EAAE,KAAK;IAE7C;AACJ;AACA;AACA;AACA;IACIC,SAAS,EAAE;MACT;AACN;AACA;AACA;AACA;MACMC,KAAK,EAAEN,OAAO,CAACC,GAAG,CAACM,iBAAiB,IAAI,+BAA+B;MAEvE;AACN;AACA;MACMC,WAAW,EAAER,OAAO,CAACC,GAAG,CAACQ,uBAAuB,IAAI,qCAAqC;MAEzF;AACN;AACA;AACA;AACA;MACMC,GAAG,EAAEV,OAAO,CAACC,GAAG,CAACU,eAAe,IAAI;IACtC,CAAC;IAED;AACJ;AACA;AACA;AACA;IACIC,eAAe,EAAE,IAAI;IAErB;AACJ;AACA;;IAEIC,yBAAyB,EAAE,CAAC,sBAAsB,CAAC;IAEnD;AACJ;AACA;AACA;AACA;IACIC,cAAc,EAAE;EAClB,CAAC;EACDC,MAAM,EAAE;IACNC,oBAAoB,EAAE;MACpBV,KAAK,EAAEN,OAAO,CAACC,GAAG,CAACM,iBAAiB,IAAI,+BAA+B;MACvEU,eAAe,EAAEjB,OAAO,CAACC,GAAG,CAACM,iBAAiB,IAAI;IACpD,CAAC;IACDK,eAAe,EAAE;EACnB,CAAC;EACDM,OAAO,EAAE;IACPC,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa;EACpC,CAAC;EACDC,OAAO,EAAE;IACP;AACJ;AACA;AACA;IACIC,QAAQ,EAAE;EACZ,CAAC;EACDC,kBAAkB,EAAE;IAClBC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE;EACd,CAAC;EACDC,OAAO,EAAE;IACPC,cAAc,EAAEC,2BAAkB;IAClCC,gBAAgB,EAAED;EACpB;AACF,CAAC","ignoreList":[]}
|
package/dist/lib/batcher.js
CHANGED
|
@@ -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.10.0-webex-services-ready.
|
|
289
|
+
version: "3.10.0-webex-services-ready.4"
|
|
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.10.0-webex-services-ready.
|
|
559
|
+
version: "3.10.0-webex-services-ready.4"
|
|
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.10.0-webex-services-ready.
|
|
535
|
+
version: "3.10.0-webex-services-ready.4"
|
|
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
|