@sitecore-content-sdk/core 1.3.0-canary.9 → 1.4.0-canary.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/README.md +7 -7
- package/dist/cjs/cache-client.js +55 -54
- package/dist/cjs/client/constants.js +7 -7
- package/dist/cjs/client/edge-proxy.js +24 -22
- package/dist/cjs/client/index.js +15 -15
- package/dist/cjs/client/models.js +2 -2
- package/dist/cjs/client/sitecore-client.js +421 -419
- package/dist/cjs/client/utils.js +47 -46
- package/dist/cjs/config/define-config.js +194 -193
- package/dist/cjs/config/index.js +7 -7
- package/dist/cjs/config/models.js +12 -11
- package/dist/cjs/config-cli/define-cli-config.js +23 -22
- package/dist/cjs/config-cli/index.js +7 -7
- package/dist/cjs/config-cli/models.js +8 -7
- package/dist/cjs/constants.js +49 -17
- package/dist/cjs/debug.js +48 -46
- package/dist/cjs/editing/codegen/index.js +14 -9
- package/dist/cjs/editing/codegen/preview.js +277 -193
- package/dist/cjs/editing/component-layout-service.js +62 -61
- package/dist/cjs/editing/design-library.js +183 -126
- package/dist/cjs/editing/editing-service.js +75 -74
- package/dist/cjs/editing/index.js +33 -27
- package/dist/cjs/editing/metadata.js +42 -42
- package/dist/cjs/editing/models.js +44 -38
- package/dist/cjs/editing/utils.js +108 -90
- package/dist/cjs/form/form.js +81 -78
- package/dist/cjs/form/index.js +7 -7
- package/dist/cjs/graphql-request-client.js +108 -107
- package/dist/cjs/i18n/dictionary-service.js +122 -121
- package/dist/cjs/i18n/index.js +7 -7
- package/dist/cjs/i18n/utils.js +16 -15
- package/dist/cjs/index.js +60 -60
- package/dist/cjs/layout/content-styles.js +72 -71
- package/dist/cjs/layout/index.js +24 -24
- package/dist/cjs/layout/layout-service.js +62 -57
- package/dist/cjs/layout/models.js +39 -34
- package/dist/cjs/layout/themes.js +76 -75
- package/dist/cjs/layout/utils.js +117 -110
- package/dist/cjs/media/index.js +38 -38
- package/dist/cjs/media/media-api.js +100 -96
- package/dist/cjs/models.js +2 -2
- package/dist/cjs/native-fetcher.js +194 -179
- package/dist/cjs/personalize/index.js +15 -15
- package/dist/cjs/personalize/layout-personalizer.js +98 -97
- package/dist/cjs/personalize/personalize-service.js +98 -94
- package/dist/cjs/personalize/utils.js +143 -136
- package/dist/cjs/retries.js +43 -42
- package/dist/cjs/site/error-pages-service.js +65 -64
- package/dist/cjs/site/index.js +26 -26
- package/dist/cjs/site/models.js +2 -2
- package/dist/cjs/site/redirects-service.js +94 -81
- package/dist/cjs/site/robots-service.js +66 -65
- package/dist/cjs/site/site-resolver.js +73 -72
- package/dist/cjs/site/siteinfo-service.js +84 -80
- package/dist/cjs/site/sitemap-xml-service.js +84 -83
- package/dist/cjs/site/sitepath-service.js +165 -164
- package/dist/cjs/site/utils.js +55 -47
- package/dist/cjs/sitecore-service-base.js +36 -36
- package/dist/cjs/tools/auth/flow.js +65 -64
- package/dist/cjs/tools/auth/index.js +5 -5
- package/dist/cjs/tools/auth/models.js +2 -2
- package/dist/cjs/tools/auth/tenant-store.js +38 -38
- package/dist/cjs/tools/codegen/component-generation.js +52 -50
- package/dist/cjs/tools/codegen/extract-files.js +105 -107
- package/dist/cjs/tools/codegen/import-map.js +401 -349
- package/dist/cjs/tools/codegen/utils.js +418 -418
- package/dist/cjs/tools/generate-map.js +2 -2
- package/dist/cjs/tools/generateMetadata.js +36 -35
- package/dist/cjs/tools/generateSites.js +59 -58
- package/dist/cjs/tools/index.js +75 -73
- package/dist/cjs/tools/scaffold.js +60 -59
- package/dist/cjs/tools/templating/components.js +96 -266
- package/dist/cjs/tools/templating/index.js +11 -14
- package/dist/cjs/tools/templating/plugins.js +80 -78
- package/dist/cjs/tools/templating/utils.js +67 -66
- package/dist/cjs/utils/ensurePath.js +20 -20
- package/dist/cjs/utils/env.js +28 -27
- package/dist/cjs/utils/globalCache.js +55 -0
- package/dist/cjs/utils/index.js +26 -21
- package/dist/cjs/utils/is-server.js +11 -10
- package/dist/cjs/utils/normalize-url.js +5 -5
- package/dist/cjs/utils/timeout-promise.js +31 -31
- package/dist/cjs/utils/utils.js +254 -229
- package/dist/esm/cache-client.js +51 -50
- package/dist/esm/client/constants.js +4 -4
- package/dist/esm/client/edge-proxy.js +19 -17
- package/dist/esm/client/index.js +5 -5
- package/dist/esm/client/models.js +1 -1
- package/dist/esm/client/sitecore-client.js +414 -412
- package/dist/esm/client/utils.js +43 -42
- package/dist/esm/config/define-config.js +188 -187
- package/dist/esm/config/index.js +2 -2
- package/dist/esm/config/models.js +9 -8
- package/dist/esm/config-cli/define-cli-config.js +19 -18
- package/dist/esm/config-cli/index.js +2 -2
- package/dist/esm/config-cli/models.js +5 -4
- package/dist/esm/constants.js +46 -14
- package/dist/esm/debug.js +41 -39
- package/dist/esm/editing/codegen/index.js +1 -1
- package/dist/esm/editing/codegen/preview.js +263 -185
- package/dist/esm/editing/component-layout-service.js +55 -54
- package/dist/esm/editing/design-library.js +171 -117
- package/dist/esm/editing/editing-service.js +68 -67
- package/dist/esm/editing/index.js +6 -5
- package/dist/esm/editing/metadata.js +39 -39
- package/dist/esm/editing/models.js +41 -35
- package/dist/esm/editing/utils.js +98 -80
- package/dist/esm/form/form.js +72 -69
- package/dist/esm/form/index.js +1 -1
- package/dist/esm/graphql-request-client.js +101 -100
- package/dist/esm/i18n/dictionary-service.js +115 -114
- package/dist/esm/i18n/index.js +2 -2
- package/dist/esm/i18n/utils.js +13 -12
- package/dist/esm/index.js +13 -13
- package/dist/esm/layout/content-styles.js +64 -63
- package/dist/esm/layout/index.js +6 -6
- package/dist/esm/layout/layout-service.js +55 -50
- package/dist/esm/layout/models.js +36 -31
- package/dist/esm/layout/themes.js +71 -70
- package/dist/esm/layout/utils.js +109 -102
- package/dist/esm/media/index.js +2 -2
- package/dist/esm/media/media-api.js +90 -86
- package/dist/esm/models.js +1 -1
- package/dist/esm/native-fetcher.js +187 -172
- package/dist/esm/personalize/index.js +3 -3
- package/dist/esm/personalize/layout-personalizer.js +93 -92
- package/dist/esm/personalize/personalize-service.js +91 -87
- package/dist/esm/personalize/utils.js +135 -128
- package/dist/esm/retries.js +39 -38
- package/dist/esm/site/error-pages-service.js +58 -57
- package/dist/esm/site/index.js +8 -8
- package/dist/esm/site/models.js +1 -1
- package/dist/esm/site/redirects-service.js +87 -74
- package/dist/esm/site/robots-service.js +59 -58
- package/dist/esm/site/site-resolver.js +69 -68
- package/dist/esm/site/siteinfo-service.js +77 -73
- package/dist/esm/site/sitemap-xml-service.js +77 -76
- package/dist/esm/site/sitepath-service.js +157 -156
- package/dist/esm/site/utils.js +49 -41
- package/dist/esm/sitecore-service-base.js +29 -29
- package/dist/esm/tools/auth/flow.js +62 -61
- package/dist/esm/tools/auth/index.js +1 -1
- package/dist/esm/tools/auth/models.js +1 -1
- package/dist/esm/tools/auth/tenant-store.js +35 -35
- package/dist/esm/tools/codegen/component-generation.js +44 -42
- package/dist/esm/tools/codegen/extract-files.js +99 -101
- package/dist/esm/tools/codegen/import-map.js +358 -306
- package/dist/esm/tools/codegen/utils.js +373 -373
- package/dist/esm/tools/generate-map.js +1 -1
- package/dist/esm/tools/generateMetadata.js +29 -28
- package/dist/esm/tools/generateSites.js +52 -51
- package/dist/esm/tools/index.js +28 -27
- package/dist/esm/tools/scaffold.js +52 -51
- package/dist/esm/tools/templating/components.js +59 -223
- package/dist/esm/tools/templating/index.js +3 -3
- package/dist/esm/tools/templating/plugins.js +72 -70
- package/dist/esm/tools/templating/utils.js +59 -58
- package/dist/esm/utils/ensurePath.js +13 -13
- package/dist/esm/utils/env.js +24 -23
- package/dist/esm/utils/globalCache.js +49 -0
- package/dist/esm/utils/index.js +4 -3
- package/dist/esm/utils/is-server.js +9 -8
- package/dist/esm/utils/normalize-url.js +1 -1
- package/dist/esm/utils/timeout-promise.js +28 -28
- package/dist/esm/utils/utils.js +238 -213
- package/package.json +73 -5
- package/types/cache-client.d.ts +68 -64
- package/types/cache-client.d.ts.map +1 -0
- package/types/client/constants.d.ts +5 -4
- package/types/client/constants.d.ts.map +1 -0
- package/types/client/edge-proxy.d.ts +18 -15
- package/types/client/edge-proxy.d.ts.map +1 -0
- package/types/client/index.d.ts +8 -7
- package/types/client/index.d.ts.map +1 -0
- package/types/client/models.d.ts +21 -19
- package/types/client/models.d.ts.map +1 -0
- package/types/client/sitecore-client.d.ts +338 -327
- package/types/client/sitecore-client.d.ts.map +1 -0
- package/types/client/utils.d.ts +15 -9
- package/types/client/utils.d.ts.map +1 -0
- package/types/config/define-config.d.ts +20 -18
- package/types/config/define-config.d.ts.map +1 -0
- package/types/config/index.d.ts +3 -2
- package/types/config/index.d.ts.map +1 -0
- package/types/config/models.d.ts +287 -268
- package/types/config/models.d.ts.map +1 -0
- package/types/config-cli/define-cli-config.d.ts +9 -7
- package/types/config-cli/define-cli-config.d.ts.map +1 -0
- package/types/config-cli/index.d.ts +3 -2
- package/types/config-cli/index.d.ts.map +1 -0
- package/types/config-cli/models.d.ts +6 -4
- package/types/config-cli/models.d.ts.map +1 -0
- package/types/constants.d.ts +44 -11
- package/types/constants.d.ts.map +1 -0
- package/types/debug.d.ts +35 -28
- package/types/debug.d.ts.map +1 -0
- package/types/editing/codegen/index.d.ts +2 -1
- package/types/editing/codegen/index.d.ts.map +1 -0
- package/types/editing/codegen/preview.d.ts +256 -195
- package/types/editing/codegen/preview.d.ts.map +1 -0
- package/types/editing/component-layout-service.d.ts +84 -80
- package/types/editing/component-layout-service.d.ts.map +1 -0
- package/types/editing/design-library.d.ts +111 -63
- package/types/editing/design-library.d.ts.map +1 -0
- package/types/editing/editing-service.d.ts +72 -62
- package/types/editing/editing-service.d.ts.map +1 -0
- package/types/editing/index.d.ts +7 -6
- package/types/editing/index.d.ts.map +1 -0
- package/types/editing/metadata.d.ts +8 -7
- package/types/editing/metadata.d.ts.map +1 -0
- package/types/editing/models.d.ts +103 -92
- package/types/editing/models.d.ts.map +1 -0
- package/types/editing/utils.d.ts +91 -74
- package/types/editing/utils.d.ts.map +1 -0
- package/types/form/form.d.ts +25 -21
- package/types/form/form.d.ts.map +1 -0
- package/types/form/index.d.ts +2 -1
- package/types/form/index.d.ts.map +1 -0
- package/types/graphql-request-client.d.ts +112 -105
- package/types/graphql-request-client.d.ts.map +1 -0
- package/types/i18n/dictionary-service.d.ts +135 -131
- package/types/i18n/dictionary-service.d.ts.map +1 -0
- package/types/i18n/index.d.ts +3 -2
- package/types/i18n/index.d.ts.map +1 -0
- package/types/i18n/utils.d.ts +9 -7
- package/types/i18n/utils.d.ts.map +1 -0
- package/types/index.d.ts +13 -12
- package/types/index.d.ts.map +1 -0
- package/types/layout/content-styles.d.ts +20 -18
- package/types/layout/content-styles.d.ts.map +1 -0
- package/types/layout/index.d.ts +6 -5
- package/types/layout/index.d.ts.map +1 -0
- package/types/layout/layout-service.d.ts +45 -35
- package/types/layout/layout-service.d.ts.map +1 -0
- package/types/layout/models.d.ts +174 -151
- package/types/layout/models.d.ts.map +1 -0
- package/types/layout/themes.d.ts +13 -11
- package/types/layout/themes.d.ts.map +1 -0
- package/types/layout/utils.d.ts +56 -41
- package/types/layout/utils.d.ts.map +1 -0
- package/types/media/index.d.ts +3 -2
- package/types/media/index.d.ts.map +1 -0
- package/types/media/media-api.d.ts +60 -55
- package/types/media/media-api.d.ts.map +1 -0
- package/types/models.d.ts +94 -84
- package/types/models.d.ts.map +1 -0
- package/types/native-fetcher.d.ts +124 -114
- package/types/native-fetcher.d.ts.map +1 -0
- package/types/personalize/index.d.ts +4 -3
- package/types/personalize/index.d.ts.map +1 -0
- package/types/personalize/layout-personalizer.d.ts +29 -27
- package/types/personalize/layout-personalizer.d.ts.map +1 -0
- package/types/personalize/personalize-service.d.ts +90 -80
- package/types/personalize/personalize-service.d.ts.map +1 -0
- package/types/personalize/utils.d.ts +78 -69
- package/types/personalize/utils.d.ts.map +1 -0
- package/types/retries.d.ts +26 -24
- package/types/retries.d.ts.map +1 -0
- package/types/site/error-pages-service.d.ts +64 -57
- package/types/site/error-pages-service.d.ts.map +1 -0
- package/types/site/index.d.ts +10 -9
- package/types/site/index.d.ts.map +1 -0
- package/types/site/models.d.ts +23 -18
- package/types/site/models.d.ts.map +1 -0
- package/types/site/redirects-service.d.ts +92 -69
- package/types/site/redirects-service.d.ts.map +1 -0
- package/types/site/robots-service.d.ts +57 -50
- package/types/site/robots-service.d.ts.map +1 -0
- package/types/site/site-resolver.d.ts +28 -26
- package/types/site/site-resolver.d.ts.map +1 -0
- package/types/site/siteinfo-service.d.ts +65 -52
- package/types/site/siteinfo-service.d.ts.map +1 -0
- package/types/site/sitemap-xml-service.d.ts +63 -56
- package/types/site/sitemap-xml-service.d.ts.map +1 -0
- package/types/site/sitepath-service.d.ts +137 -134
- package/types/site/sitepath-service.d.ts.map +1 -0
- package/types/site/utils.d.ts +41 -28
- package/types/site/utils.d.ts.map +1 -0
- package/types/sitecore-service-base.d.ts +31 -30
- package/types/sitecore-service-base.d.ts.map +1 -0
- package/types/tools/auth/flow.d.ts +29 -27
- package/types/tools/auth/flow.d.ts.map +1 -0
- package/types/tools/auth/index.d.ts +2 -1
- package/types/tools/auth/index.d.ts.map +1 -0
- package/types/tools/auth/models.d.ts +35 -33
- package/types/tools/auth/models.d.ts.map +1 -0
- package/types/tools/auth/tenant-store.d.ts +12 -11
- package/types/tools/auth/tenant-store.d.ts.map +1 -0
- package/types/tools/codegen/component-generation.d.ts +50 -47
- package/types/tools/codegen/component-generation.d.ts.map +1 -0
- package/types/tools/codegen/extract-files.d.ts +24 -22
- package/types/tools/codegen/extract-files.d.ts.map +1 -0
- package/types/tools/codegen/import-map.d.ts +103 -70
- package/types/tools/codegen/import-map.d.ts.map +1 -0
- package/types/tools/codegen/utils.d.ts +76 -75
- package/types/tools/codegen/utils.d.ts.map +1 -0
- package/types/tools/generate-map.d.ts +36 -26
- package/types/tools/generate-map.d.ts.map +1 -0
- package/types/tools/generateMetadata.d.ts +24 -22
- package/types/tools/generateMetadata.d.ts.map +1 -0
- package/types/tools/generateSites.d.ts +25 -22
- package/types/tools/generateSites.d.ts.map +1 -0
- package/types/tools/index.d.ts +22 -20
- package/types/tools/index.d.ts.map +1 -0
- package/types/tools/scaffold.d.ts +27 -25
- package/types/tools/scaffold.d.ts.map +1 -0
- package/types/tools/templating/components.d.ts +104 -103
- package/types/tools/templating/components.d.ts.map +1 -0
- package/types/tools/templating/index.d.ts +4 -3
- package/types/tools/templating/index.d.ts.map +1 -0
- package/types/tools/templating/plugins.d.ts +71 -67
- package/types/tools/templating/plugins.d.ts.map +1 -0
- package/types/tools/templating/utils.d.ts +42 -40
- package/types/tools/templating/utils.d.ts.map +1 -0
- package/types/utils/ensurePath.d.ts +7 -6
- package/types/utils/ensurePath.d.ts.map +1 -0
- package/types/utils/env.d.ts +9 -7
- package/types/utils/env.d.ts.map +1 -0
- package/types/utils/globalCache.d.ts +37 -0
- package/types/utils/globalCache.d.ts.map +1 -0
- package/types/utils/index.d.ts +5 -3
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/is-server.d.ts +8 -6
- package/types/utils/is-server.d.ts.map +1 -0
- package/types/utils/normalize-url.d.ts +2 -1
- package/types/utils/normalize-url.d.ts.map +1 -0
- package/types/utils/timeout-promise.d.ts +18 -17
- package/types/utils/timeout-promise.d.ts.map +1 -0
- package/types/utils/utils.d.ts +104 -79
- package/types/utils/utils.d.ts.map +1 -0
- package/client.js +0 -1
- package/codegen.js +0 -1
- package/config-cli.js +0 -1
- package/config.js +0 -1
- package/editing.js +0 -1
- package/i18n.js +0 -1
- package/layout.js +0 -1
- package/media.js +0 -1
- package/personalize.js +0 -1
- package/site.js +0 -1
- package/tools.js +0 -1
- package/utils.js +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import debug from '../debug';
|
|
2
|
-
import { getPersonalizedRewrite } from '../personalize';
|
|
3
|
-
import { getSiteRewrite } from '../site';
|
|
4
|
-
/** @private */
|
|
5
|
-
export const languageError = 'The list of languages cannot be empty';
|
|
6
|
-
export const siteError = 'The service needs a site name';
|
|
7
|
-
export const sitesError = 'The list of sites cannot be empty';
|
|
8
|
-
/**
|
|
9
|
-
* @param {string} siteName to inject into error text
|
|
10
|
-
* @private
|
|
11
|
-
*/
|
|
12
|
-
export function getSiteEmptyError(siteName) {
|
|
13
|
-
return `Site "${siteName}" does not exist or site item tree is missing`;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* GQL query made dynamic based whether personalization is enabled or not
|
|
17
|
-
* @param {boolean} usesPersonalize flag to detrmine which variation of a query to run
|
|
18
|
-
* @returns GraphQL query to fetch site paths with
|
|
19
|
-
*/
|
|
1
|
+
import debug from '../debug';
|
|
2
|
+
import { getPersonalizedRewrite } from '../personalize';
|
|
3
|
+
import { getSiteRewrite } from '../site';
|
|
4
|
+
/** @private */
|
|
5
|
+
export const languageError = 'The list of languages cannot be empty';
|
|
6
|
+
export const siteError = 'The service needs a site name';
|
|
7
|
+
export const sitesError = 'The list of sites cannot be empty';
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} siteName to inject into error text
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
export function getSiteEmptyError(siteName) {
|
|
13
|
+
return `Site "${siteName}" does not exist or site item tree is missing`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* GQL query made dynamic based whether personalization is enabled or not
|
|
17
|
+
* @param {boolean} usesPersonalize flag to detrmine which variation of a query to run
|
|
18
|
+
* @returns GraphQL query to fetch site paths with
|
|
19
|
+
*/
|
|
20
20
|
const defaultQuery = (usesPersonalize) => /* GraphQL */ `
|
|
21
21
|
query ${usesPersonalize ? 'PersonalizeSitemapQuery' : 'DefaultSitemapQuery'}(
|
|
22
22
|
$siteName: String!
|
|
@@ -42,151 +42,152 @@ query ${usesPersonalize ? 'PersonalizeSitemapQuery' : 'DefaultSitemapQuery'}(
|
|
|
42
42
|
}
|
|
43
43
|
results {
|
|
44
44
|
path: routePath
|
|
45
|
-
${usesPersonalize
|
|
45
|
+
${usesPersonalize
|
|
46
46
|
? `
|
|
47
47
|
route {
|
|
48
48
|
personalization {
|
|
49
49
|
variantIds
|
|
50
50
|
}
|
|
51
|
-
}`
|
|
51
|
+
}`
|
|
52
52
|
: ''}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`;
|
|
59
|
-
/**
|
|
60
|
-
* Service that fetches the list of site pages using Sitecore's GraphQL API.
|
|
61
|
-
* Used to handle a single site
|
|
62
|
-
* This list is used for SSG and Export functionality.
|
|
63
|
-
* @mixes SearchQueryService<PageListQueryResult>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* @param {string[]}
|
|
91
|
-
* @param {
|
|
92
|
-
* @
|
|
93
|
-
* @
|
|
94
|
-
* @throws {RangeError} if the
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
*
|
|
157
|
-
* @param {string}
|
|
158
|
-
* @param {
|
|
159
|
-
* @
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
let
|
|
172
|
-
let
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
58
|
+
`;
|
|
59
|
+
/**
|
|
60
|
+
* Service that fetches the list of site pages using Sitecore's GraphQL API.
|
|
61
|
+
* Used to handle a single site
|
|
62
|
+
* This list is used for SSG and Export functionality.
|
|
63
|
+
* @mixes SearchQueryService<PageListQueryResult>
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export class SitePathService {
|
|
67
|
+
/**
|
|
68
|
+
* Creates an instance of graphQL sitemap service with the provided options
|
|
69
|
+
* @param {SitePathServiceConfig} options instance
|
|
70
|
+
*/
|
|
71
|
+
constructor(options) {
|
|
72
|
+
this.options = options;
|
|
73
|
+
this._graphQLClient = this.getGraphQLClient();
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* GraphQL client accessible by descendant classes when needed
|
|
77
|
+
*/
|
|
78
|
+
get graphQLClient() {
|
|
79
|
+
return this._graphQLClient;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Gets the default query used for fetching the list of site pages
|
|
83
|
+
*/
|
|
84
|
+
get query() {
|
|
85
|
+
return defaultQuery(this.options.includePersonalizedRoutes);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Fetch a flat list of all pages that belong to all the requested sites and have a
|
|
89
|
+
* version in the specified language(s).
|
|
90
|
+
* @param {string[]} sites Fetch pages for these sites.
|
|
91
|
+
* @param {string[]} languages Fetch pages that have versions in this language(s).
|
|
92
|
+
* @param {FetchOptions} fetchOptions Options to override graphQL client details like retries and fetch implementation
|
|
93
|
+
* @returns list of pages
|
|
94
|
+
* @throws {RangeError} if the list of languages is empty.
|
|
95
|
+
* @throws {RangeError} if the any of the languages is an empty string.
|
|
96
|
+
*/
|
|
97
|
+
async fetchSiteRoutes(sites, languages, fetchOptions) {
|
|
98
|
+
const formatPath = (path, locale) => ({
|
|
99
|
+
params: {
|
|
100
|
+
path,
|
|
101
|
+
},
|
|
102
|
+
locale,
|
|
103
|
+
});
|
|
104
|
+
const paths = new Array();
|
|
105
|
+
if (!languages.length) {
|
|
106
|
+
throw new RangeError(languageError);
|
|
107
|
+
}
|
|
108
|
+
// Get all sites
|
|
109
|
+
if (!sites || !sites.length) {
|
|
110
|
+
throw new RangeError(sitesError);
|
|
111
|
+
}
|
|
112
|
+
// Fetch paths for each site
|
|
113
|
+
for (let i = 0; i < sites.length; i++) {
|
|
114
|
+
for (const language of languages) {
|
|
115
|
+
// Fetch paths using all locales
|
|
116
|
+
const sitePaths = await this.fetchLanguageSitePaths(language, sites[i], fetchOptions);
|
|
117
|
+
const transformedPaths = await this.transformLanguageSitePaths(sitePaths, formatPath, language);
|
|
118
|
+
paths.push(...transformedPaths);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return [].concat(...paths);
|
|
122
|
+
}
|
|
123
|
+
async transformLanguageSitePaths(sitePaths, formatStaticPath, language) {
|
|
124
|
+
const toSegments = (p) => decodeURI(p)
|
|
125
|
+
.replace(/^\/|\/$/g, '')
|
|
126
|
+
.split('/');
|
|
127
|
+
const aggregatedPaths = [];
|
|
128
|
+
sitePaths.forEach((item) => {
|
|
129
|
+
var _a, _b, _c;
|
|
130
|
+
if (!item)
|
|
131
|
+
return;
|
|
132
|
+
aggregatedPaths.push(formatStaticPath(toSegments(item.path), language));
|
|
133
|
+
const variantIds = (_c = (_b = (_a = item.route) === null || _a === void 0 ? void 0 : _a.personalization) === null || _b === void 0 ? void 0 : _b.variantIds) === null || _c === void 0 ? void 0 : _c.filter((variantId) => !variantId.includes('_') // exclude component A/B test
|
|
134
|
+
);
|
|
135
|
+
if (variantIds === null || variantIds === void 0 ? void 0 : variantIds.length) {
|
|
136
|
+
aggregatedPaths.push(...variantIds.map((varId) => formatStaticPath(toSegments(getPersonalizedRewrite(item.path, [varId])), language)));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
return aggregatedPaths;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Gets a GraphQL client that can make requests to the API. Uses graphql-request as the default
|
|
143
|
+
* library for fetching graphql data (@see GraphQLRequestClient). Override this method if you
|
|
144
|
+
* want to use something else.
|
|
145
|
+
* @returns {GraphQLClient} implementation
|
|
146
|
+
*/
|
|
147
|
+
getGraphQLClient() {
|
|
148
|
+
if (!this.options.clientFactory) {
|
|
149
|
+
throw new Error('clientFactory needs to be provided when initializing GraphQL client.');
|
|
150
|
+
}
|
|
151
|
+
return this.options.clientFactory({
|
|
152
|
+
debugger: debug.sitemap,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Fetch and return site paths for multisite implementation, with prefixes included
|
|
157
|
+
* @param {string} language path language
|
|
158
|
+
* @param {string} siteName site name
|
|
159
|
+
* @param {FetchOptions} fetchOptions Options to override graphQL client details like retries and fetch implementation
|
|
160
|
+
* @returns modified paths
|
|
161
|
+
*/
|
|
162
|
+
async fetchLanguageSitePaths(language, siteName, fetchOptions) {
|
|
163
|
+
var _a, _b, _c, _d;
|
|
164
|
+
const args = {
|
|
165
|
+
siteName: siteName,
|
|
166
|
+
language: language,
|
|
167
|
+
pageSize: this.options.pageSize,
|
|
168
|
+
includedPaths: this.options.includedPaths,
|
|
169
|
+
excludedPaths: this.options.excludedPaths,
|
|
170
|
+
};
|
|
171
|
+
let results = [];
|
|
172
|
+
let hasNext = true;
|
|
173
|
+
let after = '';
|
|
174
|
+
debug.sitemap('fetching sitemap data for %s %s', language, siteName);
|
|
175
|
+
while (hasNext) {
|
|
176
|
+
const fetchResponse = await this.graphQLClient.request(this.query, Object.assign(Object.assign({}, args), { after }), fetchOptions);
|
|
177
|
+
if (!((_a = fetchResponse === null || fetchResponse === void 0 ? void 0 : fetchResponse.site) === null || _a === void 0 ? void 0 : _a.siteInfo)) {
|
|
178
|
+
throw new RangeError(getSiteEmptyError(siteName));
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
results = results.concat((_b = fetchResponse.site.siteInfo.routes) === null || _b === void 0 ? void 0 : _b.results);
|
|
182
|
+
hasNext = (_c = fetchResponse.site.siteInfo.routes) === null || _c === void 0 ? void 0 : _c.pageInfo.hasNext;
|
|
183
|
+
after = (_d = fetchResponse.site.siteInfo.routes) === null || _d === void 0 ? void 0 : _d.pageInfo.endCursor;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
results.forEach((item) => {
|
|
187
|
+
if (item) {
|
|
188
|
+
item.path = getSiteRewrite(item.path, { siteName: siteName });
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
return results;
|
|
192
|
+
}
|
|
193
|
+
}
|
package/dist/esm/site/utils.js
CHANGED
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export const
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Site prefix for rewrite path
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export const SITE_PREFIX = '_site_';
|
|
6
|
+
/**
|
|
7
|
+
* Site key for cookie and query string parameter access
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export const SITE_KEY = 'sc_site';
|
|
11
|
+
/**
|
|
12
|
+
* Get a site rewrite path for given pathname
|
|
13
|
+
* @param {string} pathname the pathname
|
|
14
|
+
* @param {SiteRewriteData} data the site data to include in the rewrite
|
|
15
|
+
* @returns {string} the rewrite path
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export function getSiteRewrite(pathname, data) {
|
|
19
|
+
const path = pathname.startsWith('/') ? pathname : '/' + pathname;
|
|
20
|
+
return `/${SITE_PREFIX}${data.siteName}${path}`;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get site data from the rewrite path
|
|
24
|
+
* @param {string} pathname the pathname
|
|
25
|
+
* @param {string} defaultSiteName the default site name
|
|
26
|
+
* @returns {SiteRewriteData} the site data from the rewrite
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export function getSiteRewriteData(pathname, defaultSiteName) {
|
|
30
|
+
const data = {
|
|
31
|
+
siteName: defaultSiteName,
|
|
32
|
+
};
|
|
33
|
+
const path = pathname.endsWith('/') ? pathname : pathname + '/';
|
|
34
|
+
const result = path.match(`${SITE_PREFIX}(.*?)\\/`);
|
|
35
|
+
if (result && result[1] !== '') {
|
|
36
|
+
data.siteName = result[1];
|
|
37
|
+
}
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Normalize a site rewrite path (remove site data)
|
|
42
|
+
* @param {string} pathname the pathname
|
|
43
|
+
* @returns {string} the pathname with site data removed
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export function normalizeSiteRewrite(pathname) {
|
|
47
|
+
const result = pathname.match(`${SITE_PREFIX}.*?(?:\\/|$)`);
|
|
48
|
+
return result === null ? pathname : pathname.replace(result[0], '');
|
|
49
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import debug from './debug';
|
|
2
|
-
/**
|
|
3
|
-
* Base abstraction to implement custom layout service
|
|
4
|
-
*/
|
|
5
|
-
export class SitecoreServiceBase {
|
|
6
|
-
/**
|
|
7
|
-
* Fetch layout data using the Sitecore GraphQL endpoint.
|
|
8
|
-
* @param {GraphQLServiceConfig} serviceConfig configuration
|
|
9
|
-
*/
|
|
10
|
-
constructor(serviceConfig) {
|
|
11
|
-
this.serviceConfig = serviceConfig;
|
|
12
|
-
this.graphQLClient = this.getGraphQLClient();
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Gets a GraphQL client that can make requests to the API.
|
|
16
|
-
* @returns {GraphQLClient} implementation
|
|
17
|
-
*/
|
|
18
|
-
getGraphQLClient() {
|
|
19
|
-
var _a, _b;
|
|
20
|
-
if (!this.serviceConfig.clientFactory) {
|
|
21
|
-
throw new Error('clientFactory needs to be provided when initializing GraphQL client.');
|
|
22
|
-
}
|
|
23
|
-
return this.serviceConfig.clientFactory({
|
|
24
|
-
debugger: this.serviceConfig.debugger || debug.http,
|
|
25
|
-
retries: (_a = this.serviceConfig.retries) === null || _a === void 0 ? void 0 : _a.count,
|
|
26
|
-
retryStrategy: (_b = this.serviceConfig.retries) === null || _b === void 0 ? void 0 : _b.retryStrategy,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
import debug from './debug';
|
|
2
|
+
/**
|
|
3
|
+
* Base abstraction to implement custom layout service
|
|
4
|
+
*/
|
|
5
|
+
export class SitecoreServiceBase {
|
|
6
|
+
/**
|
|
7
|
+
* Fetch layout data using the Sitecore GraphQL endpoint.
|
|
8
|
+
* @param {GraphQLServiceConfig} serviceConfig configuration
|
|
9
|
+
*/
|
|
10
|
+
constructor(serviceConfig) {
|
|
11
|
+
this.serviceConfig = serviceConfig;
|
|
12
|
+
this.graphQLClient = this.getGraphQLClient();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets a GraphQL client that can make requests to the API.
|
|
16
|
+
* @returns {GraphQLClient} implementation
|
|
17
|
+
*/
|
|
18
|
+
getGraphQLClient() {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
if (!this.serviceConfig.clientFactory) {
|
|
21
|
+
throw new Error('clientFactory needs to be provided when initializing GraphQL client.');
|
|
22
|
+
}
|
|
23
|
+
return this.serviceConfig.clientFactory({
|
|
24
|
+
debugger: this.serviceConfig.debugger || debug.http,
|
|
25
|
+
retries: (_a = this.serviceConfig.retries) === null || _a === void 0 ? void 0 : _a.count,
|
|
26
|
+
retryStrategy: (_b = this.serviceConfig.retries) === null || _b === void 0 ? void 0 : _b.retryStrategy,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { decodeJwtPayload } from './tenant-store';
|
|
2
|
-
import { DEFAULT_SITECORE_AUTH_DOMAIN, DEFAULT_SITECORE_AUTH_AUDIENCE, DEFAULT_SITECORE_AUTH_BASE_URL, } from '../../constants';
|
|
3
|
-
const GRANT_TYPE = 'client_credentials';
|
|
4
|
-
/**
|
|
5
|
-
* Performs the OAuth 2.0 client credentials flow to obtain a JWT access token
|
|
6
|
-
* from the Sitecore Identity Provider using the provided client credentials.
|
|
7
|
-
* @param {object} [args] - The arguments for client credentials flow
|
|
8
|
-
* @param {string} [args.clientId] - The client ID registered with Sitecore Identity
|
|
9
|
-
* @param {string} [args.clientSecret] - The client secret associated with the client ID
|
|
10
|
-
* @param {string} [args.organizationId] - The ID of the organization the client belongs to
|
|
11
|
-
* @param {string} [args.tenantId] - The tenant ID representing the specific Sitecore environment
|
|
12
|
-
* @param {string} [args.audience] - The API audience the token is intended for. Defaults to `constants.DEFAULT_SITECORE_AUTH_AUDIENCE`
|
|
13
|
-
* @param {string} [args.authority] - The auth server base URL. Defaults to `constants.DEFAULT_SITECORE_AUTH_DOMAIN`
|
|
14
|
-
* @param {string} [args.baseUrl] - The base URL for the API, used to construct the audience. Defaults to `constants.DEFAULT_SITECORE_AUTH_BASE_URL`
|
|
15
|
-
* @returns A Promise that resolves to the access token response (including access token, token type, expiry, etc.)
|
|
16
|
-
* @throws Will log and exit the process if the request fails or returns a non-OK status
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
1
|
+
import { decodeJwtPayload } from './tenant-store';
|
|
2
|
+
import { DEFAULT_SITECORE_AUTH_DOMAIN, DEFAULT_SITECORE_AUTH_AUDIENCE, DEFAULT_SITECORE_AUTH_BASE_URL, } from '../../constants';
|
|
3
|
+
const GRANT_TYPE = 'client_credentials';
|
|
4
|
+
/**
|
|
5
|
+
* Performs the OAuth 2.0 client credentials flow to obtain a JWT access token
|
|
6
|
+
* from the Sitecore Identity Provider using the provided client credentials.
|
|
7
|
+
* @param {object} [args] - The arguments for client credentials flow
|
|
8
|
+
* @param {string} [args.clientId] - The client ID registered with Sitecore Identity
|
|
9
|
+
* @param {string} [args.clientSecret] - The client secret associated with the client ID
|
|
10
|
+
* @param {string} [args.organizationId] - The ID of the organization the client belongs to
|
|
11
|
+
* @param {string} [args.tenantId] - The tenant ID representing the specific Sitecore environment
|
|
12
|
+
* @param {string} [args.audience] - The API audience the token is intended for. Defaults to `constants.DEFAULT_SITECORE_AUTH_AUDIENCE`
|
|
13
|
+
* @param {string} [args.authority] - The auth server base URL. Defaults to `constants.DEFAULT_SITECORE_AUTH_DOMAIN`
|
|
14
|
+
* @param {string} [args.baseUrl] - The base URL for the API, used to construct the audience. Defaults to `constants.DEFAULT_SITECORE_AUTH_BASE_URL`
|
|
15
|
+
* @returns A Promise that resolves to the access token response (including access token, token type, expiry, etc.)
|
|
16
|
+
* @throws Will log and exit the process if the request fails or returns a non-OK status
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export let clientCredentialsFlow = _clientCredentialsFlow;
|
|
20
|
+
// mock setup for unit tests to make sinon happy and mock-able with esbuild/tsx
|
|
21
|
+
// https://sinonjs.org/how-to/typescript-swc/
|
|
22
|
+
// This, plus the `_` names make the exports writable for sinon
|
|
23
|
+
export const unitMocks = {
|
|
24
|
+
set clientCredentialsFlow(mockImplementation) {
|
|
25
|
+
clientCredentialsFlow = mockImplementation;
|
|
26
|
+
},
|
|
27
|
+
get clientCredentialsFlow() {
|
|
28
|
+
return _clientCredentialsFlow;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
async function _clientCredentialsFlow({ clientId, clientSecret, organizationId, tenantId, audience = DEFAULT_SITECORE_AUTH_AUDIENCE, authority = DEFAULT_SITECORE_AUTH_DOMAIN, baseUrl = DEFAULT_SITECORE_AUTH_BASE_URL, }) {
|
|
32
|
+
const params = new URLSearchParams({
|
|
33
|
+
client_id: clientId,
|
|
34
|
+
client_secret: clientSecret !== null && clientSecret !== void 0 ? clientSecret : '',
|
|
35
|
+
organization_id: organizationId !== null && organizationId !== void 0 ? organizationId : '',
|
|
36
|
+
tenant_id: tenantId !== null && tenantId !== void 0 ? tenantId : '',
|
|
37
|
+
audience,
|
|
38
|
+
grant_type: GRANT_TYPE,
|
|
39
|
+
baseUrl: baseUrl !== null && baseUrl !== void 0 ? baseUrl : '',
|
|
40
|
+
});
|
|
41
|
+
const response = await fetch(`${authority}/oauth/token`, {
|
|
42
|
+
method: 'POST',
|
|
43
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
44
|
+
body: params.toString(),
|
|
45
|
+
});
|
|
46
|
+
const data = await response.json();
|
|
47
|
+
if (!response.ok) {
|
|
48
|
+
throw new Error(data.error_description || data.error || 'Error during client credentials flow');
|
|
49
|
+
}
|
|
50
|
+
const decodedPayload = decodeJwtPayload(data.access_token) || {};
|
|
51
|
+
if (!(decodedPayload === null || decodedPayload === void 0 ? void 0 : decodedPayload.tokenTenantId) || !decodedPayload.tokenOrgId) {
|
|
52
|
+
throw new Error('\n Token is missing required claims tenant_id or org_id.');
|
|
53
|
+
}
|
|
54
|
+
const { tokenTenantId, tokenOrgId, tokenTenantName } = decodedPayload;
|
|
55
|
+
if (tenantId && tenantId !== tokenTenantId) {
|
|
56
|
+
throw new Error('\n Mismatch: Provided tenant ID does not match claims tenant ID.');
|
|
57
|
+
}
|
|
58
|
+
if (organizationId && organizationId !== tokenOrgId) {
|
|
59
|
+
throw new Error('\n Mismatch: Provided organization ID does not match claims organization ID.');
|
|
60
|
+
}
|
|
61
|
+
return { data, tokenOrgId, tokenTenantId, tokenTenantName, accessToken: data.access_token };
|
|
62
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { clientCredentialsFlow } from './flow';
|
|
1
|
+
export { clientCredentialsFlow } from './flow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|