create-sitecore-jss 22.2.0-canary.81 → 22.2.0-canary.83
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/bin.js +19 -35
- package/dist/common/index.js +3 -5
- package/dist/common/processes/install.js +2 -9
- package/dist/common/processes/next.js +3 -6
- package/dist/common/processes/transform.js +13 -18
- package/dist/common/prompts/base.js +25 -0
- package/dist/common/utils/helpers.js +19 -29
- package/dist/init-runner.js +11 -16
- package/dist/initializers/angular/index.js +0 -13
- package/dist/initializers/angular/prompts.js +1 -22
- package/dist/initializers/nextjs/index.js +2 -2
- package/dist/initializers/nextjs/prompts.js +0 -2
- package/dist/initializers/nextjs/remove-dev-dependencies.js +2 -2
- package/dist/initializers/nextjs-multisite/index.js +1 -1
- package/dist/initializers/nextjs-styleguide/index.js +1 -1
- package/dist/initializers/nextjs-styleguide-tracking/index.js +1 -1
- package/dist/initializers/nextjs-sxa/index.js +1 -1
- package/dist/initializers/nextjs-xmcloud/index.js +1 -1
- package/dist/initializers/react/index.js +3 -3
- package/dist/initializers/react/prompts.js +1 -1
- package/dist/initializers/react-native/prompts.js +0 -1
- package/dist/initializers/vue/prompts.js +1 -1
- package/dist/templates/angular/.env +3 -4
- package/dist/templates/angular/.eslintrc +0 -1
- package/dist/templates/angular/README.md +45 -5
- package/dist/templates/angular/angular.json +6 -1
- package/dist/templates/angular/gitignore +0 -5
- package/dist/templates/angular/package.json +18 -6
- package/dist/templates/angular/proxy.conf.js +23 -5
- package/dist/templates/angular/scripts/bootstrap.ts +24 -5
- package/dist/templates/angular/scripts/generate-component-factory.ts +166 -0
- package/dist/templates/angular/scripts/generate-config.ts +72 -71
- package/dist/templates/angular/scripts/update-graphql-fragment-data.ts +28 -21
- package/dist/templates/angular/server.bundle.ts +5 -3
- package/dist/templates/angular/src/app/JssState.ts +9 -2
- package/dist/templates/angular/src/app/app.module.ts +6 -5
- package/dist/templates/angular/src/app/app.server.module.ts +6 -9
- package/dist/templates/angular/src/app/components/app-components.shared.module.ts +19 -4
- package/dist/templates/angular/src/app/components/gitignore +1 -1
- package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-layout/graph-ql-layout.component.ts +1 -1
- package/dist/templates/angular/src/app/i18n/jss-translation-client-loader.service.ts +7 -15
- package/dist/templates/angular/src/app/i18n/jss-translation-server-loader.service.ts +2 -14
- package/dist/templates/angular/src/app/jss-context.server-side.service.ts +4 -4
- package/dist/templates/angular/src/app/jss-context.service.ts +11 -14
- package/dist/templates/{angular-sxp → angular}/src/app/jss-data-fetcher.service.ts +1 -3
- package/dist/templates/angular/src/app/jss-graphql.service.ts +7 -7
- package/dist/templates/angular/src/app/layout/jss-layout.service.ts +2 -2
- package/dist/templates/angular/src/app/lib/client-factory.ts +28 -0
- package/dist/templates/angular/src/app/lib/dictionary-service-factory.ts +13 -24
- package/dist/templates/angular/src/app/lib/layout-service-factory.ts +12 -20
- package/dist/templates/angular/src/app/routing/layout/layout.component.html +1 -1
- package/dist/templates/angular/src/app/routing/layout/layout.component.ts +11 -11
- package/dist/templates/angular/src/app/routing/navigation/navigation.component.html +6 -5
- package/dist/templates/angular/src/app/routing/navigation/navigation.component.ts +2 -1
- package/dist/templates/angular/src/app/routing/routing.module.ts +21 -14
- package/dist/templates/{angular-sxp/src/app/routing/scripts → angular/src/app/routing}/visitor-identification/visitor-identification.component.ts +3 -9
- package/dist/templates/angular/src/environments/gitignore +1 -2
- package/dist/templates/angular/src/graphql-fragment-types.ts +95 -0
- package/dist/templates/angular/tsconfig.json +2 -7
- package/dist/templates/nextjs/scripts/config/plugins/fallback.ts +1 -0
- package/dist/templates/nextjs/scripts/generate-config.ts +1 -8
- package/dist/templates/nextjs-styleguide/scripts/config/plugins/disconnected.ts +0 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_alignment.scss +7 -34
- package/dist/templates/node-headless-ssr-proxy/src/config.ts +3 -3
- package/dist/templates/node-headless-ssr-proxy/src/httpAgents.ts +2 -2
- package/dist/templates/node-headless-ssr-proxy/src/index.ts +2 -9
- package/dist/templates/react/scripts/generate-config.js +3 -10
- package/dist/templates/vue/scripts/generate-config.js +0 -5
- package/package.json +2 -2
- package/dist/common/prompts/proxy.js +0 -35
- package/dist/common/prompts/sxp.js +0 -34
- package/dist/initializers/angular-sxp/index.js +0 -62
- package/dist/initializers/angular-xmcloud/index.js +0 -80
- package/dist/initializers/node-xmcloud-proxy/index.js +0 -33
- package/dist/templates/angular/scripts/config/index.ts +0 -28
- package/dist/templates/angular/scripts/config/plugins/computed.ts +0 -21
- package/dist/templates/angular/scripts/config/plugins/fallback.ts +0 -22
- package/dist/templates/angular/scripts/config/plugins/package-json.ts +0 -22
- package/dist/templates/angular/scripts/config/plugins/scjssconfig.ts +0 -29
- package/dist/templates/angular/scripts/generate-component-factory/index.ts +0 -45
- package/dist/templates/angular/scripts/generate-component-factory/plugins/component-factory.ts +0 -147
- package/dist/templates/angular/scripts/generate-component-factory/plugins/components.ts +0 -19
- package/dist/templates/angular/scripts/generate-component-factory/plugins/packages.ts +0 -29
- package/dist/templates/angular/scripts/generate-component-factory/template.ts +0 -46
- package/dist/templates/angular/scripts/generate-plugins.ts +0 -33
- package/dist/templates/angular/scripts/temp/gitignore +0 -2
- package/dist/templates/angular/server.exports.ts +0 -13
- package/dist/templates/angular/src/app/lib/config.ts +0 -16
- package/dist/templates/angular/src/app/lib/graphql-client-factory/config.ts +0 -21
- package/dist/templates/angular/src/app/lib/graphql-client-factory/index.ts +0 -16
- package/dist/templates/angular/src/app/routing/scripts/scripts.component.html +0 -1
- package/dist/templates/angular/src/app/routing/scripts/scripts.component.ts +0 -7
- package/dist/templates/angular/src/app/routing/scripts/scripts.module.ts +0 -8
- package/dist/templates/angular-sxp/.env +0 -2
- package/dist/templates/angular-sxp/package.json +0 -12
- package/dist/templates/angular-sxp/proxy.conf.js +0 -43
- package/dist/templates/angular-sxp/scripts/config/plugins/disconnected.ts +0 -29
- package/dist/templates/angular-sxp/src/app/components/app-components.shared.module.ts +0 -35
- package/dist/templates/angular-sxp/src/app/routing/navigation/navigation.component.html +0 -23
- package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.component.html +0 -3
- package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.module.ts +0 -9
- package/dist/templates/angular-sxp/src/graphql-fragment-types.ts +0 -219
- package/dist/templates/angular-xmcloud/.env +0 -21
- package/dist/templates/angular-xmcloud/angular.json +0 -33
- package/dist/templates/angular-xmcloud/package.json +0 -17
- package/dist/templates/angular-xmcloud/scripts/bootstrap.ts +0 -28
- package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +0 -39
- package/dist/templates/angular-xmcloud/scripts/generate-component-factory/plugins/packages.ts +0 -34
- package/dist/templates/angular-xmcloud/scripts/generate-component-factory/template.ts +0 -57
- package/dist/templates/angular-xmcloud/scripts/generate-metadata.ts +0 -25
- package/dist/templates/angular-xmcloud/scripts/proxy-build.ts +0 -15
- package/dist/templates/angular-xmcloud/server.exports.ts +0 -24
- package/dist/templates/angular-xmcloud/src/app/components/app-components.shared.module.ts +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.html +0 -5
- package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.ts +0 -40
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +0 -14
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.ts +0 -30
- package/dist/templates/angular-xmcloud/src/app/components/image/image.component.html +0 -36
- package/dist/templates/angular-xmcloud/src/app/components/image/image.component.ts +0 -67
- package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.html +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.ts +0 -41
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.html +0 -23
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.ts +0 -65
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.html +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.ts +0 -49
- package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.html +0 -5
- package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.ts +0 -39
- package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.html +0 -1
- package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.html +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.ts +0 -13
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +0 -8
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.ts +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.html +0 -11
- package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.ts +0 -35
- package/dist/templates/angular-xmcloud/src/app/components/sxa.component.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/title/title.component.html +0 -10
- package/dist/templates/angular-xmcloud/src/app/components/title/title.component.ts +0 -56
- package/dist/templates/angular-xmcloud/src/app/jss-link.service.ts +0 -55
- package/dist/templates/angular-xmcloud/src/app/lib/config.ts +0 -17
- package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory/config.ts +0 -58
- package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.html +0 -38
- package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.ts +0 -104
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/cdp-page-view.component.ts +0 -77
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/cloud-sdk-init.component.ts +0 -48
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.component.html +0 -5
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.module.ts +0 -12
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_component.scss +0 -48
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_container.scss +0 -64
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_fonts.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_footer.scss +0 -31
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_header.scss +0 -51
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_navigation.scss +0 -150
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_promo.scss +0 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_rich-text.scss +0 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_variables.scss +0 -10
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/main.scss +0 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/main.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/_app.scss +0 -103
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_functions.scss +0 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_mixins.scss +0 -121
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_vars.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_colors.scss +0 -283
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_fontSizes.scss +0 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_margins.scss +0 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/_fonts.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/index.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/_link-button.scss +0 -26
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_inputs.scss +0 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_links.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_ui-datepicker.scss +0 -7
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext-files-icons.scss +0 -86
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext.scss +0 -101
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/index.scss +0 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/_typehead.scss +0 -95
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-column-splitter.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-container.scss +0 -27
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-image.scss +0 -18
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-navigation.scss +0 -51
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-promo.scss +0 -42
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-richtext-content.scss +0 -19
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_alignment.scss +0 -26
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_boxed.scss +0 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_clearfix.scss +0 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_highlighted.scss +0 -63
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_link-button.scss +0 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_promoted-box.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/index.scss +0 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_bordered.scss +0 -24
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_title-row-box.scss +0 -66
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/_image-default-size.scss +0 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-left.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-right.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/index.scss +0 -17
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_acaindent.scss +0 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_background.scss +0 -27
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_component-link-list.scss +0 -45
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_list-vertical.scss +0 -20
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/index.scss +0 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-fat.scss +0 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-main-horizontal-vertical.scss +0 -176
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-mobile.scss +0 -85
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-sidebar.scss +0 -29
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_sitemap-navigation.scss +0 -20
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/index.scss +0 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_absolute-bottom-link.scss +0 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-hero.scss +0 -40
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-shadow.scss +0 -42
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/index.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/_rich-text-lists.scss +0 -63
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_background-colors.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_indent.scss +0 -13
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/index.scss +0 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/_component-title.scss +0 -30
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/main.scss +0 -4
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/index.scss +0 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/link-list/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/navigation/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/page-content/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/promo/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/rich-text/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/title/index.scss +0 -0
- package/dist/templates/node-headless-ssr-experience-edge/gitignore +0 -19
- package/dist/templates/node-headless-ssr-proxy/gitignore +0 -19
- package/dist/templates/node-xmcloud-proxy/.env +0 -14
- package/dist/templates/node-xmcloud-proxy/README.md +0 -36
- package/dist/templates/node-xmcloud-proxy/gitignore +0 -33
- package/dist/templates/node-xmcloud-proxy/package.json +0 -26
- package/dist/templates/node-xmcloud-proxy/src/config.ts +0 -25
- package/dist/templates/node-xmcloud-proxy/src/index.ts +0 -210
- package/dist/templates/node-xmcloud-proxy/src/types.ts +0 -27
- package/dist/templates/node-xmcloud-proxy/tsconfig.json +0 -22
- /package/dist/templates/{angular-sxp → angular}/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/component-content/gitignore +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ContentListField/Item1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ContentListField/Item2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/EditFrameDemo/Item1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/EditFrameDemo/Item2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ItemLinkField/Item1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ItemLinkField/Item2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/gitignore +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/dictionary/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/dictionary/{{language}}.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/media/files/jss.pdf +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/media/img/jss_logo.png +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/media/img/sc_logo.png +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/sample-1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/sample-2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/custom-route-type/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/{{language}}.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/{{language}}.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/scripts/disconnected-mode-proxy.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/scripts/lint-yml.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/config/{{appName}}.config +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/component-content.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Reuse.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Tabs-Tab.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Tabs.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Multilingual.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Section.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/content-block.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-connected-demo.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-layout.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-angular-lazy-loading.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-component-params.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-custom-route-type.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-edit-frame.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-checkbox.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-content-list.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-custom.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-date.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-file.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-image.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-item-link.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-link.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-number.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-rich-text.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-text.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-route-fields.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-sitecore-context.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-tracking.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/config.js +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/content.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/dictionary.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/placeholders.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/routes.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/Styleguide-Explanatory-Component.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-content-list-template.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-edit-frame-list-item-template.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-item-link-template.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/gitignore +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/pipelines/example.patch.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.graphql +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-layout/graph-ql-layout.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/shared/styleguide-specimen/styleguide-specimen.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.module.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-component-params/styleguide-component-params.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-component-params/styleguide-component-params.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout/styleguide-layout.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout/styleguide-layout.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-section/styleguide-section.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-section/styleguide-section.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-tracking/styleguide-tracking.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-tracking/styleguide-tracking.component.ts +0 -0
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
const path_1 = __importStar(require("path"));
|
|
39
|
-
const common_1 = require("../../common");
|
|
40
|
-
const proxy_1 = require("../../common/prompts/proxy");
|
|
41
|
-
const inquirer_1 = __importDefault(require("inquirer"));
|
|
42
|
-
const helpers_1 = require("../../common/utils/helpers");
|
|
43
|
-
class AngularXmCloudInitializer {
|
|
44
|
-
get isBase() {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
init(args) {
|
|
48
|
-
var _a, _b, _c, _d;
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const pkg = (0, common_1.openJsonFile)(`${args.destination}${path_1.sep}package.json`);
|
|
51
|
-
const addInitializers = [];
|
|
52
|
-
// angular-xmcloud requires node-xmcloud-proxy
|
|
53
|
-
if (!args.templates.includes('node-xmcloud-proxy')) {
|
|
54
|
-
addInitializers.push('node-xmcloud-proxy');
|
|
55
|
-
}
|
|
56
|
-
// ensure args.proxyAppDestination is populated
|
|
57
|
-
const promptArgs = {
|
|
58
|
-
yes: args.yes,
|
|
59
|
-
destination: args.destination,
|
|
60
|
-
proxyName: 'node-xmcloud-proxy',
|
|
61
|
-
proxyAppDestination: args.proxyAppDestination,
|
|
62
|
-
};
|
|
63
|
-
const proxyDetails = yield inquirer_1.default.prompt(proxy_1.proxyPrompts, promptArgs);
|
|
64
|
-
args.proxyAppDestination = proxyDetails.proxyAppDestination;
|
|
65
|
-
const finalArgs = Object.assign(Object.assign(Object.assign(Object.assign({}, args), { appName: args.appName || ((_a = pkg === null || pkg === void 0 ? void 0 : pkg.config) === null || _a === void 0 ? void 0 : _a.appName) || common_1.DEFAULT_APPNAME, appPrefix: args.appPrefix || ((_b = pkg === null || pkg === void 0 ? void 0 : pkg.config) === null || _b === void 0 ? void 0 : _b.prefix) || false }), proxyDetails), { relativeProxyAppDestination: (0, helpers_1.getRelativeProxyDestination)(args.destination, args.proxyAppDestination) });
|
|
66
|
-
const templatePath = path_1.default.resolve(__dirname, '../../templates/angular-xmcloud');
|
|
67
|
-
yield (0, common_1.transform)(templatePath, finalArgs);
|
|
68
|
-
if (args.templates.includes('angular-sxp') || ((_d = (_c = pkg.config) === null || _c === void 0 ? void 0 : _c.templates) === null || _d === void 0 ? void 0 : _d.includes('angular-sxp'))) {
|
|
69
|
-
console.log((0, common_1.incompatibleAddonsMsg)('angular-xmcloud', 'angular-sxp'));
|
|
70
|
-
}
|
|
71
|
-
const response = {
|
|
72
|
-
nextSteps: [],
|
|
73
|
-
appName: args.appName || common_1.DEFAULT_APPNAME,
|
|
74
|
-
initializers: addInitializers,
|
|
75
|
-
};
|
|
76
|
-
return response;
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.default = AngularXmCloudInitializer;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const path_1 = __importDefault(require("path"));
|
|
16
|
-
const common_1 = require("../../common");
|
|
17
|
-
class AngularXmCloudInitializer {
|
|
18
|
-
get isBase() {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
init(args) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const templatePath = path_1.default.resolve(__dirname, '../../templates/node-xmcloud-proxy');
|
|
24
|
-
const modifiedArgs = Object.assign(Object.assign({}, args), { destination: args.proxyAppDestination || args.destination });
|
|
25
|
-
yield (0, common_1.transform)(templatePath, modifiedArgs);
|
|
26
|
-
const response = {
|
|
27
|
-
appName: 'node-xmcloud-proxy',
|
|
28
|
-
};
|
|
29
|
-
return response;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.default = AngularXmCloudInitializer;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
-
const plugins = require('scripts/temp/config-plugins');
|
|
3
|
-
import { JssConfig } from 'lib/config';
|
|
4
|
-
|
|
5
|
-
export interface ConfigPlugin {
|
|
6
|
-
/**
|
|
7
|
-
* Detect order when the plugin should be called, e.g. 0 - will be called first (can be a plugin which data is required for other plugins)
|
|
8
|
-
*/
|
|
9
|
-
order: number;
|
|
10
|
-
/**
|
|
11
|
-
* A function which will be called during config generation
|
|
12
|
-
* @param {JssConfig} config Current (accumulated) config
|
|
13
|
-
*/
|
|
14
|
-
exec(config: JssConfig): Promise<JssConfig>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class JssConfigFactory {
|
|
18
|
-
public async create(defaultConfig: JssConfig = {}): Promise<JssConfig> {
|
|
19
|
-
return (Object.values(plugins) as ConfigPlugin[])
|
|
20
|
-
.sort((p1, p2) => p1.order - p2.order)
|
|
21
|
-
.reduce(
|
|
22
|
-
(promise, plugin) => promise.then((config) => plugin.exec(config)),
|
|
23
|
-
Promise.resolve(defaultConfig)
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const jssConfigFactory = new JssConfigFactory();
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { JssConfig } from 'lib/config';
|
|
2
|
-
import { ConfigPlugin } from '..';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This plugin will set computed config props.
|
|
6
|
-
* The "graphQLEndpoint" is an example of making a _computed_ config setting
|
|
7
|
-
* based on other config settings.
|
|
8
|
-
*/
|
|
9
|
-
class ComputedPlugin implements ConfigPlugin {
|
|
10
|
-
// should come after other plugins (but before fallback)
|
|
11
|
-
order = 10;
|
|
12
|
-
|
|
13
|
-
async exec(config: JssConfig) {
|
|
14
|
-
return Object.assign({}, config, {
|
|
15
|
-
graphQLEndpoint:
|
|
16
|
-
config.graphQLEndpoint || `${config.sitecoreApiHost}${config.graphQLEndpointPath}`,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const computedPlugin = new ComputedPlugin();
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { JssConfig } from 'lib/config';
|
|
2
|
-
import { ConfigPlugin } from '..';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This config will set fallback values for properties that were left empty
|
|
6
|
-
* If neither env, nor other places had a proper value, this will ensure a fallback is set
|
|
7
|
-
*/
|
|
8
|
-
class FallbackPlugin implements ConfigPlugin {
|
|
9
|
-
// should always come last
|
|
10
|
-
order = 100;
|
|
11
|
-
|
|
12
|
-
async exec(config: JssConfig) {
|
|
13
|
-
return Object.assign({}, config, {
|
|
14
|
-
defaultLanguage: config.defaultLanguage || 'en',
|
|
15
|
-
<% if (!locals.xmcloud) { -%>
|
|
16
|
-
layoutServiceConfigurationName: config.layoutServiceConfigurationName || 'default',
|
|
17
|
-
<% } -%>
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const fallbackPlugin = new FallbackPlugin();
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { JssConfig } from 'lib/config';
|
|
2
|
-
import { ConfigPlugin } from '..';
|
|
3
|
-
import packageConfig from 'package.json';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This plugin will set config props based on package.json.
|
|
7
|
-
*/
|
|
8
|
-
class PackageJsonPlugin implements ConfigPlugin {
|
|
9
|
-
order = 1;
|
|
10
|
-
|
|
11
|
-
async exec(config: JssConfig) {
|
|
12
|
-
if (!packageConfig.config) return config;
|
|
13
|
-
|
|
14
|
-
return Object.assign({}, config, {
|
|
15
|
-
sitecoreSiteName: config.sitecoreSiteName || packageConfig.config.appName,
|
|
16
|
-
graphQLEndpointPath: config.graphQLEndpointPath || packageConfig.config.graphQLEndpointPath,
|
|
17
|
-
defaultLanguage: config.defaultLanguage || packageConfig.config.language,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const packageJsonPlugin = new PackageJsonPlugin();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { JssConfig } from 'lib/config';
|
|
2
|
-
import { ConfigPlugin } from '..';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This plugin will set config props based on scjssconfig.json.
|
|
6
|
-
* scjssconfig.json may not exist if you've never run `jss setup` (development)
|
|
7
|
-
* or are depending on environment variables instead (production).
|
|
8
|
-
*/
|
|
9
|
-
class ScJssConfigPlugin implements ConfigPlugin {
|
|
10
|
-
order = 1;
|
|
11
|
-
|
|
12
|
-
async exec(config: JssConfig) {
|
|
13
|
-
let scJssConfig;
|
|
14
|
-
try {
|
|
15
|
-
scJssConfig = require('scjssconfig.json');
|
|
16
|
-
} catch (e) {
|
|
17
|
-
return config;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (!scJssConfig) return config;
|
|
21
|
-
|
|
22
|
-
return Object.assign({}, config, {
|
|
23
|
-
sitecoreApiKey: config.sitecoreApiKey || scJssConfig.sitecore?.apiKey,
|
|
24
|
-
sitecoreApiHost: config.sitecoreApiHost || scJssConfig.sitecore?.layoutServiceHost,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const scjssconfigPlugin = new ScJssConfigPlugin();
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const plugins = require('scripts/temp/generate-component-factory-plugins');
|
|
2
|
-
import { PackageDefinition } from '@sitecore-jss/sitecore-jss-dev-tools';
|
|
3
|
-
|
|
4
|
-
export interface ComponentFactoryPluginConfig {
|
|
5
|
-
watch?: boolean;
|
|
6
|
-
packages: PackageDefinition[];
|
|
7
|
-
components: string[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ComponentFactoryPlugin {
|
|
11
|
-
/**
|
|
12
|
-
* Detect order when the plugin should be called, e.g. 0 - will be called first (can be a plugin which data is required for other plugins)
|
|
13
|
-
*/
|
|
14
|
-
order: number;
|
|
15
|
-
/**
|
|
16
|
-
* A function which will be called during component factory generation
|
|
17
|
-
* @param {JssConfig} config Current (accumulated) config
|
|
18
|
-
*/
|
|
19
|
-
exec(config: ComponentFactoryPluginConfig): ComponentFactoryPluginConfig;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/*
|
|
23
|
-
COMPONENT FACTORY GENERATION
|
|
24
|
-
Generates the /src/app/components/app-components.module.ts file which maps Angular components
|
|
25
|
-
to JSS components.
|
|
26
|
-
|
|
27
|
-
The component factory module defines a mapping between a string component name and a Angular component instance.
|
|
28
|
-
When the Sitecore Layout service returns a layout definition, it returns named components.
|
|
29
|
-
This mapping is used to construct the component hierarchy for the layout.
|
|
30
|
-
|
|
31
|
-
NOTE: this script can run in two modes. The default mode, the component factory file is written once.
|
|
32
|
-
But if `--watch` is a process argument, the component factory source folder will be watched,
|
|
33
|
-
and the componentFactory.js rewritten on added or deleted files.
|
|
34
|
-
This is used during `jss start` to pick up new or removed components at runtime.
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
const defaultConfig: ComponentFactoryPluginConfig = {
|
|
38
|
-
watch: process.argv.some(arg => arg === '--watch'),
|
|
39
|
-
packages: [],
|
|
40
|
-
components: [],
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
(Object.values(plugins) as ComponentFactoryPlugin[])
|
|
44
|
-
.sort((p1, p2) => p1.order - p2.order)
|
|
45
|
-
.reduce((config, plugin) => plugin.exec(config), defaultConfig);
|
package/dist/templates/angular/scripts/generate-component-factory/plugins/component-factory.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import chokidar from 'chokidar';
|
|
5
|
-
import { componentFactoryTemplate } from '../template';
|
|
6
|
-
import {
|
|
7
|
-
ComponentFactoryPluginConfig,
|
|
8
|
-
ComponentFactoryPlugin as ComponentFactoryPluginType,
|
|
9
|
-
} from '..';
|
|
10
|
-
|
|
11
|
-
export interface PackageDefinition {
|
|
12
|
-
name: string;
|
|
13
|
-
components: {
|
|
14
|
-
moduleName: string;
|
|
15
|
-
componentName: string;
|
|
16
|
-
}[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const componentFactoryPath = path.resolve('src/app/components/app-components.module.ts');
|
|
20
|
-
const componentRootPath = 'src/app/components';
|
|
21
|
-
|
|
22
|
-
function watchComponentFactory(config: ComponentFactoryPluginConfig) {
|
|
23
|
-
console.log(`Watching for changes to component factory sources in ${componentRootPath}...`);
|
|
24
|
-
|
|
25
|
-
chokidar
|
|
26
|
-
.watch(componentRootPath, { ignoreInitial: true, awaitWriteFinish: true })
|
|
27
|
-
.on('add', writeComponentFactory.bind(null, config))
|
|
28
|
-
.on('unlink', writeComponentFactory.bind(null, config));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function writeComponentFactory(config: ComponentFactoryPluginConfig) {
|
|
32
|
-
const componentFactory = generateComponentFactory(config);
|
|
33
|
-
|
|
34
|
-
console.log(`Writing component factory to ${componentFactoryPath}`);
|
|
35
|
-
|
|
36
|
-
fs.writeFileSync(componentFactoryPath, componentFactory, { encoding: 'utf8' });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function generateComponentFactory(config: ComponentFactoryPluginConfig) {
|
|
40
|
-
// By convention, we expect to find Angular components
|
|
41
|
-
// under /src/app/components/component-name/component-name.component.ts
|
|
42
|
-
// If a component-name.module.ts file exists, we will treat it as lazy loaded.
|
|
43
|
-
// If you'd like to use your own convention, encode it below.
|
|
44
|
-
// NOTE: generating the component factory module is also totally optional,
|
|
45
|
-
// and it can be maintained manually if preferred.
|
|
46
|
-
|
|
47
|
-
const imports: string[] = [];
|
|
48
|
-
const registrations: string[] = [];
|
|
49
|
-
const lazyRegistrations: string[] = [];
|
|
50
|
-
const declarations: string[] = [];
|
|
51
|
-
|
|
52
|
-
config.packages.forEach((p) => {
|
|
53
|
-
const variables = p.components
|
|
54
|
-
.map((c) => {
|
|
55
|
-
registrations.push(`{ name: '${c.componentName}', type: ${c.moduleName} },`);
|
|
56
|
-
config.components.push(c.componentName);
|
|
57
|
-
|
|
58
|
-
return c.moduleName;
|
|
59
|
-
})
|
|
60
|
-
.join(', ');
|
|
61
|
-
imports.push(`import { ${variables} } from '${p.name}'`);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
fs.readdirSync(componentRootPath).forEach((componentFolder) => {
|
|
65
|
-
// ignore ts files in component root folder
|
|
66
|
-
if (componentFolder.endsWith('.ts') || componentFolder === '.gitignore') {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const componentFilePath = path.join(
|
|
71
|
-
componentRootPath,
|
|
72
|
-
componentFolder,
|
|
73
|
-
`${componentFolder}.component.ts`
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
if (!fs.existsSync(componentFilePath)) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const componentFileContents = fs.readFileSync(componentFilePath, 'utf8');
|
|
81
|
-
|
|
82
|
-
// ASSUMPTION: your component should export a class directly that follows Angular conventions,
|
|
83
|
-
// i.e. `export class FooComponent` - so we can detect the component's name for auto registration.
|
|
84
|
-
const componentClassMatch = /export class (.+?)Component\b/g.exec(componentFileContents);
|
|
85
|
-
|
|
86
|
-
if (componentClassMatch === null) {
|
|
87
|
-
console.debug(
|
|
88
|
-
`Component ${componentFilePath} did not seem to export a component class. It will be skipped.`
|
|
89
|
-
);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const componentName = componentClassMatch[1];
|
|
94
|
-
const importVarName = `${componentName}Component`;
|
|
95
|
-
|
|
96
|
-
config.components.push(componentName);
|
|
97
|
-
|
|
98
|
-
// check for lazy loading needs
|
|
99
|
-
const moduleFilePath = path.join(
|
|
100
|
-
componentRootPath,
|
|
101
|
-
componentFolder,
|
|
102
|
-
`${componentFolder}.module.ts`
|
|
103
|
-
);
|
|
104
|
-
const isLazyLoaded = fs.existsSync(moduleFilePath);
|
|
105
|
-
|
|
106
|
-
if (isLazyLoaded) {
|
|
107
|
-
console.debug(`Registering JSS component (lazy) ${componentName}`);
|
|
108
|
-
lazyRegistrations.push(
|
|
109
|
-
`{ path: '${componentName}', loadChildren: () => import('./${componentFolder}/${componentFolder}.module').then(m => m.${componentName}Module) },`
|
|
110
|
-
);
|
|
111
|
-
} else {
|
|
112
|
-
console.debug(`Registering JSS component ${componentName}`);
|
|
113
|
-
imports.push(
|
|
114
|
-
`import { ${importVarName} } from './${componentFolder}/${componentFolder}.component';`
|
|
115
|
-
);
|
|
116
|
-
registrations.push(`{ name: '${componentName}', type: ${importVarName} },`);
|
|
117
|
-
declarations.push(`${importVarName},`);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
return componentFactoryTemplate({
|
|
122
|
-
imports,
|
|
123
|
-
components: config.components,
|
|
124
|
-
registrations,
|
|
125
|
-
lazyRegistrations,
|
|
126
|
-
declarations,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Generates the component factory file.
|
|
132
|
-
*/
|
|
133
|
-
class ComponentFactoryPlugin implements ComponentFactoryPluginType {
|
|
134
|
-
order = 9999;
|
|
135
|
-
|
|
136
|
-
exec(config: ComponentFactoryPluginConfig) {
|
|
137
|
-
if (config.watch) {
|
|
138
|
-
watchComponentFactory(config);
|
|
139
|
-
} else {
|
|
140
|
-
writeComponentFactory(config);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return config;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export const componentFactoryPlugin = new ComponentFactoryPlugin();
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ComponentFactoryPlugin, ComponentFactoryPluginConfig } from '..';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Provides custom components configuration
|
|
5
|
-
*/
|
|
6
|
-
class ComponentsPlugin implements ComponentFactoryPlugin {
|
|
7
|
-
order = 0;
|
|
8
|
-
|
|
9
|
-
exec(config: ComponentFactoryPluginConfig) {
|
|
10
|
-
/**
|
|
11
|
-
* You can specify components which you want to import using custom path
|
|
12
|
-
*/
|
|
13
|
-
config.components = [];
|
|
14
|
-
|
|
15
|
-
return config;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const componentsPlugin = new ComponentsPlugin();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ComponentFactoryPlugin, ComponentFactoryPluginConfig } from '..';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Provides custom packages configuration
|
|
5
|
-
*/
|
|
6
|
-
class PackagesPlugin implements ComponentFactoryPlugin {
|
|
7
|
-
order = 0;
|
|
8
|
-
|
|
9
|
-
exec(config: ComponentFactoryPluginConfig) {
|
|
10
|
-
/**
|
|
11
|
-
* You can specify components which you want to import from external/internal packages
|
|
12
|
-
* in format:
|
|
13
|
-
* {
|
|
14
|
-
* name: 'package name',
|
|
15
|
-
* components: [
|
|
16
|
-
* {
|
|
17
|
-
* componentName: 'component name', // component rendering name,
|
|
18
|
-
* moduleName: 'module name' // component name to import from the package
|
|
19
|
-
* }
|
|
20
|
-
* ]
|
|
21
|
-
* }
|
|
22
|
-
*/
|
|
23
|
-
config.packages = [];
|
|
24
|
-
|
|
25
|
-
return config;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const packagesPlugin = new PackagesPlugin();
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export const componentFactoryTemplate = ({
|
|
2
|
-
imports,
|
|
3
|
-
components,
|
|
4
|
-
registrations,
|
|
5
|
-
lazyRegistrations,
|
|
6
|
-
declarations,
|
|
7
|
-
}: {
|
|
8
|
-
imports: string[];
|
|
9
|
-
components: string[];
|
|
10
|
-
registrations: string[];
|
|
11
|
-
lazyRegistrations: string[];
|
|
12
|
-
declarations: string[];
|
|
13
|
-
}) => `// Do not edit this file, it is auto-generated at build time!
|
|
14
|
-
// See scripts/generate-component-factory/index.ts to modify the generation of this file.
|
|
15
|
-
// Use app-components.shared.module.ts to modify the imports, etc of this module.
|
|
16
|
-
// Note: code-generation is optional! See ./.gitignore for directions to remove it,
|
|
17
|
-
// if you do not want it.
|
|
18
|
-
|
|
19
|
-
import { NgModule } from '@angular/core';
|
|
20
|
-
import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
|
|
21
|
-
import { AppComponentsSharedModule } from './app-components.shared.module';
|
|
22
|
-
${imports.join('\n')}
|
|
23
|
-
|
|
24
|
-
export const components = [
|
|
25
|
-
${components.map((c) => `'${c}'`).join(',\n ')}
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
@NgModule({
|
|
29
|
-
imports: [
|
|
30
|
-
AppComponentsSharedModule,
|
|
31
|
-
JssModule.withComponents([
|
|
32
|
-
${registrations.join('\n ')}
|
|
33
|
-
], [
|
|
34
|
-
${lazyRegistrations.join('\n ')}
|
|
35
|
-
]),
|
|
36
|
-
],
|
|
37
|
-
exports: [
|
|
38
|
-
JssModule,
|
|
39
|
-
AppComponentsSharedModule,
|
|
40
|
-
],
|
|
41
|
-
declarations: [
|
|
42
|
-
${declarations.join('\n ')}
|
|
43
|
-
],
|
|
44
|
-
})
|
|
45
|
-
export class AppComponentsModule { }
|
|
46
|
-
`;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generatePlugins,
|
|
3
|
-
ModuleType,
|
|
4
|
-
PluginDefinition,
|
|
5
|
-
} from '@sitecore-jss/sitecore-jss-dev-tools';
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
PLUGINS GENERATION
|
|
9
|
-
NOTE: pluginName: the name of the plugin in the src/lib folder
|
|
10
|
-
Generates the `/src/temp/{pluginName}-plugins.ts` file, which exports list of plugins
|
|
11
|
-
|
|
12
|
-
Generating the plugins is optional, and it can be maintained manually if preferred.
|
|
13
|
-
|
|
14
|
-
The default convention uses the plugin's filename (without the extension) as the first part of the component
|
|
15
|
-
name. For example, the file `/lib/page-props-factory/plugins/exampleName.ts` would map to plugin `exampleNamePlugin`.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const pluginDefinitions: PluginDefinition[] = [
|
|
19
|
-
{
|
|
20
|
-
distPath: 'scripts/temp/config-plugins.ts',
|
|
21
|
-
rootPath: 'scripts/config/plugins',
|
|
22
|
-
moduleType: ModuleType.ESM,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
distPath: 'scripts/temp/generate-component-factory-plugins.ts',
|
|
26
|
-
rootPath: 'scripts/generate-component-factory/plugins',
|
|
27
|
-
moduleType: ModuleType.ESM,
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
pluginDefinitions.forEach((definition) => {
|
|
32
|
-
generatePlugins(definition);
|
|
33
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { environment } from './src/environments/environment';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Define the required configuration values to be exported from the server.bundle.ts.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const apiKey = environment.sitecoreApiKey;
|
|
8
|
-
const siteName = environment.sitecoreSiteName;
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
apiKey,
|
|
12
|
-
siteName,
|
|
13
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Represents the type of config object available within the generated /environments/environment.js
|
|
3
|
-
*/
|
|
4
|
-
export interface JssConfig extends Record<string, string | boolean | undefined> {
|
|
5
|
-
production?: false;
|
|
6
|
-
sitecoreApiKey?: string;
|
|
7
|
-
sitecoreApiHost?: string;
|
|
8
|
-
sitecoreSiteName?: string;
|
|
9
|
-
defaultLanguage?: string;
|
|
10
|
-
graphQLEndpoint?: string;
|
|
11
|
-
graphQLEndpointPath?: string;
|
|
12
|
-
<% if (!locals.xmcloud) { -%>
|
|
13
|
-
layoutServiceConfigurationName?: string;
|
|
14
|
-
<% } -%>
|
|
15
|
-
defaultServerRoute?: string;
|
|
16
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { GraphQLRequestClientFactoryConfig } from '@sitecore-jss/sitecore-jss-angular/cjs';
|
|
2
|
-
import { environment as env } from '../../../environments/environment';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Gets the configuration for the GraphQLRequestClientFactory
|
|
6
|
-
* @returns GraphQLRequestClientFactoryConfig
|
|
7
|
-
*/
|
|
8
|
-
export const getGraphQLClientFactoryConfig = () => {
|
|
9
|
-
let clientConfig: GraphQLRequestClientFactoryConfig;
|
|
10
|
-
|
|
11
|
-
if (env.graphQLEndpoint && env.sitecoreApiKey) {
|
|
12
|
-
clientConfig = {
|
|
13
|
-
endpoint: env.graphQLEndpoint,
|
|
14
|
-
apiKey: env.sitecoreApiKey,
|
|
15
|
-
};
|
|
16
|
-
} else {
|
|
17
|
-
throw new Error('Please configure your graphQLEndpoint and sitecoreApiKey.');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return clientConfig;
|
|
21
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { GraphQLRequestClient } from '@sitecore-jss/sitecore-jss-angular/cjs';
|
|
2
|
-
import { getGraphQLClientFactoryConfig } from './config';
|
|
3
|
-
|
|
4
|
-
// The GraphQLRequestClientFactory serves as the central hub for executing GraphQL requests within the application
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Creates a new GraphQLRequestClientFactory instance
|
|
8
|
-
* @returns GraphQLRequestClientFactory instance
|
|
9
|
-
*/
|
|
10
|
-
const createGraphQLClientFactory = () => {
|
|
11
|
-
const clientConfig = getGraphQLClientFactoryConfig();
|
|
12
|
-
|
|
13
|
-
return GraphQLRequestClient.createClientFactory(clientConfig);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default createGraphQLClientFactory();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div></div>
|