create-sitecore-jss 22.2.0-canary.80 → 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.
Files changed (368) hide show
  1. package/dist/bin.js +19 -35
  2. package/dist/common/index.js +3 -5
  3. package/dist/common/processes/install.js +2 -9
  4. package/dist/common/processes/next.js +3 -6
  5. package/dist/common/processes/transform.js +13 -18
  6. package/dist/common/prompts/base.js +25 -0
  7. package/dist/common/utils/helpers.js +19 -29
  8. package/dist/init-runner.js +11 -16
  9. package/dist/initializers/angular/index.js +0 -13
  10. package/dist/initializers/angular/prompts.js +1 -22
  11. package/dist/initializers/nextjs/index.js +2 -2
  12. package/dist/initializers/nextjs/prompts.js +0 -2
  13. package/dist/initializers/nextjs/remove-dev-dependencies.js +2 -2
  14. package/dist/initializers/nextjs-multisite/index.js +1 -1
  15. package/dist/initializers/nextjs-styleguide/index.js +1 -1
  16. package/dist/initializers/nextjs-styleguide-tracking/index.js +1 -1
  17. package/dist/initializers/nextjs-sxa/index.js +1 -1
  18. package/dist/initializers/nextjs-xmcloud/index.js +1 -1
  19. package/dist/initializers/react/index.js +3 -3
  20. package/dist/initializers/react/prompts.js +1 -1
  21. package/dist/initializers/react-native/prompts.js +0 -1
  22. package/dist/initializers/vue/prompts.js +1 -1
  23. package/dist/templates/angular/.env +3 -4
  24. package/dist/templates/angular/.eslintrc +0 -1
  25. package/dist/templates/angular/README.md +45 -5
  26. package/dist/templates/angular/angular.json +6 -1
  27. package/dist/templates/angular/gitignore +0 -5
  28. package/dist/templates/angular/package.json +18 -6
  29. package/dist/templates/angular/proxy.conf.js +23 -5
  30. package/dist/templates/angular/scripts/bootstrap.ts +24 -5
  31. package/dist/templates/angular/scripts/generate-component-factory.ts +166 -0
  32. package/dist/templates/angular/scripts/generate-config.ts +72 -71
  33. package/dist/templates/angular/scripts/update-graphql-fragment-data.ts +28 -21
  34. package/dist/templates/angular/server.bundle.ts +5 -3
  35. package/dist/templates/angular/src/app/JssState.ts +9 -2
  36. package/dist/templates/angular/src/app/app.module.ts +6 -5
  37. package/dist/templates/angular/src/app/app.server.module.ts +6 -9
  38. package/dist/templates/angular/src/app/components/app-components.shared.module.ts +19 -4
  39. package/dist/templates/angular/src/app/components/gitignore +1 -1
  40. package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-layout/graph-ql-layout.component.ts +1 -1
  41. package/dist/templates/angular/src/app/i18n/jss-translation-client-loader.service.ts +7 -15
  42. package/dist/templates/angular/src/app/i18n/jss-translation-server-loader.service.ts +2 -14
  43. package/dist/templates/angular/src/app/jss-context.server-side.service.ts +4 -4
  44. package/dist/templates/angular/src/app/jss-context.service.ts +11 -14
  45. package/dist/templates/{angular-sxp → angular}/src/app/jss-data-fetcher.service.ts +1 -3
  46. package/dist/templates/angular/src/app/jss-graphql.service.ts +7 -7
  47. package/dist/templates/angular/src/app/layout/jss-layout.service.ts +2 -2
  48. package/dist/templates/angular/src/app/lib/client-factory.ts +28 -0
  49. package/dist/templates/angular/src/app/lib/dictionary-service-factory.ts +13 -24
  50. package/dist/templates/angular/src/app/lib/layout-service-factory.ts +12 -20
  51. package/dist/templates/angular/src/app/routing/layout/layout.component.html +1 -1
  52. package/dist/templates/angular/src/app/routing/layout/layout.component.ts +11 -11
  53. package/dist/templates/angular/src/app/routing/navigation/navigation.component.html +6 -5
  54. package/dist/templates/angular/src/app/routing/navigation/navigation.component.ts +2 -1
  55. package/dist/templates/angular/src/app/routing/routing.module.ts +21 -14
  56. package/dist/templates/{angular-sxp/src/app/routing/scripts → angular/src/app/routing}/visitor-identification/visitor-identification.component.ts +3 -9
  57. package/dist/templates/angular/src/environments/gitignore +1 -2
  58. package/dist/templates/angular/src/graphql-fragment-types.ts +95 -0
  59. package/dist/templates/angular/tsconfig.json +2 -7
  60. package/dist/templates/nextjs/scripts/config/plugins/fallback.ts +1 -0
  61. package/dist/templates/nextjs/scripts/generate-config.ts +1 -8
  62. package/dist/templates/nextjs-styleguide/scripts/config/plugins/disconnected.ts +0 -1
  63. package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_alignment.scss +7 -34
  64. package/dist/templates/nextjs-xmcloud/package.json +3 -2
  65. package/dist/templates/nextjs-xmcloud/src/Bootstrap.tsx +25 -10
  66. package/dist/templates/nextjs-xmcloud/src/byoc/{index.ts → index.tsx} +25 -8
  67. package/dist/templates/nextjs-xmcloud/src/components/CdpPageView.tsx +9 -14
  68. package/dist/templates/node-headless-ssr-proxy/src/config.ts +3 -3
  69. package/dist/templates/node-headless-ssr-proxy/src/httpAgents.ts +2 -2
  70. package/dist/templates/node-headless-ssr-proxy/src/index.ts +2 -9
  71. package/dist/templates/react/scripts/generate-config.js +3 -10
  72. package/dist/templates/vue/scripts/generate-config.js +0 -5
  73. package/package.json +2 -2
  74. package/dist/common/prompts/proxy.js +0 -35
  75. package/dist/common/prompts/sxp.js +0 -34
  76. package/dist/initializers/angular-sxp/index.js +0 -62
  77. package/dist/initializers/angular-xmcloud/index.js +0 -80
  78. package/dist/initializers/node-xmcloud-proxy/index.js +0 -33
  79. package/dist/templates/angular/scripts/config/index.ts +0 -28
  80. package/dist/templates/angular/scripts/config/plugins/computed.ts +0 -21
  81. package/dist/templates/angular/scripts/config/plugins/fallback.ts +0 -22
  82. package/dist/templates/angular/scripts/config/plugins/package-json.ts +0 -22
  83. package/dist/templates/angular/scripts/config/plugins/scjssconfig.ts +0 -29
  84. package/dist/templates/angular/scripts/generate-component-factory/index.ts +0 -45
  85. package/dist/templates/angular/scripts/generate-component-factory/plugins/component-factory.ts +0 -147
  86. package/dist/templates/angular/scripts/generate-component-factory/plugins/components.ts +0 -19
  87. package/dist/templates/angular/scripts/generate-component-factory/plugins/packages.ts +0 -29
  88. package/dist/templates/angular/scripts/generate-component-factory/template.ts +0 -46
  89. package/dist/templates/angular/scripts/generate-plugins.ts +0 -33
  90. package/dist/templates/angular/scripts/temp/gitignore +0 -2
  91. package/dist/templates/angular/server.exports.ts +0 -13
  92. package/dist/templates/angular/src/app/lib/config.ts +0 -16
  93. package/dist/templates/angular/src/app/lib/graphql-client-factory/config.ts +0 -21
  94. package/dist/templates/angular/src/app/lib/graphql-client-factory/index.ts +0 -16
  95. package/dist/templates/angular/src/app/routing/scripts/scripts.component.html +0 -1
  96. package/dist/templates/angular/src/app/routing/scripts/scripts.component.ts +0 -7
  97. package/dist/templates/angular/src/app/routing/scripts/scripts.module.ts +0 -8
  98. package/dist/templates/angular-sxp/.env +0 -2
  99. package/dist/templates/angular-sxp/package.json +0 -12
  100. package/dist/templates/angular-sxp/proxy.conf.js +0 -43
  101. package/dist/templates/angular-sxp/scripts/config/plugins/disconnected.ts +0 -29
  102. package/dist/templates/angular-sxp/src/app/components/app-components.shared.module.ts +0 -35
  103. package/dist/templates/angular-sxp/src/app/routing/navigation/navigation.component.html +0 -23
  104. package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.component.html +0 -3
  105. package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.module.ts +0 -9
  106. package/dist/templates/angular-sxp/src/graphql-fragment-types.ts +0 -219
  107. package/dist/templates/angular-xmcloud/.env +0 -21
  108. package/dist/templates/angular-xmcloud/angular.json +0 -33
  109. package/dist/templates/angular-xmcloud/package.json +0 -17
  110. package/dist/templates/angular-xmcloud/scripts/bootstrap.ts +0 -28
  111. package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +0 -39
  112. package/dist/templates/angular-xmcloud/scripts/generate-component-factory/plugins/packages.ts +0 -34
  113. package/dist/templates/angular-xmcloud/scripts/generate-component-factory/template.ts +0 -57
  114. package/dist/templates/angular-xmcloud/scripts/generate-metadata.ts +0 -25
  115. package/dist/templates/angular-xmcloud/scripts/proxy-build.ts +0 -15
  116. package/dist/templates/angular-xmcloud/server.exports.ts +0 -24
  117. package/dist/templates/angular-xmcloud/src/app/components/app-components.shared.module.ts +0 -21
  118. package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.html +0 -5
  119. package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.ts +0 -40
  120. package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +0 -14
  121. package/dist/templates/angular-xmcloud/src/app/components/container/container.component.ts +0 -30
  122. package/dist/templates/angular-xmcloud/src/app/components/image/image.component.html +0 -36
  123. package/dist/templates/angular-xmcloud/src/app/components/image/image.component.ts +0 -67
  124. package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.html +0 -15
  125. package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.ts +0 -41
  126. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.html +0 -23
  127. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.ts +0 -65
  128. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.html +0 -21
  129. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.ts +0 -49
  130. package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.html +0 -5
  131. package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.ts +0 -39
  132. package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.html +0 -1
  133. package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.ts +0 -15
  134. package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.html +0 -21
  135. package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.ts +0 -13
  136. package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +0 -8
  137. package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.ts +0 -21
  138. package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.html +0 -11
  139. package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.ts +0 -35
  140. package/dist/templates/angular-xmcloud/src/app/components/sxa.component.ts +0 -15
  141. package/dist/templates/angular-xmcloud/src/app/components/title/title.component.html +0 -10
  142. package/dist/templates/angular-xmcloud/src/app/components/title/title.component.ts +0 -56
  143. package/dist/templates/angular-xmcloud/src/app/jss-link.service.ts +0 -55
  144. package/dist/templates/angular-xmcloud/src/app/lib/config.ts +0 -17
  145. package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory/config.ts +0 -58
  146. package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.html +0 -38
  147. package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.ts +0 -104
  148. package/dist/templates/angular-xmcloud/src/app/routing/scripts/cdp-page-view.component.ts +0 -77
  149. package/dist/templates/angular-xmcloud/src/app/routing/scripts/cloud-sdk-init.component.ts +0 -48
  150. package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.component.html +0 -5
  151. package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.module.ts +0 -12
  152. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_component.scss +0 -48
  153. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_container.scss +0 -64
  154. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_fonts.scss +0 -3
  155. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_footer.scss +0 -31
  156. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_header.scss +0 -51
  157. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_navigation.scss +0 -150
  158. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_promo.scss +0 -58
  159. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_rich-text.scss +0 -11
  160. package/dist/templates/angular-xmcloud/src/assets/styles/basic/_variables.scss +0 -10
  161. package/dist/templates/angular-xmcloud/src/assets/styles/basic/main.scss +0 -8
  162. package/dist/templates/angular-xmcloud/src/assets/styles/main.scss +0 -14
  163. package/dist/templates/angular-xmcloud/src/assets/styles/sass/_app.scss +0 -103
  164. package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_functions.scss +0 -8
  165. package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_mixins.scss +0 -121
  166. package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_vars.scss +0 -3
  167. package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_colors.scss +0 -283
  168. package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_fontSizes.scss +0 -16
  169. package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_margins.scss +0 -11
  170. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/_fonts.scss +0 -1
  171. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/index.scss +0 -1
  172. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/index.scss +0 -3
  173. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/_link-button.scss +0 -26
  174. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/index.scss +0 -1
  175. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_inputs.scss +0 -58
  176. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_links.scss +0 -14
  177. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_ui-datepicker.scss +0 -7
  178. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext-files-icons.scss +0 -86
  179. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext.scss +0 -101
  180. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/index.scss +0 -2
  181. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/_typehead.scss +0 -95
  182. package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/index.scss +0 -1
  183. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-column-splitter.scss +0 -14
  184. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-container.scss +0 -27
  185. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-image.scss +0 -18
  186. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-navigation.scss +0 -51
  187. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-promo.scss +0 -42
  188. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-richtext-content.scss +0 -19
  189. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_alignment.scss +0 -26
  190. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_boxed.scss +0 -16
  191. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_clearfix.scss +0 -11
  192. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_highlighted.scss +0 -63
  193. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_link-button.scss +0 -16
  194. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_promoted-box.scss +0 -3
  195. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/index.scss +0 -6
  196. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_bordered.scss +0 -24
  197. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_title-row-box.scss +0 -66
  198. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/index.scss +0 -1
  199. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/_image-default-size.scss +0 -6
  200. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/index.scss +0 -1
  201. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-left.scss +0 -3
  202. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-right.scss +0 -3
  203. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/index.scss +0 -17
  204. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_acaindent.scss +0 -5
  205. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_background.scss +0 -27
  206. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/index.scss +0 -1
  207. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_component-link-list.scss +0 -45
  208. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_list-vertical.scss +0 -20
  209. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/index.scss +0 -2
  210. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-fat.scss +0 -58
  211. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-main-horizontal-vertical.scss +0 -176
  212. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-mobile.scss +0 -85
  213. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-sidebar.scss +0 -29
  214. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_sitemap-navigation.scss +0 -20
  215. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/index.scss +0 -5
  216. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_absolute-bottom-link.scss +0 -8
  217. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-hero.scss +0 -40
  218. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-shadow.scss +0 -42
  219. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/index.scss +0 -3
  220. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/_rich-text-lists.scss +0 -63
  221. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/index.scss +0 -1
  222. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_background-colors.scss +0 -14
  223. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_indent.scss +0 -13
  224. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/index.scss +0 -2
  225. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/_component-title.scss +0 -30
  226. package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/index.scss +0 -1
  227. package/dist/templates/angular-xmcloud/src/assets/styles/sass/main.scss +0 -4
  228. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/index.scss +0 -6
  229. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/link-list/index.scss +0 -0
  230. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/navigation/index.scss +0 -0
  231. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/page-content/index.scss +0 -0
  232. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/promo/index.scss +0 -0
  233. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/rich-text/index.scss +0 -0
  234. package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/title/index.scss +0 -0
  235. package/dist/templates/nextjs-xmcloud/src/lib/context/index.ts +0 -22
  236. package/dist/templates/nextjs-xmcloud/src/lib/context/sdk/events.ts +0 -26
  237. package/dist/templates/node-headless-ssr-experience-edge/gitignore +0 -19
  238. package/dist/templates/node-headless-ssr-proxy/gitignore +0 -19
  239. package/dist/templates/node-xmcloud-proxy/.env +0 -14
  240. package/dist/templates/node-xmcloud-proxy/README.md +0 -36
  241. package/dist/templates/node-xmcloud-proxy/gitignore +0 -33
  242. package/dist/templates/node-xmcloud-proxy/package.json +0 -26
  243. package/dist/templates/node-xmcloud-proxy/src/config.ts +0 -25
  244. package/dist/templates/node-xmcloud-proxy/src/index.ts +0 -210
  245. package/dist/templates/node-xmcloud-proxy/src/types.ts +0 -27
  246. package/dist/templates/node-xmcloud-proxy/tsconfig.json +0 -22
  247. /package/dist/templates/{angular-sxp → angular}/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +0 -0
  248. /package/dist/templates/{angular-sxp → angular}/data/component-content/gitignore +0 -0
  249. /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ContentListField/Item1/en.yml +0 -0
  250. /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ContentListField/Item2/en.yml +0 -0
  251. /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/EditFrameDemo/Item1/en.yml +0 -0
  252. /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/EditFrameDemo/Item2/en.yml +0 -0
  253. /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ItemLinkField/Item1/en.yml +0 -0
  254. /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ItemLinkField/Item2/en.yml +0 -0
  255. /package/dist/templates/{angular-sxp → angular}/data/content/gitignore +0 -0
  256. /package/dist/templates/{angular-sxp → angular}/data/dictionary/en.yml +0 -0
  257. /package/dist/templates/{angular-sxp → angular}/data/dictionary/{{language}}.yml +0 -0
  258. /package/dist/templates/{angular-sxp → angular}/data/media/files/jss.pdf +0 -0
  259. /package/dist/templates/{angular-sxp → angular}/data/media/img/jss_logo.png +0 -0
  260. /package/dist/templates/{angular-sxp → angular}/data/media/img/sc_logo.png +0 -0
  261. /package/dist/templates/{angular-sxp → angular}/data/routes/en.yml +0 -0
  262. /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/en.yml +0 -0
  263. /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/sample-1/en.yml +0 -0
  264. /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/sample-2/en.yml +0 -0
  265. /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/custom-route-type/en.yml +0 -0
  266. /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/en.yml +0 -0
  267. /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/{{language}}.yml +0 -0
  268. /package/dist/templates/{angular-sxp → angular}/data/routes/{{language}}.yml +0 -0
  269. /package/dist/templates/{angular-sxp → angular}/scripts/disconnected-mode-proxy.ts +0 -0
  270. /package/dist/templates/{angular-sxp → angular}/scripts/lint-yml.ts +0 -0
  271. /package/dist/templates/{angular-sxp → angular}/sitecore/config/{{appName}}.config +0 -0
  272. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/component-content.sitecore.ts +0 -0
  273. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Reuse.sitecore.ts +0 -0
  274. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Tabs-Tab.sitecore.ts +0 -0
  275. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Tabs.sitecore.ts +0 -0
  276. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout.sitecore.ts +0 -0
  277. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Multilingual.sitecore.ts +0 -0
  278. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Section.sitecore.ts +0 -0
  279. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/content-block.sitecore.ts +0 -0
  280. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-connected-demo.sitecore.ts +0 -0
  281. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +0 -0
  282. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.ts +0 -0
  283. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-layout.sitecore.ts +0 -0
  284. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-angular-lazy-loading.sitecore.ts +0 -0
  285. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-component-params.sitecore.ts +0 -0
  286. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-custom-route-type.sitecore.ts +0 -0
  287. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-edit-frame.sitecore.ts +0 -0
  288. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-checkbox.sitecore.ts +0 -0
  289. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-content-list.sitecore.ts +0 -0
  290. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-custom.sitecore.ts +0 -0
  291. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-date.sitecore.ts +0 -0
  292. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-file.sitecore.ts +0 -0
  293. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-image.sitecore.ts +0 -0
  294. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-item-link.sitecore.ts +0 -0
  295. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-link.sitecore.ts +0 -0
  296. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-number.sitecore.ts +0 -0
  297. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-rich-text.sitecore.ts +0 -0
  298. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-text.sitecore.ts +0 -0
  299. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-route-fields.sitecore.ts +0 -0
  300. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-sitecore-context.sitecore.ts +0 -0
  301. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-tracking.sitecore.ts +0 -0
  302. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/config.js +0 -0
  303. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/content.sitecore.ts +0 -0
  304. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/dictionary.sitecore.ts +0 -0
  305. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/placeholders.sitecore.ts +0 -0
  306. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/routes.sitecore.ts +0 -0
  307. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/Styleguide-Explanatory-Component.sitecore.ts +0 -0
  308. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-content-list-template.sitecore.ts +0 -0
  309. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-edit-frame-list-item-template.sitecore.ts +0 -0
  310. /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-item-link-template.sitecore.ts +0 -0
  311. /package/dist/templates/{angular-sxp → angular}/sitecore/gitignore +0 -0
  312. /package/dist/templates/{angular-sxp → angular}/sitecore/pipelines/example.patch.ts +0 -0
  313. /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.graphql +0 -0
  314. /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.html +0 -0
  315. /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.ts +0 -0
  316. /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.html +0 -0
  317. /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.ts +0 -0
  318. /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-layout/graph-ql-layout.component.html +0 -0
  319. /package/dist/templates/{angular-sxp → angular}/src/app/components/shared/styleguide-specimen/styleguide-specimen.component.ts +0 -0
  320. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.html +0 -0
  321. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.ts +0 -0
  322. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.module.ts +0 -0
  323. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-component-params/styleguide-component-params.component.html +0 -0
  324. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-component-params/styleguide-component-params.component.ts +0 -0
  325. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.html +0 -0
  326. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.ts +0 -0
  327. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.html +0 -0
  328. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.ts +0 -0
  329. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.html +0 -0
  330. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.ts +0 -0
  331. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.html +0 -0
  332. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.ts +0 -0
  333. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.html +0 -0
  334. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.ts +0 -0
  335. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.html +0 -0
  336. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.ts +0 -0
  337. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.html +0 -0
  338. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.ts +0 -0
  339. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.html +0 -0
  340. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.ts +0 -0
  341. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.html +0 -0
  342. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.ts +0 -0
  343. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.html +0 -0
  344. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.ts +0 -0
  345. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.html +0 -0
  346. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.ts +0 -0
  347. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.html +0 -0
  348. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.ts +0 -0
  349. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.html +0 -0
  350. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.ts +0 -0
  351. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout/styleguide-layout.component.html +0 -0
  352. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout/styleguide-layout.component.ts +0 -0
  353. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.html +0 -0
  354. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.ts +0 -0
  355. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.html +0 -0
  356. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.ts +0 -0
  357. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.html +0 -0
  358. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.ts +0 -0
  359. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.html +0 -0
  360. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.ts +0 -0
  361. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.html +0 -0
  362. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.ts +0 -0
  363. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-section/styleguide-section.component.html +0 -0
  364. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-section/styleguide-section.component.ts +0 -0
  365. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.html +0 -0
  366. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.ts +0 -0
  367. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-tracking/styleguide-tracking.component.html +0 -0
  368. /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-tracking/styleguide-tracking.component.ts +0 -0
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sxpPrompts = void 0;
4
- const base_1 = require("./base");
5
- /**
6
- * Set of CLI prompts for an SXP app
7
- */
8
- exports.sxpPrompts = [
9
- {
10
- type: 'input',
11
- name: 'hostName',
12
- message: 'What is your Sitecore hostname (used if deployed to Sitecore)?',
13
- default: (answers) => `${answers.appName || base_1.DEFAULT_APPNAME}.dev.local`,
14
- when: (answers) => {
15
- if (answers.yes && !answers.hostName) {
16
- answers.hostName = `${answers.appName || base_1.DEFAULT_APPNAME}.dev.local`;
17
- }
18
- return !answers.hostName;
19
- },
20
- },
21
- {
22
- type: 'list',
23
- name: 'fetchWith',
24
- message: 'How would you like to fetch Layout and Dictionary data?',
25
- choices: Object.values(base_1.FetchWith),
26
- default: base_1.DEFAULT_FETCHWITH,
27
- when: (answers) => {
28
- if (answers.yes && !answers.fetchWith) {
29
- answers.fetchWith = base_1.DEFAULT_FETCHWITH;
30
- }
31
- return !answers.fetchWith;
32
- },
33
- },
34
- ];
@@ -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,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);
@@ -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,2 +0,0 @@
1
- *
2
- !.gitignore