@webex/webex-core 3.12.0 → 3.13.0-next.2
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/.repo-context.json +653 -0
- package/.sdd/manifest.json +605 -0
- package/AGENTS.md +209 -0
- package/README.md +5 -2
- package/dist/config.js +45 -0
- package/dist/config.js.map +1 -1
- package/dist/credentials-config.js +12 -0
- package/dist/credentials-config.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/catalog-url.js +87 -0
- package/dist/interceptors/catalog-url.js.map +1 -0
- package/dist/interceptors/payload-transformer.js +25 -4
- package/dist/interceptors/payload-transformer.js.map +1 -1
- package/dist/lib/batcher.js +23 -7
- package/dist/lib/batcher.js.map +1 -1
- package/dist/lib/credentials/credentials.js +103 -4
- package/dist/lib/credentials/credentials.js.map +1 -1
- package/dist/lib/credentials/token.js +1 -1
- package/dist/lib/domains.js +90 -0
- package/dist/lib/domains.js.map +1 -0
- package/dist/lib/services/service-catalog.js +108 -18
- package/dist/lib/services/service-catalog.js.map +1 -1
- package/dist/lib/services/services.js +242 -38
- package/dist/lib/services/services.js.map +1 -1
- package/dist/lib/services-v2/service-catalog.js +14 -13
- package/dist/lib/services-v2/service-catalog.js.map +1 -1
- package/dist/lib/services-v2/services-v2.js +255 -42
- package/dist/lib/services-v2/services-v2.js.map +1 -1
- package/dist/lib/static-asset-loader.js +153 -0
- package/dist/lib/static-asset-loader.js.map +1 -0
- package/dist/plugins/logger.js +1 -1
- package/dist/webex-core.js +11 -3
- package/dist/webex-core.js.map +1 -1
- package/docs/adr/index.md +32 -0
- package/docs/architecture.md +298 -0
- package/docs/getting-started.md +96 -0
- package/docs/index.md +55 -0
- package/docs/specs/README.md +76 -0
- package/package.json +13 -13
- package/schemas/repo-context.schema.json +796 -0
- package/src/config.js +49 -0
- package/src/credentials-config.js +13 -0
- package/src/docs/README.md +732 -0
- package/src/index.js +2 -0
- package/src/interceptors/catalog-url.js +66 -0
- package/src/interceptors/docs/README.md +658 -0
- package/src/interceptors/payload-transformer.js +23 -1
- package/src/lib/batcher.js +25 -10
- package/src/lib/credentials/credentials.js +93 -3
- package/src/lib/credentials/docs/README.md +846 -0
- package/src/lib/domains.ts +94 -0
- package/src/lib/services/docs/README.md +737 -0
- package/src/lib/services/service-catalog.js +112 -16
- package/src/lib/services/services.js +220 -22
- package/src/lib/services-v2/docs/README.md +751 -0
- package/src/lib/services-v2/service-catalog.ts +16 -12
- package/src/lib/services-v2/services-v2.ts +234 -24
- package/src/lib/static-asset-loader.ts +128 -0
- package/src/lib/storage/docs/README.md +646 -0
- package/src/webex-core.js +8 -0
- package/test/fixtures/activation-email.ts +22 -0
- package/test/integration/spec/services/services.js +183 -112
- package/test/integration/spec/services-v2/services-v2.js +169 -98
- package/test/unit/spec/credentials/credentials.js +247 -3
- package/test/unit/spec/interceptors/auth.js +56 -0
- package/test/unit/spec/interceptors/catalog-url.js +224 -0
- package/test/unit/spec/interceptors/payload-transformer.js +119 -1
- package/test/unit/spec/lib/batcher.js +56 -0
- package/test/unit/spec/services/service-catalog.js +368 -11
- package/test/unit/spec/services/services.js +466 -2
- package/test/unit/spec/services-v2/service-catalog.ts +134 -11
- package/test/unit/spec/services-v2/services-v2.ts +588 -0
- package/test/unit/spec/static-asset-loader.ts +224 -0
- package/test/unit/spec/webex-core.js +77 -1
package/src/config.js
CHANGED
|
@@ -17,6 +17,13 @@ export default {
|
|
|
17
17
|
trackingIdSuffix: '',
|
|
18
18
|
AlternateLogger: undefined,
|
|
19
19
|
credentials: new CredentialsConfig(),
|
|
20
|
+
/**
|
|
21
|
+
* Explicitly selects the Webex environment. When omitted, the environment is inferred from the
|
|
22
|
+
* U2C discovery URL.
|
|
23
|
+
*
|
|
24
|
+
* @type {'integration'|'production'|undefined}
|
|
25
|
+
*/
|
|
26
|
+
environment: undefined,
|
|
20
27
|
fedramp: process.env.ENABLE_FEDRAMP || false,
|
|
21
28
|
services: {
|
|
22
29
|
/**
|
|
@@ -27,6 +34,33 @@ export default {
|
|
|
27
34
|
*/
|
|
28
35
|
useUserOnboardingServiceForActivations: false,
|
|
29
36
|
|
|
37
|
+
/**
|
|
38
|
+
* When true, requests the U2C catalog override.
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
useCatalogOverride: false,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* When true, skips fetching the preauth catalog during initialization
|
|
46
|
+
* while the user is unauthenticated (no existing token). The catalog is
|
|
47
|
+
* expected to be collected manually later instead. When false (default),
|
|
48
|
+
* the preauth catalog is collected automatically during init.
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
*/
|
|
52
|
+
skipPreauthCatalogOnUnauthenticated: false,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Maximum time (in milliseconds) to wait for the initial service catalog
|
|
56
|
+
* collection when `waitForCatalogInit` is enabled, before letting
|
|
57
|
+
* `services.ready` (and therefore `webex.ready`) fire anyway. Prevents a
|
|
58
|
+
* hung catalog request from leaving the app on a permanent spinner.
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
*/
|
|
62
|
+
catalogInitTimeout: 15000,
|
|
63
|
+
|
|
30
64
|
/**
|
|
31
65
|
* A list of services that are available prior to catalog collection.
|
|
32
66
|
*
|
|
@@ -60,6 +94,16 @@ export default {
|
|
|
60
94
|
*/
|
|
61
95
|
validateDomains: true,
|
|
62
96
|
|
|
97
|
+
/**
|
|
98
|
+
* When true, enables the CatalogUrlInterceptor which validates that all
|
|
99
|
+
* outbound request URLs are in the service catalog or allowed domains.
|
|
100
|
+
* This prevents SSRF attacks where attacker-controlled URLs could be
|
|
101
|
+
* sent to the SDK.
|
|
102
|
+
*
|
|
103
|
+
* @type {boolean}
|
|
104
|
+
*/
|
|
105
|
+
validateCatalogUrls: false,
|
|
106
|
+
|
|
63
107
|
/**
|
|
64
108
|
* services that don't need auth validation
|
|
65
109
|
*/
|
|
@@ -91,6 +135,11 @@ export default {
|
|
|
91
135
|
cacheU2C: false,
|
|
92
136
|
},
|
|
93
137
|
payloadTransformer: {
|
|
138
|
+
/**
|
|
139
|
+
* When true, inbound payload transforms run at most once for the same successful response object.
|
|
140
|
+
* This supports request flows that pass a response through more than one interceptor pipeline.
|
|
141
|
+
*/
|
|
142
|
+
skipRepeatedInboundTransforms: false,
|
|
94
143
|
predicates: [],
|
|
95
144
|
transforms: [],
|
|
96
145
|
},
|
|
@@ -195,6 +195,19 @@ const CredentialsConfig = AmpState.extend({
|
|
|
195
195
|
cache: false,
|
|
196
196
|
},
|
|
197
197
|
|
|
198
|
+
/**
|
|
199
|
+
* URL used to initiate the IdBroker third-party (social provider)
|
|
200
|
+
* sign-in flow.
|
|
201
|
+
* @type {string}
|
|
202
|
+
*/
|
|
203
|
+
thirdPartyLoginUrl: {
|
|
204
|
+
deps: ['idbroker.url'],
|
|
205
|
+
fn() {
|
|
206
|
+
return `${this.idbroker.url}/idb/ThirdPartyLogin`;
|
|
207
|
+
},
|
|
208
|
+
cache: false,
|
|
209
|
+
},
|
|
210
|
+
|
|
198
211
|
/**
|
|
199
212
|
* Set password URL
|
|
200
213
|
* @type {string}
|