create-sitecore-jss 22.2.0-canary.9 → 22.2.1-canary.1
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 +28 -70
- package/dist/common/index.js +3 -5
- package/dist/common/processes/install.js +2 -9
- package/dist/common/processes/next.js +3 -3
- package/dist/common/processes/transform.js +14 -29
- package/dist/common/prompts/base.js +12 -0
- package/dist/common/utils/helpers.js +43 -28
- 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 -5
- package/dist/templates/angular/README.md +45 -5
- package/dist/templates/angular/angular.json +6 -1
- package/dist/templates/angular/package.json +20 -10
- package/dist/templates/angular/proxy.conf.js +23 -5
- package/dist/templates/angular/scripts/bootstrap.ts +24 -5
- package/dist/templates/angular/scripts/generate-config.ts +73 -53
- package/dist/templates/angular/scripts/update-graphql-fragment-data.ts +2 -4
- package/dist/templates/angular/server.bundle.ts +1 -19
- package/dist/templates/angular/src/app/app.module.ts +2 -0
- package/dist/templates/angular/src/app/components/app-components.shared.module.ts +19 -4
- package/dist/templates/angular/src/app/jss-context.server-side.service.ts +2 -0
- package/dist/templates/{angular-sxp → angular}/src/app/jss-data-fetcher.service.ts +1 -3
- package/dist/templates/angular/src/app/lib/dictionary-service-factory.ts +13 -21
- 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 +2 -1
- 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/graphql-fragment-types.ts +95 -0
- package/dist/templates/angular/tsconfig.json +2 -7
- package/dist/templates/nextjs/package.json +5 -5
- package/dist/templates/nextjs/src/lib/page-props-factory/plugins/component-props.ts +2 -1
- package/dist/templates/nextjs-styleguide/package.json +1 -1
- package/dist/templates/nextjs-sxa/src/components/Container.tsx +6 -14
- package/dist/templates/nextjs-xmcloud/package.json +3 -2
- package/dist/templates/nextjs-xmcloud/src/Bootstrap.tsx +25 -10
- package/dist/templates/nextjs-xmcloud/src/byoc/{index.ts → index.tsx} +25 -8
- package/dist/templates/nextjs-xmcloud/src/components/CdpPageView.tsx +9 -14
- package/dist/templates/nextjs-xmcloud/src/lib/middleware/plugins/personalize.ts +0 -1
- package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/component-themes.ts +2 -1
- package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/preview-mode.ts +2 -1
- package/dist/templates/node-headless-ssr-experience-edge/package.json +2 -2
- package/dist/templates/node-headless-ssr-proxy/package.json +3 -3
- package/dist/templates/react/package.json +5 -5
- package/dist/templates/react-native/package.json +4 -4
- package/dist/templates/vue/package.json +4 -4
- package/package.json +2 -2
- package/dist/common/prompts/sxp.js +0 -20
- package/dist/initializers/angular-sxp/index.js +0 -62
- package/dist/initializers/angular-xmcloud/index.js +0 -66
- package/dist/initializers/node-xmcloud-proxy/index.js +0 -32
- 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 -23
- 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-plugins.ts +0 -28
- package/dist/templates/angular/scripts/temp/gitignore +0 -2
- package/dist/templates/angular/src/app/lib/config.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/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 -27
- 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 -8
- package/dist/templates/angular-xmcloud/angular.json +0 -34
- package/dist/templates/angular-xmcloud/package.json +0 -15
- package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +0 -23
- package/dist/templates/angular-xmcloud/scripts/proxy-build.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.ts +0 -30
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +0 -13
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.ts +0 -16
- package/dist/templates/angular-xmcloud/src/app/components/sxa.component.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/lib/config.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory.ts +0 -44
- 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 -49
- 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 -4
- 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/nextjs-xmcloud/src/lib/context/index.ts +0 -22
- package/dist/templates/nextjs-xmcloud/src/lib/context/sdk/events.ts +0 -26
- package/dist/templates/node-xmcloud-proxy/.env +0 -8
- package/dist/templates/node-xmcloud-proxy/README.md +0 -36
- package/dist/templates/node-xmcloud-proxy/package.json +0 -25
- package/dist/templates/node-xmcloud-proxy/src/config.ts +0 -19
- package/dist/templates/node-xmcloud-proxy/src/index.ts +0 -161
- package/dist/templates/node-xmcloud-proxy/src/types.ts +0 -59
- 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/graph-ql-layout/graph-ql-layout.component.ts +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
- /package/dist/templates/angular/src/app/lib/{graphql-client-factory.ts → client-factory.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
3
|
"description": "Application utilizing Sitecore JavaScript Services and React (create-react-app).",
|
|
4
|
-
"version": "22.2.
|
|
4
|
+
"version": "22.2.1-canary",
|
|
5
5
|
"private": true,
|
|
6
6
|
"config": {
|
|
7
7
|
"appName": "<%- appName %>",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@apollo/client": "^3.7.1",
|
|
31
|
-
"@sitecore-jss/sitecore-jss-react": "~22.2.
|
|
31
|
+
"@sitecore-jss/sitecore-jss-react": "~22.2.1-canary",
|
|
32
32
|
"axios": "^1.2.0",
|
|
33
33
|
"bootstrap": "^5.2.3",
|
|
34
34
|
"cross-fetch": "^3.1.5",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@babel/preset-env": "^7.20.2",
|
|
54
54
|
"@babel/preset-react": "^7.18.6",
|
|
55
55
|
"@babel/register": "~7.18.9",
|
|
56
|
-
"@sitecore-jss/sitecore-jss-cli": "~22.2.
|
|
57
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.
|
|
58
|
-
"@sitecore-jss/sitecore-jss-rendering-host": "~22.2.
|
|
56
|
+
"@sitecore-jss/sitecore-jss-cli": "~22.2.1-canary",
|
|
57
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.1-canary",
|
|
58
|
+
"@sitecore-jss/sitecore-jss-rendering-host": "~22.2.1-canary",
|
|
59
59
|
"babel-loader": "~9.1.0",
|
|
60
60
|
"babel-preset-react-app": "~10.0.1",
|
|
61
61
|
"chalk": "~4.1.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.1-canary",
|
|
4
4
|
"description": "A basic React Native app utilizing Sitecore JavaScript Services",
|
|
5
5
|
"config": {
|
|
6
6
|
"appName": "<%- appName %>",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@react-native-community/masked-view": "^0.1.10",
|
|
26
|
-
"@sitecore-jss/sitecore-jss-react-native": "~22.2.
|
|
26
|
+
"@sitecore-jss/sitecore-jss-react-native": "~22.2.1-canary",
|
|
27
27
|
"prop-types": "^15.6.0",
|
|
28
28
|
"react": "16.13.1",
|
|
29
29
|
"react-native": "^0.63.4",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"private": true,
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@sitecore-jss/sitecore-jss-cli": "~22.2.
|
|
41
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.
|
|
40
|
+
"@sitecore-jss/sitecore-jss-cli": "~22.2.1-canary",
|
|
41
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.1-canary",
|
|
42
42
|
"babel-core": "^6.26.0",
|
|
43
43
|
"babel-eslint": "^8.2.1",
|
|
44
44
|
"babel-plugin-inline-replace-variables": "^1.3.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.1-canary",
|
|
4
4
|
"description": "Application utilizing Sitecore JavaScript Services and Vue (vue-cli).",
|
|
5
5
|
"private": true,
|
|
6
6
|
"config": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@apollo/client": "^3.7.4",
|
|
47
47
|
"@panter/vue-i18next": "~0.15.2",
|
|
48
|
-
"@sitecore-jss/sitecore-jss-vue": "~22.2.
|
|
48
|
+
"@sitecore-jss/sitecore-jss-vue": "~22.2.1-canary",
|
|
49
49
|
"@vue/apollo-composable": "4.0.0-beta.2",
|
|
50
50
|
"@vue/apollo-option": "^4.0.0-alpha.20",
|
|
51
51
|
"@vue/apollo-ssr": "^4.0.0-alpha.18",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@babel/eslint-parser": "^7.19.1",
|
|
66
66
|
"@babel/register": "7.18.9",
|
|
67
|
-
"@sitecore-jss/sitecore-jss-cli": "~22.2.
|
|
68
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.
|
|
67
|
+
"@sitecore-jss/sitecore-jss-cli": "~22.2.1-canary",
|
|
68
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.1-canary",
|
|
69
69
|
"@vue/cli-plugin-babel": "~5.0.8",
|
|
70
70
|
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
71
71
|
"@vue/cli-service": "~5.0.8",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.1-canary.1",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"ts-node": "^10.9.1",
|
|
64
64
|
"typescript": "~4.9.5"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "74995e778ae28463d857b92a8ea5051333c18795"
|
|
67
67
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sxpPrompts = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Set of CLI prompts for an SXP app
|
|
6
|
-
*/
|
|
7
|
-
exports.sxpPrompts = [
|
|
8
|
-
{
|
|
9
|
-
type: 'input',
|
|
10
|
-
name: 'hostName',
|
|
11
|
-
message: 'What is your Sitecore hostname (used if deployed to Sitecore)?',
|
|
12
|
-
default: (answers) => `${answers.appName}.dev.local`,
|
|
13
|
-
when: (answers) => {
|
|
14
|
-
if (answers.yes && !answers.hostName) {
|
|
15
|
-
answers.hostName = `${answers.appName}.dev.local`;
|
|
16
|
-
}
|
|
17
|
-
return !answers.hostName;
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
];
|
|
@@ -1,62 +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 inquirer_1 = __importDefault(require("inquirer"));
|
|
41
|
-
class AngularSxpInitializer {
|
|
42
|
-
get isBase() {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
init(args) {
|
|
46
|
-
var _a, _b;
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const pkg = (0, common_1.openJsonFile)(`${args.destination}${path_1.sep}package.json`);
|
|
49
|
-
const answers = yield inquirer_1.default.prompt(common_1.sxpPrompts, args);
|
|
50
|
-
const styleguideAnswers = yield inquirer_1.default.prompt(common_1.styleguidePrompts, args);
|
|
51
|
-
const mergedArgs = 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 }), answers), styleguideAnswers);
|
|
52
|
-
const templatePath = path_1.default.resolve(__dirname, '../../templates/angular-sxp');
|
|
53
|
-
yield (0, common_1.transform)(templatePath, mergedArgs);
|
|
54
|
-
const response = {
|
|
55
|
-
nextSteps: [],
|
|
56
|
-
appName: mergedArgs.appName,
|
|
57
|
-
};
|
|
58
|
-
return response;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.default = AngularSxpInitializer;
|
|
@@ -1,66 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
const path_1 = __importStar(require("path"));
|
|
36
|
-
const common_1 = require("../../common");
|
|
37
|
-
const helpers_1 = require("../../common/utils/helpers");
|
|
38
|
-
class AngularXmCloudInitializer {
|
|
39
|
-
get isBase() {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
init(args) {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const pkg = (0, common_1.openJsonFile)(`${args.destination}${path_1.sep}package.json`);
|
|
46
|
-
const addInitializers = [];
|
|
47
|
-
// when installing proxy alongside main app, have a separate path ready
|
|
48
|
-
if (!args.proxyAppDestination) {
|
|
49
|
-
args.proxyAppDestination = (0, helpers_1.getDefaultProxyDestination)(args.destination, 'node-xmcloud-proxy');
|
|
50
|
-
}
|
|
51
|
-
if (!args.templates.includes('node-xmcloud-proxy')) {
|
|
52
|
-
addInitializers.push('node-xmcloud-proxy');
|
|
53
|
-
}
|
|
54
|
-
const mergedArgs = 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 });
|
|
55
|
-
const templatePath = path_1.default.resolve(__dirname, '../../templates/angular-xmcloud');
|
|
56
|
-
yield (0, common_1.transform)(templatePath, mergedArgs);
|
|
57
|
-
const response = {
|
|
58
|
-
nextSteps: [],
|
|
59
|
-
appName: args.appName || common_1.DEFAULT_APPNAME,
|
|
60
|
-
initializers: addInitializers,
|
|
61
|
-
};
|
|
62
|
-
return response;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.default = AngularXmCloudInitializer;
|
|
@@ -1,32 +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
|
-
yield (0, common_1.transform)(templatePath, args);
|
|
25
|
-
const response = {
|
|
26
|
-
appName: 'node-xmcloud-proxy',
|
|
27
|
-
};
|
|
28
|
-
return response;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
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,23 +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
|
-
sitecoreApiKey: config.sitecoreApiKey || 'no-api-key-set',
|
|
16
|
-
<% if (!locals.xmcloud) { -%>
|
|
17
|
-
layoutServiceConfigurationName: config.layoutServiceConfigurationName || 'default',
|
|
18
|
-
<% } -%>
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
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,28 +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
|
-
|
|
26
|
-
pluginDefinitions.forEach((definition) => {
|
|
27
|
-
generatePlugins(definition);
|
|
28
|
-
});
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
<div></div>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"scripts": {
|
|
3
|
-
"start": "cross-env-shell JSS_MODE=disconnected \"npm-run-all --serial bootstrap --parallel start:angular start:proxy start:watch-components\"",
|
|
4
|
-
"start:proxy": "ts-node --project src/tsconfig.webpack-server.json scripts/disconnected-mode-proxy.ts",
|
|
5
|
-
"lint:yml": "ts-node ./scripts/lint-yml.ts",
|
|
6
|
-
"lint": "ng lint <%- appName %> --fix && npm run lint:yml",
|
|
7
|
-
"scaffold": "ng generate @sitecore-jss/sitecore-jss-angular-schematics:jss-component"
|
|
8
|
-
},
|
|
9
|
-
"devDependencies": {
|
|
10
|
-
"yaml-lint": "^1.2.4"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
When the app runs in disconnected mode, and Sitecore is not present, we need to give
|
|
3
|
-
the app copies of the Sitecore APIs it depends on (layout service, dictionary service, content service)
|
|
4
|
-
to talk to so that the app can run using the locally defined disconnected data.
|
|
5
|
-
|
|
6
|
-
When the app runs in connected mode, Sitecore is present and some of the requests should be
|
|
7
|
-
proxied to the Sitecore API
|
|
8
|
-
|
|
9
|
-
This is accomplished by spinning up a small Express server that mocks the APIs, and then
|
|
10
|
-
telling angular-cli to proxy requests to the API paths to this express instance.
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
const constants = require('@sitecore-jss/sitecore-jss-angular/cjs').constants;
|
|
14
|
-
const environment = require('./src/environments/environment.js').environment;
|
|
15
|
-
|
|
16
|
-
const port = 3043;
|
|
17
|
-
|
|
18
|
-
const PROXY_CONFIG =
|
|
19
|
-
process.env.JSS_MODE === constants.JSS_MODE.DISCONNECTED
|
|
20
|
-
? [
|
|
21
|
-
{
|
|
22
|
-
context: ['/data', '/sitecore'],
|
|
23
|
-
target: `http://localhost:${port}`,
|
|
24
|
-
secure: false,
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
: [
|
|
28
|
-
{
|
|
29
|
-
context: [
|
|
30
|
-
// API endpoints
|
|
31
|
-
'/sitecore',
|
|
32
|
-
// media items
|
|
33
|
-
'/-',
|
|
34
|
-
// visitor identification
|
|
35
|
-
'/layouts',
|
|
36
|
-
],
|
|
37
|
-
target: environment.sitecoreApiHost,
|
|
38
|
-
secure: false,
|
|
39
|
-
changeOrigin: true,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
module.exports = PROXY_CONFIG;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { JssConfig } from 'lib/config';
|
|
2
|
-
import { ConfigPlugin } from '..';
|
|
3
|
-
import { constants } from '@sitecore-jss/sitecore-jss-angular/cjs';
|
|
4
|
-
const chalk = require('chalk');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This plugin will check if fetchwith graphgl is beeing used in disconnected mode and throw error if so
|
|
8
|
-
*/
|
|
9
|
-
class DisconnectedPlugin implements ConfigPlugin {
|
|
10
|
-
// should come before other plugins
|
|
11
|
-
order = 0;
|
|
12
|
-
|
|
13
|
-
async exec(config: JssConfig) {
|
|
14
|
-
const disconnected = process.env.JSS_MODE === constants.JSS_MODE.DISCONNECTED;
|
|
15
|
-
if (disconnected && process.env.FETCH_WITH === constants.FETCH_WITH.GRAPHQL) {
|
|
16
|
-
throw new Error(
|
|
17
|
-
chalk.red(
|
|
18
|
-
'GraphQL requests to Dictionary and Layout services are not supported in disconnected mode.'
|
|
19
|
-
)
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return config;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const disconnectedPlugin = new DisconnectedPlugin();
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
-
import { RouterModule } from '@angular/router';
|
|
6
|
-
import { StyleguideSpecimenComponent } from './shared/styleguide-specimen/styleguide-specimen.component';
|
|
7
|
-
import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
This module is imported by the generated app-components.module.ts.
|
|
11
|
-
You can use this module to provide shared Angular components that are not
|
|
12
|
-
JSS components, etc to the generated module.
|
|
13
|
-
|
|
14
|
-
Don't want code generation? See ./.gitignore for instructions to turn it off.
|
|
15
|
-
*/
|
|
16
|
-
@NgModule({
|
|
17
|
-
imports: [
|
|
18
|
-
CommonModule,
|
|
19
|
-
TranslateModule,
|
|
20
|
-
RouterModule,
|
|
21
|
-
JssModule,
|
|
22
|
-
FormsModule,
|
|
23
|
-
],
|
|
24
|
-
exports: [
|
|
25
|
-
CommonModule,
|
|
26
|
-
TranslateModule,
|
|
27
|
-
RouterModule,
|
|
28
|
-
FormsModule,
|
|
29
|
-
StyleguideSpecimenComponent
|
|
30
|
-
],
|
|
31
|
-
declarations: [
|
|
32
|
-
StyleguideSpecimenComponent
|
|
33
|
-
],
|
|
34
|
-
})
|
|
35
|
-
export class AppComponentsSharedModule { }
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom"
|
|
3
|
-
>
|
|
4
|
-
<h5 class="my-0 me-md-auto fw-normal">
|
|
5
|
-
<a routerLink="/" class="text-dark" class="logo"></a>
|
|
6
|
-
</h5>
|
|
7
|
-
<nav class="my-2 my-md-0 me-md-3">
|
|
8
|
-
<a
|
|
9
|
-
class="p-2 text-dark"
|
|
10
|
-
href="https://jss.sitecore.com"
|
|
11
|
-
target="_blank"
|
|
12
|
-
rel="noopener noreferrer"
|
|
13
|
-
>
|
|
14
|
-
{{ 'Documentation' | translate }}
|
|
15
|
-
</a>
|
|
16
|
-
<a routerLink="/styleguide" class="p-2 text-dark">
|
|
17
|
-
{{ 'Styleguide' | translate }}
|
|
18
|
-
</a>
|
|
19
|
-
<a routerLink="/graphql" class="p-2 text-dark">
|
|
20
|
-
{{ 'GraphQL' | translate }}
|
|
21
|
-
</a>
|
|
22
|
-
</nav>
|
|
23
|
-
</div>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { ScriptsComponent } from './scripts.component';
|
|
3
|
-
import { VisitorIdentificationComponent } from './visitor-identification/visitor-identification.component';
|
|
4
|
-
|
|
5
|
-
@NgModule({
|
|
6
|
-
exports: [ScriptsComponent],
|
|
7
|
-
declarations: [ScriptsComponent, VisitorIdentificationComponent],
|
|
8
|
-
})
|
|
9
|
-
export class ScriptsModule {}
|