@postnord/pn-marketweb-components 2.0.140 → 2.0.142

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 (665) hide show
  1. package/cjs/{index-e3e27c79.js → index-4199ff85.js} +595 -278
  2. package/cjs/{index-28bbc937.js → index-95e5b7f9.js} +1 -1
  3. package/cjs/loader.cjs.js +3 -2
  4. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
  5. package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
  6. package/cjs/pn-breakpoints.cjs.entry.js +2 -2
  7. package/cjs/pn-chart.cjs.entry.js +8 -7
  8. package/cjs/pn-charts-card.cjs.entry.js +9 -2
  9. package/cjs/pn-choice-button.cjs.entry.js +5 -2
  10. package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
  11. package/cjs/pn-customernumber-selector.cjs.entry.js +2 -2
  12. package/cjs/pn-filter-checkbox.cjs.entry.js +5 -2
  13. package/cjs/pn-find-price-result.cjs.entry.js +7 -4
  14. package/cjs/{pn-find-price-store-0b8c195c.js → pn-find-price-store-6b418730.js} +1 -1
  15. package/cjs/pn-find-price.cjs.entry.js +4 -4
  16. package/cjs/pn-find-service-and-price-result.cjs.entry.js +4 -4
  17. package/cjs/{pn-find-service-and-price-store-16a7936c.js → pn-find-service-and-price-store-6e26630d.js} +1 -1
  18. package/cjs/pn-find-service-and-price.cjs.entry.js +4 -4
  19. package/cjs/pn-language-selector_9.cjs.entry.js +16 -39
  20. package/cjs/pn-line-shape.cjs.entry.js +2 -2
  21. package/cjs/pn-mainnav-link.cjs.entry.js +4 -10
  22. package/cjs/{pn-mainnav-store-61a75ea0.js → pn-mainnav-store-8c337865.js} +1 -1
  23. package/cjs/pn-market-web-components.cjs.js +6 -2
  24. package/cjs/pn-marketweb-input.cjs.entry.js +2 -7
  25. package/cjs/pn-marketweb-search.cjs.entry.js +2 -6
  26. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +10 -15
  27. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +2 -2
  28. package/cjs/pn-marketweb-siteheader-login-links_2.cjs.entry.js +3 -5
  29. package/cjs/pn-marketweb-siteheader.cjs.entry.js +8 -35
  30. package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
  31. package/cjs/pn-pex-pricefinder.cjs.entry.js +2 -5
  32. package/cjs/pn-product-card_4.cjs.entry.js +16 -7
  33. package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
  34. package/cjs/pn-product-pricelist.cjs.entry.js +4 -4
  35. package/cjs/pn-product-tile-info_2.cjs.entry.js +10 -3
  36. package/cjs/pn-product-tile.cjs.entry.js +2 -2
  37. package/cjs/pn-profile-modal-customernumber.cjs.entry.js +2 -2
  38. package/cjs/pn-profile-modal-profile.cjs.entry.js +4 -4
  39. package/cjs/{pn-profile-modal-store-6117e304.js → pn-profile-modal-store-947b08ae.js} +1 -1
  40. package/cjs/pn-profile-modal-type.cjs.entry.js +4 -4
  41. package/cjs/pn-profile-modal.cjs.entry.js +4 -4
  42. package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
  43. package/cjs/pn-profile-selector.cjs.entry.js +5 -5
  44. package/cjs/pn-proxio-pricegroup.cjs.entry.js +3 -5
  45. package/cjs/pn-proxio-productcard_4.cjs.entry.js +12 -5
  46. package/cjs/pn-quick-cta.cjs.entry.js +2 -2
  47. package/cjs/pn-quote-card.cjs.entry.js +2 -3
  48. package/cjs/pn-sidenav-level.cjs.entry.js +4 -4
  49. package/cjs/pn-sidenav-link.cjs.entry.js +4 -12
  50. package/cjs/{pn-sidenav-store-d9bd9e00.js → pn-sidenav-store-d2389306.js} +1 -1
  51. package/cjs/pn-sidenav-togglebutton.cjs.entry.js +4 -5
  52. package/cjs/pn-sidenav.cjs.entry.js +4 -6
  53. package/cjs/pn-site-footer_2.cjs.entry.js +4 -5
  54. package/cjs/pn-spotlight.cjs.entry.js +2 -2
  55. package/cjs/pn-stats-info-data.cjs.entry.js +8 -8
  56. package/cjs/pn-stats-info.cjs.entry.js +2 -2
  57. package/cjs/pn-teaser-card.cjs.entry.js +3 -4
  58. package/collection/collection-manifest.json +2 -2
  59. package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js +12 -11
  60. package/collection/components/cards/pn-quote-card/pn-quote-card.js +68 -79
  61. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +109 -113
  62. package/collection/components/charts/pn-chart/pn-chart.js +81 -74
  63. package/collection/components/charts/pn-charts-card/pn-charts-card.js +142 -146
  64. package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +133 -128
  65. package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +51 -49
  66. package/collection/components/cta/pn-spotlight/pn-spotlight.js +51 -51
  67. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +119 -114
  68. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +82 -77
  69. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +93 -87
  70. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +193 -195
  71. package/collection/components/input/pn-choice-button/pn-choice-button.js +145 -137
  72. package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +128 -122
  73. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +347 -355
  74. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +258 -260
  75. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.js +0 -3
  76. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +201 -221
  77. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +95 -90
  78. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +122 -117
  79. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +195 -204
  80. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +212 -205
  81. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +170 -172
  82. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +474 -524
  83. package/collection/components/minor/pn-titletag/pn-titletag.js +51 -49
  84. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +119 -123
  85. package/collection/components/navigation/pn-language-selector/pn-language-selector.js +71 -64
  86. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +58 -58
  87. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +92 -97
  88. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +39 -33
  89. package/collection/components/navigation/pn-mainnav/pn-mainnav.js +182 -183
  90. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +29 -22
  91. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +128 -134
  92. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +39 -34
  93. package/collection/components/navigation/pn-sidenav/pn-sidenav.js +71 -66
  94. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +11 -29
  95. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +34 -29
  96. package/collection/components/navigation/pn-site-footer/pn-site-footer.js +68 -75
  97. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +85 -89
  98. package/collection/components/navigation/pn-site-selector/pn-site-selector.js +73 -73
  99. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +68 -67
  100. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +90 -90
  101. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +85 -79
  102. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +182 -188
  103. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +91 -84
  104. package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +116 -115
  105. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +68 -67
  106. package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +78 -76
  107. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +48 -42
  108. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +163 -179
  109. package/collection/components/widgets/pn-find-price/pn-find-price.js +99 -113
  110. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +66 -67
  111. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +133 -148
  112. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +87 -102
  113. package/collection/components/widgets/pn-product-card/pn-product-card-info.js +92 -94
  114. package/collection/components/widgets/pn-product-card/pn-product-card-price.js +138 -131
  115. package/collection/components/widgets/pn-product-card/pn-product-card.js +12 -21
  116. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +101 -108
  117. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +137 -140
  118. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +70 -62
  119. package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +87 -83
  120. package/collection/components/widgets/pn-product-tile/pn-product-tile.js +12 -16
  121. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +130 -145
  122. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +87 -82
  123. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +55 -57
  124. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +70 -61
  125. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +12 -20
  126. package/collection/docs/installation/installation.stories.js +21 -0
  127. package/custom-elements/index.js +142 -193
  128. package/esm/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  129. package/esm/{index-5397620b.js → index-c118284d.js} +595 -279
  130. package/esm/loader.js +3 -2
  131. package/esm/pn-bonus-progressbar-level.entry.js +2 -2
  132. package/esm/pn-bonus-progressbar.entry.js +2 -2
  133. package/esm/pn-breakpoints.entry.js +2 -2
  134. package/esm/pn-chart.entry.js +8 -7
  135. package/esm/pn-charts-card.entry.js +9 -2
  136. package/esm/pn-choice-button.entry.js +5 -2
  137. package/esm/pn-customernumber-selector-option.entry.js +2 -2
  138. package/esm/pn-customernumber-selector.entry.js +2 -2
  139. package/esm/pn-filter-checkbox.entry.js +5 -2
  140. package/esm/pn-find-price-result.entry.js +7 -4
  141. package/esm/{pn-find-price-store-b4556c9b.js → pn-find-price-store-2cef65c5.js} +1 -1
  142. package/esm/pn-find-price.entry.js +4 -4
  143. package/esm/pn-find-service-and-price-result.entry.js +4 -4
  144. package/esm/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  145. package/esm/pn-find-service-and-price.entry.js +4 -4
  146. package/esm/pn-language-selector_9.entry.js +16 -39
  147. package/esm/pn-line-shape.entry.js +2 -2
  148. package/esm/pn-mainnav-link.entry.js +4 -10
  149. package/esm/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  150. package/esm/pn-market-web-components.js +3 -2
  151. package/esm/pn-marketweb-input.entry.js +2 -7
  152. package/esm/pn-marketweb-search.entry.js +2 -6
  153. package/esm/pn-marketweb-sitefooter.entry.js +10 -15
  154. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +2 -2
  155. package/esm/pn-marketweb-siteheader-login-links_2.entry.js +3 -5
  156. package/esm/pn-marketweb-siteheader.entry.js +8 -35
  157. package/esm/pn-parcel-tracker.entry.js +2 -2
  158. package/esm/pn-pex-pricefinder.entry.js +2 -5
  159. package/esm/pn-product-card_4.entry.js +16 -7
  160. package/esm/pn-product-pricelist-result.entry.js +3 -3
  161. package/esm/pn-product-pricelist.entry.js +4 -4
  162. package/esm/pn-product-tile-info_2.entry.js +10 -3
  163. package/esm/pn-product-tile.entry.js +2 -2
  164. package/esm/pn-profile-modal-customernumber.entry.js +2 -2
  165. package/esm/pn-profile-modal-profile.entry.js +4 -4
  166. package/esm/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  167. package/esm/pn-profile-modal-type.entry.js +4 -4
  168. package/esm/pn-profile-modal.entry.js +4 -4
  169. package/esm/pn-profile-selector-option.entry.js +2 -2
  170. package/esm/pn-profile-selector.entry.js +5 -5
  171. package/esm/pn-proxio-pricegroup.entry.js +3 -5
  172. package/esm/pn-proxio-productcard_4.entry.js +12 -5
  173. package/esm/pn-quick-cta.entry.js +2 -2
  174. package/esm/pn-quote-card.entry.js +2 -3
  175. package/esm/pn-sidenav-level.entry.js +4 -4
  176. package/esm/pn-sidenav-link.entry.js +4 -12
  177. package/esm/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  178. package/esm/pn-sidenav-togglebutton.entry.js +4 -5
  179. package/esm/pn-sidenav.entry.js +4 -6
  180. package/esm/pn-site-footer_2.entry.js +4 -5
  181. package/esm/pn-spotlight.entry.js +2 -2
  182. package/esm/pn-stats-info-data.entry.js +8 -8
  183. package/esm/pn-stats-info.entry.js +2 -2
  184. package/esm/pn-teaser-card.entry.js +3 -4
  185. package/esm/polyfills/css-shim.js +1 -1
  186. package/esm-es5/MarketWebContextService-872043cc.js +1 -1
  187. package/esm-es5/MarketWebLoginManager-9499bd89.js +1 -1
  188. package/esm-es5/convert-f6377d13.js +1 -1
  189. package/esm-es5/{index-7b21ecff.js → index-7f77b0ba.js} +1 -1
  190. package/esm-es5/index-c118284d.js +2 -0
  191. package/esm-es5/loader.js +1 -1
  192. package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
  193. package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
  194. package/esm-es5/pn-breakpoints.entry.js +1 -1
  195. package/esm-es5/pn-chart.entry.js +2 -2
  196. package/esm-es5/pn-charts-card.entry.js +1 -1
  197. package/esm-es5/pn-choice-button.entry.js +1 -1
  198. package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
  199. package/esm-es5/pn-customernumber-selector.entry.js +1 -1
  200. package/esm-es5/pn-filter-checkbox.entry.js +1 -1
  201. package/esm-es5/pn-find-price-result.entry.js +1 -1
  202. package/esm-es5/{pn-find-price-store-b4556c9b.js → pn-find-price-store-2cef65c5.js} +1 -1
  203. package/esm-es5/pn-find-price.entry.js +1 -1
  204. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
  205. package/esm-es5/{pn-find-service-and-price-store-65df46a0.js → pn-find-service-and-price-store-f09ca219.js} +1 -1
  206. package/esm-es5/pn-find-service-and-price.entry.js +1 -1
  207. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  208. package/esm-es5/pn-line-shape.entry.js +1 -1
  209. package/esm-es5/pn-mainnav-link.entry.js +1 -1
  210. package/esm-es5/{pn-mainnav-store-28571e54.js → pn-mainnav-store-5d91f523.js} +1 -1
  211. package/esm-es5/pn-market-web-components.js +1 -1
  212. package/esm-es5/pn-marketweb-input.entry.js +1 -1
  213. package/esm-es5/pn-marketweb-search.entry.js +1 -1
  214. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  215. package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
  216. package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -1
  217. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  218. package/esm-es5/pn-parcel-tracker.entry.js +1 -1
  219. package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
  220. package/esm-es5/pn-product-card_4.entry.js +1 -1
  221. package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
  222. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  223. package/esm-es5/pn-product-tile-info_2.entry.js +1 -1
  224. package/esm-es5/pn-product-tile.entry.js +1 -1
  225. package/esm-es5/pn-profile-modal-customernumber.entry.js +1 -1
  226. package/esm-es5/pn-profile-modal-profile.entry.js +1 -1
  227. package/esm-es5/{pn-profile-modal-store-ae9e0d5a.js → pn-profile-modal-store-81f53310.js} +1 -1
  228. package/esm-es5/pn-profile-modal-type.entry.js +1 -1
  229. package/esm-es5/pn-profile-modal.entry.js +1 -1
  230. package/esm-es5/pn-profile-selector-option.entry.js +1 -1
  231. package/esm-es5/pn-profile-selector.entry.js +1 -1
  232. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
  233. package/esm-es5/pn-proxio-productcard_4.entry.js +1 -1
  234. package/esm-es5/pn-quick-cta.entry.js +1 -1
  235. package/esm-es5/pn-quote-card.entry.js +1 -1
  236. package/esm-es5/pn-sidenav-level.entry.js +1 -1
  237. package/esm-es5/pn-sidenav-link.entry.js +1 -1
  238. package/esm-es5/{pn-sidenav-store-50b186d6.js → pn-sidenav-store-94be19c8.js} +1 -1
  239. package/esm-es5/pn-sidenav-togglebutton.entry.js +1 -1
  240. package/esm-es5/pn-sidenav.entry.js +1 -1
  241. package/esm-es5/pn-site-footer_2.entry.js +1 -1
  242. package/esm-es5/pn-spotlight.entry.js +1 -1
  243. package/esm-es5/pn-stats-info-data.entry.js +1 -1
  244. package/esm-es5/pn-stats-info.entry.js +1 -1
  245. package/esm-es5/pn-teaser-card.entry.js +1 -1
  246. package/package.json +3 -2
  247. package/pn-market-web-components/p-09d66012.system.entry.js +1 -0
  248. package/pn-market-web-components/{p-1c38553b.system.entry.js → p-0c46847e.system.entry.js} +1 -1
  249. package/pn-market-web-components/p-0fbcacf3.system.entry.js +1 -0
  250. package/pn-market-web-components/p-0ffa3353.entry.js +1 -0
  251. package/pn-market-web-components/p-1545fb34.entry.js +1 -0
  252. package/pn-market-web-components/p-156fedd7.entry.js +1 -0
  253. package/pn-market-web-components/p-15e680a8.entry.js +1 -0
  254. package/pn-market-web-components/{p-28bad7f5.system.entry.js → p-16afb058.system.entry.js} +1 -1
  255. package/pn-market-web-components/p-17fb8d9e.entry.js +1 -0
  256. package/pn-market-web-components/p-19b622e7.entry.js +1 -0
  257. package/pn-market-web-components/p-1a9b2a0e.system.entry.js +1 -0
  258. package/pn-market-web-components/{p-a43543e5.system.entry.js → p-1ae6cc5f.system.entry.js} +1 -1
  259. package/pn-market-web-components/p-1c382898.entry.js +1 -0
  260. package/pn-market-web-components/{p-fc1083d2.system.entry.js → p-1d50340b.system.entry.js} +1 -1
  261. package/pn-market-web-components/p-1f8423d6.entry.js +1 -0
  262. package/pn-market-web-components/{p-1ce871c5.system.entry.js → p-1fb4eae4.system.entry.js} +1 -1
  263. package/pn-market-web-components/{p-80dce81e.system.entry.js → p-2145d5e0.system.entry.js} +1 -1
  264. package/pn-market-web-components/p-22a60cb6.system.entry.js +1 -0
  265. package/pn-market-web-components/p-247cd393.entry.js +1 -0
  266. package/pn-market-web-components/p-2967a563.entry.js +1 -0
  267. package/pn-market-web-components/p-31fd7a95.system.js +1 -1
  268. package/pn-market-web-components/p-34c0b146.entry.js +1 -0
  269. package/pn-market-web-components/p-34fefe22.entry.js +1 -0
  270. package/pn-market-web-components/p-37d26cef.entry.js +1 -0
  271. package/pn-market-web-components/p-38f135fd.entry.js +1 -0
  272. package/pn-market-web-components/{p-a5f75560.system.js → p-396b254a.system.js} +1 -1
  273. package/pn-market-web-components/{p-94958580.system.js → p-3a450371.system.js} +1 -1
  274. package/pn-market-web-components/p-41b34b21.entry.js +1 -0
  275. package/pn-market-web-components/p-4305724d.entry.js +1 -0
  276. package/pn-market-web-components/{p-add7d76c.system.js → p-441249d9.system.js} +1 -1
  277. package/pn-market-web-components/p-44c05fba.entry.js +1 -0
  278. package/pn-market-web-components/p-44f58f15.js +1 -0
  279. package/pn-market-web-components/p-4653f5db.system.entry.js +1 -0
  280. package/pn-market-web-components/p-47d717a3.entry.js +1 -0
  281. package/pn-market-web-components/{p-18380cb2.system.entry.js → p-488a5506.system.entry.js} +1 -1
  282. package/pn-market-web-components/p-48c74c53.entry.js +1 -0
  283. package/pn-market-web-components/p-49f60496.entry.js +1 -0
  284. package/pn-market-web-components/p-4a8e35d3.system.entry.js +1 -0
  285. package/pn-market-web-components/{p-198d9c77.system.entry.js → p-4ccf1b55.system.entry.js} +1 -1
  286. package/pn-market-web-components/{p-7079df88.system.entry.js → p-4d561de4.system.entry.js} +1 -1
  287. package/pn-market-web-components/p-4ef54288.entry.js +1 -0
  288. package/pn-market-web-components/p-507f8886.entry.js +1 -0
  289. package/pn-market-web-components/{p-74d35edf.system.entry.js → p-545a40a7.system.entry.js} +1 -1
  290. package/pn-market-web-components/{p-2b67469f.system.entry.js → p-5a41c1bb.system.entry.js} +1 -1
  291. package/pn-market-web-components/{p-723b9901.system.entry.js → p-5a506356.system.entry.js} +1 -1
  292. package/pn-market-web-components/p-5a6761da.js +1 -0
  293. package/pn-market-web-components/{p-8117b79e.system.entry.js → p-68324e6f.system.entry.js} +1 -1
  294. package/pn-market-web-components/{p-7b9fb94f.system.entry.js → p-6d050c3a.system.entry.js} +1 -1
  295. package/pn-market-web-components/{p-a275bffb.system.entry.js → p-6e43a937.system.entry.js} +1 -1
  296. package/pn-market-web-components/{p-02ea55ad.system.js → p-6f1d6a1a.system.js} +1 -1
  297. package/pn-market-web-components/p-73ee3141.entry.js +1 -0
  298. package/pn-market-web-components/p-7c1b31e8.js +2 -0
  299. package/pn-market-web-components/p-7d992089.entry.js +1 -0
  300. package/pn-market-web-components/p-7decf8dd.entry.js +1 -0
  301. package/pn-market-web-components/p-7dff99ed.entry.js +1 -0
  302. package/pn-market-web-components/p-8079dfd5.system.entry.js +1 -0
  303. package/pn-market-web-components/p-82db879c.entry.js +1 -0
  304. package/pn-market-web-components/p-833bab34.entry.js +1 -0
  305. package/pn-market-web-components/{p-290d5824.system.entry.js → p-853e6559.system.entry.js} +1 -1
  306. package/pn-market-web-components/p-8766fa86.system.js +1 -1
  307. package/pn-market-web-components/{p-cd68d0e8.system.entry.js → p-8879ac54.system.entry.js} +1 -1
  308. package/pn-market-web-components/{p-679ebd2a.system.entry.js → p-8a834594.system.entry.js} +1 -1
  309. package/pn-market-web-components/p-8acb60c5.entry.js +1 -0
  310. package/pn-market-web-components/p-8b28ac30.entry.js +1 -0
  311. package/pn-market-web-components/{p-450cbe76.system.entry.js → p-8ca063a9.system.entry.js} +1 -1
  312. package/pn-market-web-components/{p-9edaf6b6.system.entry.js → p-8cefd900.system.entry.js} +1 -1
  313. package/pn-market-web-components/{p-58a57436.system.entry.js → p-8fee0115.system.entry.js} +1 -1
  314. package/pn-market-web-components/{p-aa271997.system.entry.js → p-9010c32a.system.entry.js} +1 -1
  315. package/pn-market-web-components/p-9a6af82e.entry.js +1 -0
  316. package/pn-market-web-components/{p-4f67721e.system.entry.js → p-9f95b3c9.system.entry.js} +1 -1
  317. package/pn-market-web-components/{p-0cacf9fb.js → p-a1a58fe4.js} +1 -1
  318. package/pn-market-web-components/p-a3b8ec51.system.entry.js +1 -0
  319. package/pn-market-web-components/p-a5faec68.system.js +2 -0
  320. package/pn-market-web-components/p-a61101e6.entry.js +1 -0
  321. package/pn-market-web-components/p-a781c8dd.entry.js +1 -0
  322. package/pn-market-web-components/p-a799fee1.entry.js +1 -0
  323. package/pn-market-web-components/{p-1610d018.system.entry.js → p-ab5fdc81.system.entry.js} +1 -1
  324. package/pn-market-web-components/{p-2718b89a.system.entry.js → p-abfed655.system.entry.js} +1 -1
  325. package/pn-market-web-components/p-ad1f57dc.entry.js +1 -0
  326. package/pn-market-web-components/p-b0102ff6.entry.js +1 -0
  327. package/pn-market-web-components/{p-625fb7fb.system.entry.js → p-b890f3f9.system.entry.js} +1 -1
  328. package/pn-market-web-components/p-beefd9f7.entry.js +1 -0
  329. package/pn-market-web-components/p-bfe239ca.js +1 -1
  330. package/pn-market-web-components/p-c229035c.entry.js +1 -0
  331. package/pn-market-web-components/{p-84699999.js → p-c5727e83.js} +1 -1
  332. package/pn-market-web-components/{p-447ef543.system.entry.js → p-c576ac3e.system.entry.js} +1 -1
  333. package/pn-market-web-components/p-c5bb2237.system.entry.js +1 -0
  334. package/pn-market-web-components/p-c7e8ab14.entry.js +1 -0
  335. package/pn-market-web-components/{p-af415c1a.system.entry.js → p-ca1f0abc.system.entry.js} +1 -1
  336. package/pn-market-web-components/p-ccf891fc.entry.js +16 -0
  337. package/pn-market-web-components/p-cd6b402e.system.entry.js +1 -0
  338. package/pn-market-web-components/p-ced9727b.system.js +1 -1
  339. package/pn-market-web-components/p-d295ef71.system.js +1 -0
  340. package/pn-market-web-components/{p-825b8fb8.system.js → p-d34c9be2.system.js} +1 -1
  341. package/pn-market-web-components/p-d5ae9797.entry.js +1 -0
  342. package/pn-market-web-components/p-d70e685c.entry.js +1 -0
  343. package/pn-market-web-components/p-d9dec5b8.entry.js +1 -0
  344. package/pn-market-web-components/p-dbd7837e.entry.js +1 -0
  345. package/pn-market-web-components/p-dc598ef8.entry.js +1 -0
  346. package/pn-market-web-components/p-e0e45eb0.system.entry.js +1 -0
  347. package/pn-market-web-components/p-e1513762.entry.js +1 -0
  348. package/pn-market-web-components/p-e4754d3b.system.entry.js +1 -0
  349. package/pn-market-web-components/{p-36a1b8e1.system.entry.js → p-e4961116.system.entry.js} +1 -1
  350. package/pn-market-web-components/p-e4fbd06c.entry.js +1 -0
  351. package/pn-market-web-components/{p-93cecc43.system.entry.js → p-e737c51d.system.entry.js} +1 -1
  352. package/pn-market-web-components/{p-86f06e26.js → p-ecaad0c1.js} +1 -1
  353. package/pn-market-web-components/p-ed5e91eb.system.entry.js +1 -0
  354. package/pn-market-web-components/{p-e6fa11ad.system.entry.js → p-ef721555.system.entry.js} +1 -1
  355. package/pn-market-web-components/{p-c4254e9e.js → p-f04afb39.js} +1 -1
  356. package/pn-market-web-components/{p-37017f68.system.js → p-f4a6d005.system.js} +1 -1
  357. package/pn-market-web-components/{p-1151bf60.system.entry.js → p-f7cb2ef9.system.entry.js} +1 -1
  358. package/pn-market-web-components/{p-e66a8bb8.system.entry.js → p-f9725e57.system.entry.js} +1 -1
  359. package/pn-market-web-components/{p-c7d886d7.system.entry.js → p-fdec849a.system.entry.js} +2 -2
  360. package/pn-market-web-components/p-ff975b67.entry.js +1 -0
  361. package/pn-market-web-components/{p-b88337dd.system.entry.js → p-ffe18938.system.entry.js} +1 -1
  362. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  363. package/pn-market-web-components/pn-market-web-components.js +2 -1
  364. package/types/components.d.ts +53 -21
  365. package/types/stencil-public-runtime.d.ts +79 -7
  366. package/umd/pn-marketweb-init.js +1 -1
  367. package/umd/pn-marketweb-salesforce.js +2 -2
  368. package/esm-es5/index-5397620b.js +0 -1
  369. package/pn-market-web-components/p-022d9a78.entry.js +0 -1
  370. package/pn-market-web-components/p-0796f9b2.entry.js +0 -1
  371. package/pn-market-web-components/p-08411f5e.entry.js +0 -1
  372. package/pn-market-web-components/p-0fce4494.entry.js +0 -1
  373. package/pn-market-web-components/p-15112837.entry.js +0 -1
  374. package/pn-market-web-components/p-16c4bc50.entry.js +0 -1
  375. package/pn-market-web-components/p-17c4004f.entry.js +0 -1
  376. package/pn-market-web-components/p-227e1d46.entry.js +0 -1
  377. package/pn-market-web-components/p-249964b5.entry.js +0 -1
  378. package/pn-market-web-components/p-2878af00.system.entry.js +0 -1
  379. package/pn-market-web-components/p-2a23d908.entry.js +0 -1
  380. package/pn-market-web-components/p-2a598ee8.entry.js +0 -1
  381. package/pn-market-web-components/p-2da8e5e8.system.entry.js +0 -1
  382. package/pn-market-web-components/p-332e9005.entry.js +0 -1
  383. package/pn-market-web-components/p-35af1c4a.entry.js +0 -1
  384. package/pn-market-web-components/p-35fcd76c.system.entry.js +0 -1
  385. package/pn-market-web-components/p-36654f2a.system.js +0 -1
  386. package/pn-market-web-components/p-381b3ec0.entry.js +0 -1
  387. package/pn-market-web-components/p-3ae38e63.entry.js +0 -1
  388. package/pn-market-web-components/p-3c0d63fb.system.entry.js +0 -1
  389. package/pn-market-web-components/p-4bef1bf3.entry.js +0 -1
  390. package/pn-market-web-components/p-4efe43e9.entry.js +0 -1
  391. package/pn-market-web-components/p-5117ac1f.entry.js +0 -1
  392. package/pn-market-web-components/p-58e8d7d5.js +0 -1
  393. package/pn-market-web-components/p-5b05ceb5.system.entry.js +0 -1
  394. package/pn-market-web-components/p-61dbe832.entry.js +0 -1
  395. package/pn-market-web-components/p-67380aa4.entry.js +0 -1
  396. package/pn-market-web-components/p-67887512.system.js +0 -1
  397. package/pn-market-web-components/p-715d1ef7.entry.js +0 -1
  398. package/pn-market-web-components/p-736e5b84.system.entry.js +0 -1
  399. package/pn-market-web-components/p-77557da8.entry.js +0 -1
  400. package/pn-market-web-components/p-7ce41d14.entry.js +0 -1
  401. package/pn-market-web-components/p-7fd8b012.entry.js +0 -1
  402. package/pn-market-web-components/p-81426cd9.entry.js +0 -1
  403. package/pn-market-web-components/p-81773857.entry.js +0 -1
  404. package/pn-market-web-components/p-81d764a0.entry.js +0 -1
  405. package/pn-market-web-components/p-88185835.entry.js +0 -1
  406. package/pn-market-web-components/p-885bc8d7.system.entry.js +0 -1
  407. package/pn-market-web-components/p-8db654e0.system.entry.js +0 -1
  408. package/pn-market-web-components/p-8e146205.entry.js +0 -1
  409. package/pn-market-web-components/p-8e38c337.entry.js +0 -1
  410. package/pn-market-web-components/p-8e4d292f.entry.js +0 -1
  411. package/pn-market-web-components/p-8fe91339.entry.js +0 -1
  412. package/pn-market-web-components/p-9344cd23.js +0 -1
  413. package/pn-market-web-components/p-996d8a6a.entry.js +0 -1
  414. package/pn-market-web-components/p-a247058b.system.entry.js +0 -1
  415. package/pn-market-web-components/p-a27836fc.entry.js +0 -1
  416. package/pn-market-web-components/p-a7bb94a0.entry.js +0 -1
  417. package/pn-market-web-components/p-a921d3fd.system.entry.js +0 -1
  418. package/pn-market-web-components/p-aab2e28f.entry.js +0 -1
  419. package/pn-market-web-components/p-ac0e3c22.system.entry.js +0 -1
  420. package/pn-market-web-components/p-b60a151b.entry.js +0 -16
  421. package/pn-market-web-components/p-bb626ab4.js +0 -1
  422. package/pn-market-web-components/p-bd22aaac.entry.js +0 -1
  423. package/pn-market-web-components/p-c714a790.entry.js +0 -1
  424. package/pn-market-web-components/p-d0155ddf.entry.js +0 -1
  425. package/pn-market-web-components/p-d57f4246.system.entry.js +0 -1
  426. package/pn-market-web-components/p-d7e3d918.entry.js +0 -1
  427. package/pn-market-web-components/p-e32dc098.entry.js +0 -1
  428. package/pn-market-web-components/p-e4a4e68f.system.entry.js +0 -1
  429. package/pn-market-web-components/p-e9576f26.entry.js +0 -1
  430. package/pn-market-web-components/p-e9fe5c54.entry.js +0 -1
  431. package/pn-market-web-components/p-f774e2cc.entry.js +0 -1
  432. package/pn-market-web-components/p-fc974bca.entry.js +0 -1
  433. package/pn-market-web-components/p-fd4bb638.entry.js +0 -1
  434. package/pn-market-web-components/p-fea72975.entry.js +0 -1
  435. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/LICENSE.md +0 -27
  436. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/bin/stencil +0 -57
  437. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/config-flags.d.ts +0 -102
  438. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +0 -2325
  439. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.d.ts +0 -16
  440. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +0 -2299
  441. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +0 -14
  442. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.d.ts +0 -24
  443. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.d.ts +0 -17791
  444. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.iterable.d.ts +0 -323
  445. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.collection.d.ts +0 -89
  446. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.core.d.ts +0 -559
  447. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.d.ts +0 -30
  448. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.generator.d.ts +0 -79
  449. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.iterable.d.ts +0 -497
  450. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.promise.d.ts +0 -78
  451. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.proxy.d.ts +0 -41
  452. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.reflect.d.ts +0 -123
  453. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.d.ts +0 -48
  454. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.wellknown.d.ts +0 -324
  455. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.array.include.d.ts +0 -118
  456. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.d.ts +0 -22
  457. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.full.d.ts +0 -25
  458. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.d.ts +0 -26
  459. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.full.d.ts +0 -25
  460. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.intl.d.ts +0 -32
  461. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.object.d.ts +0 -51
  462. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.sharedmemory.d.ts +0 -137
  463. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.string.d.ts +0 -47
  464. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.typedarrays.d.ts +0 -55
  465. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asyncgenerator.d.ts +0 -79
  466. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asynciterable.d.ts +0 -45
  467. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.d.ts +0 -26
  468. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.full.d.ts +0 -25
  469. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.intl.d.ts +0 -73
  470. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.promise.d.ts +0 -32
  471. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.regexp.d.ts +0 -39
  472. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.array.d.ts +0 -85
  473. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.d.ts +0 -25
  474. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.full.d.ts +0 -25
  475. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.object.d.ts +0 -35
  476. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.string.d.ts +0 -39
  477. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.symbol.d.ts +0 -26
  478. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.bigint.d.ts +0 -728
  479. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.d.ts +0 -27
  480. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.full.d.ts +0 -25
  481. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.intl.d.ts +0 -368
  482. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.promise.d.ts +0 -49
  483. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.sharedmemory.d.ts +0 -99
  484. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.string.d.ts +0 -30
  485. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.symbol.wellknown.d.ts +0 -39
  486. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.d.ts +0 -25
  487. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.full.d.ts +0 -25
  488. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.intl.d.ts +0 -44
  489. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.promise.d.ts +0 -50
  490. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.string.d.ts +0 -35
  491. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.weakref.d.ts +0 -75
  492. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es5.d.ts +0 -4495
  493. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es6.d.ts +0 -25
  494. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.d.ts +0 -22
  495. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.full.d.ts +0 -25
  496. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.intl.d.ts +0 -23
  497. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.promise.d.ts +0 -43
  498. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.string.d.ts +0 -35
  499. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.weakref.d.ts +0 -75
  500. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.scripthost.d.ts +0 -327
  501. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.d.ts +0 -5733
  502. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.importscripts.d.ts +0 -26
  503. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.iterable.d.ts +0 -160
  504. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +0 -8
  505. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.d.ts +0 -95
  506. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +0 -67330
  507. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.min.js +0 -4
  508. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dependencies.json +0 -109
  509. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/app-error.d.ts +0 -18
  510. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/events.d.ts +0 -6
  511. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-components.d.ts +0 -1
  512. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-external-styles.d.ts +0 -1
  513. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-images.d.ts +0 -1
  514. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-inline-styles.d.ts +0 -1
  515. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-util.d.ts +0 -9
  516. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-window.d.ts +0 -10
  517. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.d.ts +0 -6
  518. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +0 -808
  519. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/logger.d.ts +0 -5
  520. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +0 -8
  521. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/progress.d.ts +0 -3
  522. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/status.d.ts +0 -4
  523. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/hmr-util.spec.d.ts +0 -1
  524. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/status.spec.d.ts +0 -1
  525. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +0 -6
  526. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.d.ts +0 -3
  527. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +0 -264
  528. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/open-in-editor-api.js +0 -1
  529. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +0 -8
  530. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +0 -1765
  531. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-worker-thread.js +0 -39
  532. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/static/favicon.ico +0 -0
  533. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/directory-index.html +0 -132
  534. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/initial-load.html +0 -160
  535. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/visualstudio.vbs +0 -82
  536. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/ws.js +0 -1
  537. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/xdg-open +0 -1066
  538. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.cjs +0 -92
  539. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.d.ts +0 -4
  540. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.js +0 -88
  541. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +0 -15
  542. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/css-shim.js +0 -4
  543. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/dom.js +0 -73
  544. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +0 -3064
  545. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +0 -8
  546. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +0 -124
  547. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-esm.js +0 -23
  548. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/core-js.js +0 -11
  549. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/css-shim.js +0 -1
  550. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/dom.js +0 -79
  551. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/es5-html-element.js +0 -1
  552. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/index.js +0 -34
  553. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/system.js +0 -6
  554. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +0 -387
  555. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +0 -1132
  556. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +0 -7
  557. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.d.ts +0 -217
  558. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +0 -777
  559. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/shadow-css.js +0 -143
  560. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.d.ts +0 -4
  561. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.js +0 -2
  562. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +0 -9
  563. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.cjs +0 -1
  564. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +0 -52
  565. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.js +0 -16
  566. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +0 -41
  567. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +0 -2293
  568. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +0 -2293
  569. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +0 -116
  570. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +0 -1565
  571. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +0 -1093
  572. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +0 -7
  573. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/shadow-css.js +0 -143
  574. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +0 -4794
  575. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +0 -1004
  576. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +0 -4758
  577. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +0 -15
  578. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +0 -200
  579. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/readme.md +0 -105
  580. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/favicon.ico +0 -0
  581. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/logo.png +0 -0
  582. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.css +0 -1
  583. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.esm.js +0 -1
  584. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.js +0 -33
  585. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/index.esm.js +0 -0
  586. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-081b0641.js +0 -1
  587. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-227a1e18.entry.js +0 -1
  588. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-2c298727.entry.js +0 -1
  589. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-5479268c.entry.js +0 -1
  590. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-573ec8a4.entry.js +0 -1
  591. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6ba08604.entry.js +0 -1
  592. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6bc63295.entry.js +0 -1
  593. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7a3759fd.entry.js +0 -1
  594. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7b4e3ba7.js +0 -1
  595. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-988eb362.css +0 -1
  596. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-9b6a9315.js +0 -1
  597. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-b4cc611c.entry.js +0 -1
  598. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-d1bf53f5.entry.js +0 -1
  599. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e2efe0df.js +0 -1
  600. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e8ca6d97.entry.js +0 -1
  601. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-ec2f13e0.entry.js +0 -1
  602. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f0b99977.entry.js +0 -1
  603. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f4745c2f.entry.js +0 -1
  604. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-fbbae598.js +0 -1
  605. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/host.config.json +0 -15
  606. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/index.html +0 -1
  607. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/manifest.json +0 -13
  608. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/connector.js +0 -2
  609. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +0 -661
  610. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/local-connector.js +0 -2
  611. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +0 -15
  612. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +0 -2673
  613. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +0 -8
  614. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +0 -1
  615. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +0 -1
  616. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.d.ts +0 -18
  617. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +0 -6135
  618. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +0 -1
  619. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +0 -8
  620. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +0 -1
  621. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +0 -52
  622. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.d.ts +0 -12
  623. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +0 -4140
  624. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-config.d.ts +0 -16
  625. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-environment.d.ts +0 -15
  626. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-preprocessor.d.ts +0 -59
  627. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-runner.d.ts +0 -10
  628. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-screenshot.d.ts +0 -2
  629. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-serializer.d.ts +0 -5
  630. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-setup-test-framework.d.ts +0 -1
  631. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-config.spec.d.ts +0 -1
  632. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-preprocessor.spec.d.ts +0 -1
  633. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-runner.spec.d.ts +0 -1
  634. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-serializer.spec.d.ts +0 -1
  635. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-environment.js +0 -3
  636. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preprocessor.js +0 -3
  637. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preset.js +0 -37
  638. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-runner.js +0 -3
  639. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-setuptestframework.js +0 -3
  640. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/attributes.d.ts +0 -14
  641. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/class-list.d.ts +0 -12
  642. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/events.d.ts +0 -21
  643. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/html.d.ts +0 -12
  644. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/index.d.ts +0 -23
  645. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/screenshot.d.ts +0 -5
  646. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/text.d.ts +0 -4
  647. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mock-fetch.d.ts +0 -11
  648. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mocks.d.ts +0 -55
  649. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +0 -8
  650. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/index.d.ts +0 -2
  651. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-browser.d.ts +0 -6
  652. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-declarations.d.ts +0 -429
  653. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-element.d.ts +0 -67
  654. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  655. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-events.d.ts +0 -21
  656. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-page.d.ts +0 -2
  657. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  658. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/reset-build-conditionals.d.ts +0 -2
  659. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/spec-page.d.ts +0 -2
  660. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test/testing-utils.spec.d.ts +0 -1
  661. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test-transpile.d.ts +0 -2
  662. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-logger.d.ts +0 -25
  663. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-sys.d.ts +0 -6
  664. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-utils.d.ts +0 -78
  665. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing.d.ts +0 -2
@@ -1,2299 +0,0 @@
1
- /*!
2
- Stencil CLI v2.17.1 | MIT Licensed | https://stenciljs.com
3
- */
4
- /**
5
- * This sets the log level hierarchy for our terminal logger, ranging from
6
- * most to least verbose.
7
- *
8
- * Ordering the levels like this lets us easily check whether we should log a
9
- * message at a given time. For instance, if the log level is set to `'warn'`,
10
- * then anything passed to the logger with level `'warn'` or `'error'` should
11
- * be logged, but we should _not_ log anything with level `'info'` or `'debug'`.
12
- *
13
- * If we have a current log level `currentLevel` and a message with level
14
- * `msgLevel` is passed to the logger, we can determine whether or not we should
15
- * log it by checking if the log level on the message is further up or at the
16
- * same level in the hierarchy than `currentLevel`, like so:
17
- *
18
- * ```ts
19
- * LOG_LEVELS.indexOf(msgLevel) >= LOG_LEVELS.indexOf(currentLevel)
20
- * ```
21
- *
22
- * NOTE: for the reasons described above, do not change the order of the entries
23
- * in this array without good reason!
24
- */
25
- const LOG_LEVELS = ['debug', 'info', 'warn', 'error'];
26
-
27
- /**
28
- * Convert a string from PascalCase to dash-case
29
- *
30
- * @param str the string to convert
31
- * @returns a converted string
32
- */
33
- const toDashCase = (str) => str
34
- .replace(/([A-Z0-9])/g, (match) => ` ${match[0]}`)
35
- .trim()
36
- .split(' ')
37
- .join('-')
38
- .toLowerCase();
39
- /**
40
- * Convert a string from dash-case / kebab-case to PascalCase (or CamelCase,
41
- * or whatever you call it!)
42
- *
43
- * @param str a string to convert
44
- * @returns a converted string
45
- */
46
- const dashToPascalCase = (str) => str
47
- .toLowerCase()
48
- .split('-')
49
- .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
50
- .join('');
51
- const isFunction = (v) => typeof v === 'function';
52
- const isString = (v) => typeof v === 'string';
53
-
54
- /**
55
- * Builds a template `Diagnostic` entity for a build error. The created `Diagnostic` is returned, and have little
56
- * detail attached to it regarding the specifics of the error - it is the responsibility of the caller of this method
57
- * to attach the specifics of the error message.
58
- *
59
- * The created `Diagnostic` is pushed to the `diagnostics` argument as a side effect of calling this method.
60
- *
61
- * @param diagnostics the existing diagnostics that the created template `Diagnostic` should be added to
62
- * @returns the created `Diagnostic`
63
- */
64
- const buildError = (diagnostics) => {
65
- const diagnostic = {
66
- level: 'error',
67
- type: 'build',
68
- header: 'Build Error',
69
- messageText: 'build error',
70
- relFilePath: null,
71
- absFilePath: null,
72
- lines: [],
73
- };
74
- if (diagnostics) {
75
- diagnostics.push(diagnostic);
76
- }
77
- return diagnostic;
78
- };
79
- /**
80
- * Builds a diagnostic from an `Error`, appends it to the `diagnostics` parameter, and returns the created diagnostic
81
- * @param diagnostics the series of diagnostics the newly created diagnostics should be added to
82
- * @param err the error to derive information from in generating the diagnostic
83
- * @param msg an optional message to use in place of `err` to generate the diagnostic
84
- * @returns the generated diagnostic
85
- */
86
- const catchError = (diagnostics, err, msg) => {
87
- const diagnostic = {
88
- level: 'error',
89
- type: 'build',
90
- header: 'Build Error',
91
- messageText: 'build error',
92
- relFilePath: null,
93
- absFilePath: null,
94
- lines: [],
95
- };
96
- if (isString(msg)) {
97
- diagnostic.messageText = msg.length ? msg : 'UNKNOWN ERROR';
98
- }
99
- else if (err != null) {
100
- if (err.stack != null) {
101
- diagnostic.messageText = err.stack.toString();
102
- }
103
- else {
104
- if (err.message != null) {
105
- diagnostic.messageText = err.message.length ? err.message : 'UNKNOWN ERROR';
106
- }
107
- else {
108
- diagnostic.messageText = err.toString();
109
- }
110
- }
111
- }
112
- if (diagnostics != null && !shouldIgnoreError(diagnostic.messageText)) {
113
- diagnostics.push(diagnostic);
114
- }
115
- return diagnostic;
116
- };
117
- /**
118
- * Determine if the provided diagnostics have any build errors
119
- * @param diagnostics the diagnostics to inspect
120
- * @returns true if any of the diagnostics in the list provided are errors that did not occur at runtime. false
121
- * otherwise.
122
- */
123
- const hasError = (diagnostics) => {
124
- if (diagnostics == null || diagnostics.length === 0) {
125
- return false;
126
- }
127
- return diagnostics.some((d) => d.level === 'error' && d.type !== 'runtime');
128
- };
129
- const shouldIgnoreError = (msg) => {
130
- return msg === TASK_CANCELED_MSG;
131
- };
132
- const TASK_CANCELED_MSG = `task canceled`;
133
-
134
- /**
135
- * Convert Windows backslash paths to slash paths: foo\\bar ➔ foo/bar
136
- * Forward-slash paths can be used in Windows as long as they're not
137
- * extended-length paths and don't contain any non-ascii characters.
138
- * This was created since the path methods in Node.js outputs \\ paths on Windows.
139
- * @param path the Windows-based path to convert
140
- * @returns the converted path
141
- */
142
- const normalizePath = (path) => {
143
- if (typeof path !== 'string') {
144
- throw new Error(`invalid path to normalize`);
145
- }
146
- path = normalizeSlashes(path.trim());
147
- const components = pathComponents(path, getRootLength(path));
148
- const reducedComponents = reducePathComponents(components);
149
- const rootPart = reducedComponents[0];
150
- const secondPart = reducedComponents[1];
151
- const normalized = rootPart + reducedComponents.slice(1).join('/');
152
- if (normalized === '') {
153
- return '.';
154
- }
155
- if (rootPart === '' &&
156
- secondPart &&
157
- path.includes('/') &&
158
- !secondPart.startsWith('.') &&
159
- !secondPart.startsWith('@')) {
160
- return './' + normalized;
161
- }
162
- return normalized;
163
- };
164
- const normalizeSlashes = (path) => path.replace(backslashRegExp, '/');
165
- const altDirectorySeparator = '\\';
166
- const urlSchemeSeparator = '://';
167
- const backslashRegExp = /\\/g;
168
- const reducePathComponents = (components) => {
169
- if (!Array.isArray(components) || components.length === 0) {
170
- return [];
171
- }
172
- const reduced = [components[0]];
173
- for (let i = 1; i < components.length; i++) {
174
- const component = components[i];
175
- if (!component)
176
- continue;
177
- if (component === '.')
178
- continue;
179
- if (component === '..') {
180
- if (reduced.length > 1) {
181
- if (reduced[reduced.length - 1] !== '..') {
182
- reduced.pop();
183
- continue;
184
- }
185
- }
186
- else if (reduced[0])
187
- continue;
188
- }
189
- reduced.push(component);
190
- }
191
- return reduced;
192
- };
193
- const getRootLength = (path) => {
194
- const rootLength = getEncodedRootLength(path);
195
- return rootLength < 0 ? ~rootLength : rootLength;
196
- };
197
- const getEncodedRootLength = (path) => {
198
- if (!path)
199
- return 0;
200
- const ch0 = path.charCodeAt(0);
201
- // POSIX or UNC
202
- if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
203
- if (path.charCodeAt(1) !== ch0)
204
- return 1; // POSIX: "/" (or non-normalized "\")
205
- const p1 = path.indexOf(ch0 === 47 /* slash */ ? '/' : altDirectorySeparator, 2);
206
- if (p1 < 0)
207
- return path.length; // UNC: "//server" or "\\server"
208
- return p1 + 1; // UNC: "//server/" or "\\server\"
209
- }
210
- // DOS
211
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) {
212
- const ch2 = path.charCodeAt(2);
213
- if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
214
- return 3; // DOS: "c:/" or "c:\"
215
- if (path.length === 2)
216
- return 2; // DOS: "c:" (but not "c:d")
217
- }
218
- // URL
219
- const schemeEnd = path.indexOf(urlSchemeSeparator);
220
- if (schemeEnd !== -1) {
221
- const authorityStart = schemeEnd + urlSchemeSeparator.length;
222
- const authorityEnd = path.indexOf('/', authorityStart);
223
- if (authorityEnd !== -1) {
224
- // URL: "file:///", "file://server/", "file://server/path"
225
- // For local "file" URLs, include the leading DOS volume (if present).
226
- // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
227
- // special case interpreted as "the machine from which the URL is being interpreted".
228
- const scheme = path.slice(0, schemeEnd);
229
- const authority = path.slice(authorityStart, authorityEnd);
230
- if (scheme === 'file' &&
231
- (authority === '' || authority === 'localhost') &&
232
- isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
233
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
234
- if (volumeSeparatorEnd !== -1) {
235
- if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) {
236
- // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
237
- return ~(volumeSeparatorEnd + 1);
238
- }
239
- if (volumeSeparatorEnd === path.length) {
240
- // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
241
- // but not "file:///c:d" or "file:///c%3ad"
242
- return ~volumeSeparatorEnd;
243
- }
244
- }
245
- }
246
- return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
247
- }
248
- return ~path.length; // URL: "file://server", "http://server"
249
- }
250
- // relative
251
- return 0;
252
- };
253
- const isVolumeCharacter = (charCode) => (charCode >= 97 /* a */ && charCode <= 122 /* z */) ||
254
- (charCode >= 65 /* A */ && charCode <= 90 /* Z */);
255
- const getFileUrlVolumeSeparatorEnd = (url, start) => {
256
- const ch0 = url.charCodeAt(start);
257
- if (ch0 === 58 /* colon */)
258
- return start + 1;
259
- if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {
260
- const ch2 = url.charCodeAt(start + 2);
261
- if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
262
- return start + 3;
263
- }
264
- return -1;
265
- };
266
- const pathComponents = (path, rootLength) => {
267
- const root = path.substring(0, rootLength);
268
- const rest = path.substring(rootLength).split('/');
269
- const restLen = rest.length;
270
- if (restLen > 0 && !rest[restLen - 1]) {
271
- rest.pop();
272
- }
273
- return [root, ...rest];
274
- };
275
-
276
- /**
277
- * Validates that a component tag meets required naming conventions to be used for a web component
278
- * @param tag the tag to validate
279
- * @returns an error message if the tag has an invalid name, undefined if the tag name passes all checks
280
- */
281
- const validateComponentTag = (tag) => {
282
- // we want to check this first since we call some String.prototype methods below
283
- if (typeof tag !== 'string') {
284
- return `Tag "${tag}" must be a string type`;
285
- }
286
- if (tag !== tag.trim()) {
287
- return `Tag can not contain white spaces`;
288
- }
289
- if (tag !== tag.toLowerCase()) {
290
- return `Tag can not contain upper case characters`;
291
- }
292
- if (tag.length === 0) {
293
- return `Received empty tag value`;
294
- }
295
- if (tag.indexOf(' ') > -1) {
296
- return `"${tag}" tag cannot contain a space`;
297
- }
298
- if (tag.indexOf(',') > -1) {
299
- return `"${tag}" tag cannot be used for multiple tags`;
300
- }
301
- const invalidChars = tag.replace(/\w|-/g, '');
302
- if (invalidChars !== '') {
303
- return `"${tag}" tag contains invalid characters: ${invalidChars}`;
304
- }
305
- if (tag.indexOf('-') === -1) {
306
- return `"${tag}" tag must contain a dash (-) to work as a valid web component`;
307
- }
308
- if (tag.indexOf('--') > -1) {
309
- return `"${tag}" tag cannot contain multiple dashes (--) next to each other`;
310
- }
311
- if (tag.indexOf('-') === 0) {
312
- return `"${tag}" tag cannot start with a dash (-)`;
313
- }
314
- if (tag.lastIndexOf('-') === tag.length - 1) {
315
- return `"${tag}" tag cannot end with a dash (-)`;
316
- }
317
- return undefined;
318
- };
319
-
320
- /**
321
- * All the Boolean options supported by the Stencil CLI
322
- */
323
- const BOOLEAN_CLI_ARGS = [
324
- 'build',
325
- 'cache',
326
- 'checkVersion',
327
- 'ci',
328
- 'compare',
329
- 'debug',
330
- 'dev',
331
- 'devtools',
332
- 'docs',
333
- 'e2e',
334
- 'es5',
335
- 'esm',
336
- 'headless',
337
- 'help',
338
- 'log',
339
- 'open',
340
- 'prerender',
341
- 'prerenderExternal',
342
- 'prod',
343
- 'profile',
344
- 'serviceWorker',
345
- 'screenshot',
346
- 'serve',
347
- 'skipNodeCheck',
348
- 'spec',
349
- 'ssr',
350
- 'stats',
351
- 'updateScreenshot',
352
- 'verbose',
353
- 'version',
354
- 'watch',
355
- // JEST CLI OPTIONS
356
- 'all',
357
- 'automock',
358
- 'bail',
359
- // 'cache', Stencil already supports this argument
360
- 'changedFilesWithAncestor',
361
- // 'ci', Stencil already supports this argument
362
- 'clearCache',
363
- 'clearMocks',
364
- 'collectCoverage',
365
- 'color',
366
- 'colors',
367
- 'coverage',
368
- // 'debug', Stencil already supports this argument
369
- 'detectLeaks',
370
- 'detectOpenHandles',
371
- 'errorOnDeprecated',
372
- 'expand',
373
- 'findRelatedTests',
374
- 'forceExit',
375
- 'init',
376
- 'injectGlobals',
377
- 'json',
378
- 'lastCommit',
379
- 'listTests',
380
- 'logHeapUsage',
381
- 'noStackTrace',
382
- 'notify',
383
- 'onlyChanged',
384
- 'onlyFailures',
385
- 'passWithNoTests',
386
- 'resetMocks',
387
- 'resetModules',
388
- 'restoreMocks',
389
- 'runInBand',
390
- 'runTestsByPath',
391
- 'showConfig',
392
- 'silent',
393
- 'skipFilter',
394
- 'testLocationInResults',
395
- 'updateSnapshot',
396
- 'useStderr',
397
- // 'verbose', Stencil already supports this argument
398
- // 'version', Stencil already supports this argument
399
- // 'watch', Stencil already supports this argument
400
- 'watchAll',
401
- 'watchman',
402
- ];
403
- /**
404
- * All the Number options supported by the Stencil CLI
405
- */
406
- const NUMBER_CLI_ARGS = [
407
- 'port',
408
- // JEST CLI ARGS
409
- 'maxConcurrency',
410
- 'testTimeout',
411
- ];
412
- /**
413
- * All the String options supported by the Stencil CLI
414
- */
415
- const STRING_CLI_ARGS = [
416
- 'address',
417
- 'config',
418
- 'docsApi',
419
- 'docsJson',
420
- 'emulate',
421
- 'root',
422
- 'screenshotConnector',
423
- // JEST CLI ARGS
424
- 'cacheDirectory',
425
- 'changedSince',
426
- 'collectCoverageFrom',
427
- // 'config', Stencil already supports this argument
428
- 'coverageDirectory',
429
- 'coverageThreshold',
430
- 'env',
431
- 'filter',
432
- 'globalSetup',
433
- 'globalTeardown',
434
- 'globals',
435
- 'haste',
436
- 'moduleNameMapper',
437
- 'notifyMode',
438
- 'outputFile',
439
- 'preset',
440
- 'prettierPath',
441
- 'resolver',
442
- 'rootDir',
443
- 'runner',
444
- 'testEnvironment',
445
- 'testEnvironmentOptions',
446
- 'testFailureExitCode',
447
- 'testNamePattern',
448
- 'testResultsProcessor',
449
- 'testRunner',
450
- 'testSequencer',
451
- 'testURL',
452
- 'timers',
453
- 'transform',
454
- // ARRAY ARGS
455
- 'collectCoverageOnlyFrom',
456
- 'coveragePathIgnorePatterns',
457
- 'coverageReporters',
458
- 'moduleDirectories',
459
- 'moduleFileExtensions',
460
- 'modulePathIgnorePatterns',
461
- 'modulePaths',
462
- 'projects',
463
- 'reporters',
464
- 'roots',
465
- 'selectProjects',
466
- 'setupFiles',
467
- 'setupFilesAfterEnv',
468
- 'snapshotSerializers',
469
- 'testMatch',
470
- 'testPathIgnorePatterns',
471
- 'testPathPattern',
472
- 'testRegex',
473
- 'transformIgnorePatterns',
474
- 'unmockedModulePathPatterns',
475
- 'watchPathIgnorePatterns',
476
- ];
477
- /**
478
- * All the CLI arguments which may have string or number values
479
- *
480
- * `maxWorkers` is an argument which is used both by Stencil _and_ by Jest,
481
- * which means that we need to support parsing both string and number values.
482
- */
483
- const STRING_NUMBER_CLI_ARGS = ['maxWorkers'];
484
- /**
485
- * All the LogLevel-type options supported by the Stencil CLI
486
- *
487
- * This is a bit silly since there's only one such argument atm,
488
- * but this approach lets us make sure that we're handling all
489
- * our arguments in a type-safe way.
490
- */
491
- const LOG_LEVEL_CLI_ARGS = ['logLevel'];
492
- /**
493
- * For a small subset of CLI options we support a short alias e.g. `'h'` for `'help'`
494
- */
495
- const CLI_ARG_ALIASES = {
496
- config: 'c',
497
- help: 'h',
498
- port: 'p',
499
- version: 'v',
500
- };
501
-
502
- /**
503
- * Parse command line arguments into a structured `ConfigFlags` object
504
- *
505
- * @param args an array of config flags
506
- * @param sys an optional compiler system
507
- * @returns a structured ConfigFlags object
508
- */
509
- const parseFlags = (args, sys) => {
510
- const flags = {
511
- task: null,
512
- args: [],
513
- knownArgs: [],
514
- unknownArgs: [],
515
- };
516
- // cmd line has more priority over npm scripts cmd
517
- flags.args = Array.isArray(args) ? args.slice() : [];
518
- if (flags.args.length > 0 && flags.args[0] && !flags.args[0].startsWith('-')) {
519
- flags.task = flags.args[0];
520
- }
521
- parseArgs(flags, flags.args);
522
- if (sys && sys.name === 'node') {
523
- const envArgs = getNpmConfigEnvArgs(sys);
524
- parseArgs(flags, envArgs);
525
- envArgs.forEach((envArg) => {
526
- if (!flags.args.includes(envArg)) {
527
- flags.args.push(envArg);
528
- }
529
- });
530
- }
531
- if (flags.task != null) {
532
- const i = flags.args.indexOf(flags.task);
533
- if (i > -1) {
534
- flags.args.splice(i, 1);
535
- }
536
- }
537
- flags.unknownArgs = flags.args.filter((arg) => {
538
- return !flags.knownArgs.includes(arg);
539
- });
540
- return flags;
541
- };
542
- /**
543
- * Parse command line arguments that are enumerated in the `config-flags`
544
- * module. Handles leading dashes on arguments, aliases that are defined for a
545
- * small number of arguments, and parsing values for non-boolean arguments
546
- * (e.g. port number for the dev server).
547
- *
548
- * @param flags a ConfigFlags object to which parsed arguments will be added
549
- * @param args an array of command-line arguments to parse
550
- */
551
- const parseArgs = (flags, args) => {
552
- BOOLEAN_CLI_ARGS.forEach((argName) => parseBooleanArg(flags, args, argName));
553
- STRING_CLI_ARGS.forEach((argName) => parseStringArg(flags, args, argName));
554
- NUMBER_CLI_ARGS.forEach((argName) => parseNumberArg(flags, args, argName));
555
- STRING_NUMBER_CLI_ARGS.forEach((argName) => parseStringNumberArg(flags, args, argName));
556
- LOG_LEVEL_CLI_ARGS.forEach((argName) => parseLogLevelArg(flags, args, argName));
557
- };
558
- /**
559
- * Parse a boolean CLI argument. For these, we support the following formats:
560
- *
561
- * - `--booleanArg`
562
- * - `--boolean-arg`
563
- * - `--noBooleanArg`
564
- * - `--no-boolean-arg`
565
- *
566
- * The final two variants should be parsed to a value of `false` on the config
567
- * object.
568
- *
569
- * @param flags the config flags object, while we'll modify
570
- * @param args our CLI arguments
571
- * @param configCaseName the argument we want to look at right now
572
- */
573
- const parseBooleanArg = (flags, args, configCaseName) => {
574
- // we support both dash-case and PascalCase versions of the parameter
575
- // argName is 'configCase' version which can be found in BOOLEAN_ARG_OPTS
576
- const alias = CLI_ARG_ALIASES[configCaseName];
577
- const dashCaseName = toDashCase(configCaseName);
578
- if (typeof flags[configCaseName] !== 'boolean') {
579
- flags[configCaseName] = null;
580
- }
581
- args.forEach((cmdArg) => {
582
- let value;
583
- if (cmdArg === `--${configCaseName}` || cmdArg === `--${dashCaseName}`) {
584
- value = true;
585
- }
586
- else if (cmdArg === `--no-${dashCaseName}` || cmdArg === `--no${dashToPascalCase(dashCaseName)}`) {
587
- value = false;
588
- }
589
- else if (alias && cmdArg === `-${alias}`) {
590
- value = true;
591
- }
592
- if (value !== undefined && cmdArg !== undefined) {
593
- flags[configCaseName] = value;
594
- flags.knownArgs.push(cmdArg);
595
- }
596
- });
597
- };
598
- /**
599
- * Parse a string CLI argument
600
- *
601
- * @param flags the config flags object, while we'll modify
602
- * @param args our CLI arguments
603
- * @param configCaseName the argument we want to look at right now
604
- */
605
- const parseStringArg = (flags, args, configCaseName) => {
606
- if (typeof flags[configCaseName] !== 'string') {
607
- flags[configCaseName] = null;
608
- }
609
- const { value, matchingArg } = getValue(args, configCaseName);
610
- if (value !== undefined && matchingArg !== undefined) {
611
- flags[configCaseName] = value;
612
- flags.knownArgs.push(matchingArg);
613
- flags.knownArgs.push(value);
614
- }
615
- };
616
- /**
617
- * Parse a number CLI argument
618
- *
619
- * @param flags the config flags object, while we'll modify
620
- * @param args our CLI arguments
621
- * @param configCaseName the argument we want to look at right now
622
- */
623
- const parseNumberArg = (flags, args, configCaseName) => {
624
- if (typeof flags[configCaseName] !== 'number') {
625
- flags[configCaseName] = null;
626
- }
627
- const { value, matchingArg } = getValue(args, configCaseName);
628
- if (value !== undefined && matchingArg !== undefined) {
629
- flags[configCaseName] = parseInt(value, 10);
630
- flags.knownArgs.push(matchingArg);
631
- flags.knownArgs.push(value);
632
- }
633
- };
634
- /**
635
- * Parse a CLI argument which may be either a string or a number
636
- *
637
- * @param flags the config flags object, while we'll modify
638
- * @param args our CLI arguments
639
- * @param configCaseName the argument we want to look at right now
640
- */
641
- const parseStringNumberArg = (flags, args, configCaseName) => {
642
- if (!['number', 'string'].includes(typeof flags[configCaseName])) {
643
- flags[configCaseName] = null;
644
- }
645
- const { value, matchingArg } = getValue(args, configCaseName);
646
- if (value !== undefined && matchingArg !== undefined) {
647
- if (CLI_ARG_STRING_REGEX.test(value)) {
648
- // if it matches the regex we treat it like a string
649
- flags[configCaseName] = value;
650
- }
651
- else {
652
- // it was a number, great!
653
- flags[configCaseName] = Number(value);
654
- }
655
- flags.knownArgs.push(matchingArg);
656
- flags.knownArgs.push(value);
657
- }
658
- };
659
- /**
660
- * We use this regular expression to detect CLI parameters which
661
- * should be parsed as string values (as opposed to numbers) for
662
- * the argument types for which we support both a string and a
663
- * number value.
664
- *
665
- * The regex tests for the presence of at least one character which is
666
- * _not_ a digit (`\d`), a period (`\.`), or one of the characters `"e"`,
667
- * `"E"`, `"+"`, or `"-"` (the latter four characters are necessary to
668
- * support the admittedly unlikely use of scientific notation, like `"4e+0"`
669
- * for `4`).
670
- *
671
- * Thus we'll match a string like `"50%"`, but not a string like `"50"` or
672
- * `"5.0"`. If it matches a given string we conclude that the string should
673
- * be parsed as a string literal, rather than using `Number` to convert it
674
- * to a number.
675
- */
676
- const CLI_ARG_STRING_REGEX = /[^\d\.Ee\+\-]+/g;
677
- /**
678
- * Parse a LogLevel CLI argument. These can be only a specific
679
- * set of strings, so this function takes care of validating that
680
- * the value is correct.
681
- *
682
- * @param flags the config flags object, while we'll modify
683
- * @param args our CLI arguments
684
- * @param configCaseName the argument we want to look at right now
685
- */
686
- const parseLogLevelArg = (flags, args, configCaseName) => {
687
- if (typeof flags[configCaseName] !== 'string') {
688
- flags[configCaseName] = null;
689
- }
690
- const { value, matchingArg } = getValue(args, configCaseName);
691
- if (value !== undefined && matchingArg !== undefined && isLogLevel(value)) {
692
- flags[configCaseName] = value;
693
- flags.knownArgs.push(matchingArg);
694
- flags.knownArgs.push(value);
695
- }
696
- };
697
- /**
698
- * Helper for pulling values out from the raw array of CLI arguments. This logic
699
- * is shared between a few different types of CLI args.
700
- *
701
- * We look for arguments in the following formats:
702
- *
703
- * - `--my-cli-argument value`
704
- * - `--my-cli-argument=value`
705
- * - `--myCliArgument value`
706
- * - `--myCliArgument=value`
707
- *
708
- * We also check for shortened aliases, which we define for a few arguments.
709
- *
710
- * @param args the CLI args we're dealing with
711
- * @param configCaseName the ConfigFlag key which we're looking to pull out a value for
712
- * @returns the value for the flag as well as the exact string which it matched from
713
- * the user input.
714
- */
715
- const getValue = (args, configCaseName) => {
716
- // for some CLI args we have a short alias, like 'c' for 'config'
717
- const alias = CLI_ARG_ALIASES[configCaseName];
718
- // we support supplying arguments in both dash-case and configCase
719
- // for ease of use
720
- const dashCaseName = toDashCase(configCaseName);
721
- let value;
722
- let matchingArg;
723
- args.forEach((arg, i) => {
724
- if (arg.startsWith(`--${dashCaseName}=`) || arg.startsWith(`--${configCaseName}=`)) {
725
- value = getEqualsValue(arg);
726
- matchingArg = arg;
727
- }
728
- else if (arg === `--${dashCaseName}` || arg === `--${configCaseName}`) {
729
- value = args[i + 1];
730
- matchingArg = arg;
731
- }
732
- else if (alias) {
733
- if (arg.startsWith(`-${alias}=`)) {
734
- value = getEqualsValue(arg);
735
- matchingArg = arg;
736
- }
737
- else if (arg === `-${alias}`) {
738
- value = args[i + 1];
739
- matchingArg = arg;
740
- }
741
- }
742
- });
743
- return { value, matchingArg };
744
- };
745
- /**
746
- * When a parameter is set in the format `--foobar=12` at the CLI (as opposed to
747
- * `--foobar 12`) we want to get the value after the `=` sign
748
- *
749
- * @param commandArgument the arg in question
750
- * @returns the value after the `=`
751
- */
752
- const getEqualsValue = (commandArgument) => commandArgument.split('=').slice(1).join('=');
753
- /**
754
- * Small helper for getting type-system-level assurance that a `string` can be
755
- * narrowed to a `LogLevel`
756
- *
757
- * @param maybeLogLevel the string to check
758
- * @returns whether this is a `LogLevel`
759
- */
760
- const isLogLevel = (maybeLogLevel) =>
761
- // unfortunately `includes` is typed on `ReadonlyArray<T>` as `(el: T):
762
- // boolean` so a `string` cannot be passed to `includes` on a
763
- // `ReadonlyArray` 😢 thus we `as any`
764
- //
765
- // see microsoft/TypeScript#31018 for some discussion of this
766
- LOG_LEVELS.includes(maybeLogLevel);
767
- const getNpmConfigEnvArgs = (sys) => {
768
- // process.env.npm_config_argv
769
- // {"remain":["4444"],"cooked":["run","serve","--port","4444"],"original":["run","serve","--port","4444"]}
770
- let args = [];
771
- try {
772
- const npmConfigArgs = sys.getEnvironmentVar('npm_config_argv');
773
- if (npmConfigArgs) {
774
- args = JSON.parse(npmConfigArgs).original;
775
- if (args[0] === 'run') {
776
- args = args.slice(2);
777
- }
778
- }
779
- }
780
- catch (e) { }
781
- return args;
782
- };
783
-
784
- const dependencies = [
785
- {
786
- name: "@stencil/core",
787
- version: "2.17.1",
788
- main: "compiler/stencil.js",
789
- resources: [
790
- "package.json",
791
- "compiler/lib.d.ts",
792
- "compiler/lib.dom.d.ts",
793
- "compiler/lib.dom.iterable.d.ts",
794
- "compiler/lib.es2015.collection.d.ts",
795
- "compiler/lib.es2015.core.d.ts",
796
- "compiler/lib.es2015.d.ts",
797
- "compiler/lib.es2015.generator.d.ts",
798
- "compiler/lib.es2015.iterable.d.ts",
799
- "compiler/lib.es2015.promise.d.ts",
800
- "compiler/lib.es2015.proxy.d.ts",
801
- "compiler/lib.es2015.reflect.d.ts",
802
- "compiler/lib.es2015.symbol.d.ts",
803
- "compiler/lib.es2015.symbol.wellknown.d.ts",
804
- "compiler/lib.es2016.array.include.d.ts",
805
- "compiler/lib.es2016.d.ts",
806
- "compiler/lib.es2016.full.d.ts",
807
- "compiler/lib.es2017.d.ts",
808
- "compiler/lib.es2017.full.d.ts",
809
- "compiler/lib.es2017.intl.d.ts",
810
- "compiler/lib.es2017.object.d.ts",
811
- "compiler/lib.es2017.sharedmemory.d.ts",
812
- "compiler/lib.es2017.string.d.ts",
813
- "compiler/lib.es2017.typedarrays.d.ts",
814
- "compiler/lib.es2018.asyncgenerator.d.ts",
815
- "compiler/lib.es2018.asynciterable.d.ts",
816
- "compiler/lib.es2018.d.ts",
817
- "compiler/lib.es2018.full.d.ts",
818
- "compiler/lib.es2018.intl.d.ts",
819
- "compiler/lib.es2018.promise.d.ts",
820
- "compiler/lib.es2018.regexp.d.ts",
821
- "compiler/lib.es2019.array.d.ts",
822
- "compiler/lib.es2019.d.ts",
823
- "compiler/lib.es2019.full.d.ts",
824
- "compiler/lib.es2019.object.d.ts",
825
- "compiler/lib.es2019.string.d.ts",
826
- "compiler/lib.es2019.symbol.d.ts",
827
- "compiler/lib.es2020.bigint.d.ts",
828
- "compiler/lib.es2020.d.ts",
829
- "compiler/lib.es2020.full.d.ts",
830
- "compiler/lib.es2020.intl.d.ts",
831
- "compiler/lib.es2020.promise.d.ts",
832
- "compiler/lib.es2020.sharedmemory.d.ts",
833
- "compiler/lib.es2020.string.d.ts",
834
- "compiler/lib.es2020.symbol.wellknown.d.ts",
835
- "compiler/lib.es2021.d.ts",
836
- "compiler/lib.es2021.full.d.ts",
837
- "compiler/lib.es2021.intl.d.ts",
838
- "compiler/lib.es2021.promise.d.ts",
839
- "compiler/lib.es2021.string.d.ts",
840
- "compiler/lib.es2021.weakref.d.ts",
841
- "compiler/lib.es5.d.ts",
842
- "compiler/lib.es6.d.ts",
843
- "compiler/lib.esnext.d.ts",
844
- "compiler/lib.esnext.full.d.ts",
845
- "compiler/lib.esnext.intl.d.ts",
846
- "compiler/lib.esnext.promise.d.ts",
847
- "compiler/lib.esnext.string.d.ts",
848
- "compiler/lib.esnext.weakref.d.ts",
849
- "compiler/lib.scripthost.d.ts",
850
- "compiler/lib.webworker.d.ts",
851
- "compiler/lib.webworker.importscripts.d.ts",
852
- "compiler/lib.webworker.iterable.d.ts",
853
- "internal/index.d.ts",
854
- "internal/index.js",
855
- "internal/package.json",
856
- "internal/stencil-ext-modules.d.ts",
857
- "internal/stencil-private.d.ts",
858
- "internal/stencil-public-compiler.d.ts",
859
- "internal/stencil-public-docs.d.ts",
860
- "internal/stencil-public-runtime.d.ts",
861
- "mock-doc/index.js",
862
- "mock-doc/package.json",
863
- "internal/client/css-shim.js",
864
- "internal/client/dom.js",
865
- "internal/client/index.js",
866
- "internal/client/package.json",
867
- "internal/client/patch-browser.js",
868
- "internal/client/patch-esm.js",
869
- "internal/client/shadow-css.js",
870
- "internal/hydrate/index.js",
871
- "internal/hydrate/package.json",
872
- "internal/hydrate/runner.js",
873
- "internal/hydrate/shadow-css.js",
874
- "internal/stencil-core/index.d.ts",
875
- "internal/stencil-core/index.js"
876
- ]
877
- },
878
- {
879
- name: "rollup",
880
- version: "2.42.3",
881
- main: "dist/es/rollup.browser.js"
882
- },
883
- {
884
- name: "terser",
885
- version: "5.6.1",
886
- main: "dist/bundle.min.js"
887
- },
888
- {
889
- name: "typescript",
890
- version: "4.5.4",
891
- main: "lib/typescript.js"
892
- }
893
- ];
894
-
895
- const findConfig = async (opts) => {
896
- const sys = opts.sys;
897
- const cwd = sys.getCurrentDirectory();
898
- const results = {
899
- configPath: null,
900
- rootDir: normalizePath(cwd),
901
- diagnostics: [],
902
- };
903
- let configPath = opts.configPath;
904
- if (isString(configPath)) {
905
- if (!sys.platformPath.isAbsolute(configPath)) {
906
- // passed in a custom stencil config location
907
- // but it's relative, so prefix the cwd
908
- configPath = normalizePath(sys.platformPath.join(cwd, configPath));
909
- }
910
- else {
911
- // config path already an absolute path, we're good here
912
- configPath = normalizePath(opts.configPath);
913
- }
914
- }
915
- else {
916
- // nothing was passed in, use the current working directory
917
- configPath = results.rootDir;
918
- }
919
- const stat = await sys.stat(configPath);
920
- if (stat.error) {
921
- const diagnostic = buildError(results.diagnostics);
922
- diagnostic.absFilePath = configPath;
923
- diagnostic.header = `Invalid config path`;
924
- diagnostic.messageText = `Config path "${configPath}" not found`;
925
- return results;
926
- }
927
- if (stat.isFile) {
928
- results.configPath = configPath;
929
- results.rootDir = sys.platformPath.dirname(configPath);
930
- }
931
- else if (stat.isDirectory) {
932
- // this is only a directory, so let's make some assumptions
933
- for (const configName of ['stencil.config.ts', 'stencil.config.js']) {
934
- const testConfigFilePath = sys.platformPath.join(configPath, configName);
935
- const stat = await sys.stat(testConfigFilePath);
936
- if (stat.isFile) {
937
- results.configPath = testConfigFilePath;
938
- results.rootDir = sys.platformPath.dirname(testConfigFilePath);
939
- break;
940
- }
941
- }
942
- }
943
- return results;
944
- };
945
-
946
- const loadCoreCompiler = async (sys) => {
947
- await sys.dynamicImport(sys.getCompilerExecutingPath());
948
- return globalThis.stencil;
949
- };
950
-
951
- const startupLog = (logger, task) => {
952
- if (task === 'info' || task === 'serve' || task === 'version') {
953
- return;
954
- }
955
- logger.info(logger.cyan(`@stencil/core`));
956
- };
957
- const startupLogVersion = (logger, task, coreCompiler) => {
958
- if (task === 'info' || task === 'serve' || task === 'version') {
959
- return;
960
- }
961
- const isDevBuild = coreCompiler.version.includes('-dev.');
962
- let startupMsg;
963
- if (isDevBuild) {
964
- startupMsg = logger.yellow('[LOCAL DEV]');
965
- }
966
- else {
967
- startupMsg = logger.cyan(`v${coreCompiler.version}`);
968
- }
969
- startupMsg += logger.emoji(' ' + coreCompiler.vermoji);
970
- logger.info(startupMsg);
971
- };
972
- const loadedCompilerLog = (sys, logger, flags, coreCompiler) => {
973
- const sysDetails = sys.details;
974
- const runtimeInfo = `${sys.name} ${sys.version}`;
975
- const platformInfo = `${sysDetails.platform}, ${sysDetails.cpuModel}`;
976
- const statsInfo = `cpus: ${sys.hardwareConcurrency}, freemem: ${Math.round(sysDetails.freemem() / 1000000)}MB, totalmem: ${Math.round(sysDetails.totalmem / 1000000)}MB`;
977
- if (logger.getLevel() === 'debug') {
978
- logger.debug(runtimeInfo);
979
- logger.debug(platformInfo);
980
- logger.debug(statsInfo);
981
- logger.debug(`compiler: ${sys.getCompilerExecutingPath()}`);
982
- logger.debug(`build: ${coreCompiler.buildId}`);
983
- }
984
- else if (flags.ci) {
985
- logger.info(runtimeInfo);
986
- logger.info(platformInfo);
987
- logger.info(statsInfo);
988
- }
989
- };
990
- const startupCompilerLog = (coreCompiler, config) => {
991
- if (config.suppressLogs === true) {
992
- return;
993
- }
994
- const { logger } = config;
995
- const isDebug = logger.getLevel() === 'debug';
996
- const isPrerelease = coreCompiler.version.includes('-');
997
- const isDevBuild = coreCompiler.version.includes('-dev.');
998
- if (isPrerelease && !isDevBuild) {
999
- logger.warn(logger.yellow(`This is a prerelease build, undocumented changes might happen at any time. Technical support is not available for prereleases, but any assistance testing is appreciated.`));
1000
- }
1001
- if (config.devMode && !isDebug) {
1002
- if (config.buildEs5) {
1003
- logger.warn(`Generating ES5 during development is a very task expensive, initial and incremental builds will be much slower. Drop the '--es5' flag and use a modern browser for development.`);
1004
- }
1005
- if (!config.enableCache) {
1006
- logger.warn(`Disabling cache during development will slow down incremental builds.`);
1007
- }
1008
- }
1009
- };
1010
-
1011
- const taskPrerender = async (coreCompiler, config) => {
1012
- startupCompilerLog(coreCompiler, config);
1013
- const hydrateAppFilePath = config.flags.unknownArgs[0];
1014
- if (typeof hydrateAppFilePath !== 'string') {
1015
- config.logger.error(`Missing hydrate app script path`);
1016
- return config.sys.exit(1);
1017
- }
1018
- const srcIndexHtmlPath = config.srcIndexHtml;
1019
- const diagnostics = await runPrerenderTask(coreCompiler, config, hydrateAppFilePath, null, srcIndexHtmlPath);
1020
- config.logger.printDiagnostics(diagnostics);
1021
- if (diagnostics.some((d) => d.level === 'error')) {
1022
- return config.sys.exit(1);
1023
- }
1024
- };
1025
- const runPrerenderTask = async (coreCompiler, config, hydrateAppFilePath, componentGraph, srcIndexHtmlPath) => {
1026
- const diagnostics = [];
1027
- try {
1028
- const prerenderer = await coreCompiler.createPrerenderer(config);
1029
- const results = await prerenderer.start({
1030
- hydrateAppFilePath,
1031
- componentGraph,
1032
- srcIndexHtmlPath,
1033
- });
1034
- diagnostics.push(...results.diagnostics);
1035
- }
1036
- catch (e) {
1037
- catchError(diagnostics, e);
1038
- }
1039
- return diagnostics;
1040
- };
1041
-
1042
- const startCheckVersion = async (config, currentVersion) => {
1043
- if (config.devMode && !config.flags.ci && !currentVersion.includes('-dev.') && isFunction(config.sys.checkVersion)) {
1044
- return config.sys.checkVersion(config.logger, currentVersion);
1045
- }
1046
- return null;
1047
- };
1048
- const printCheckVersionResults = async (versionChecker) => {
1049
- if (versionChecker) {
1050
- const checkVersionResults = await versionChecker;
1051
- if (isFunction(checkVersionResults)) {
1052
- checkVersionResults();
1053
- }
1054
- }
1055
- };
1056
-
1057
- const taskWatch = async (coreCompiler, config) => {
1058
- let devServer = null;
1059
- let exitCode = 0;
1060
- try {
1061
- startupCompilerLog(coreCompiler, config);
1062
- const versionChecker = startCheckVersion(config, coreCompiler.version);
1063
- const compiler = await coreCompiler.createCompiler(config);
1064
- const watcher = await compiler.createWatcher();
1065
- if (config.flags.serve) {
1066
- const devServerPath = config.sys.getDevServerExecutingPath();
1067
- const { start } = await config.sys.dynamicImport(devServerPath);
1068
- devServer = await start(config.devServer, config.logger, watcher);
1069
- }
1070
- config.sys.onProcessInterrupt(() => {
1071
- config.logger.debug(`close watch`);
1072
- compiler && compiler.destroy();
1073
- });
1074
- const rmVersionCheckerLog = watcher.on('buildFinish', async () => {
1075
- // log the version check one time
1076
- rmVersionCheckerLog();
1077
- printCheckVersionResults(versionChecker);
1078
- });
1079
- if (devServer) {
1080
- const rmDevServerLog = watcher.on('buildFinish', () => {
1081
- // log the dev server url one time
1082
- rmDevServerLog();
1083
- config.logger.info(`${config.logger.cyan(devServer.browserUrl)}\n`);
1084
- });
1085
- }
1086
- const closeResults = await watcher.start();
1087
- if (closeResults.exitCode > 0) {
1088
- exitCode = closeResults.exitCode;
1089
- }
1090
- }
1091
- catch (e) {
1092
- exitCode = 1;
1093
- config.logger.error(e);
1094
- }
1095
- if (devServer) {
1096
- await devServer.close();
1097
- }
1098
- if (exitCode > 0) {
1099
- return config.sys.exit(exitCode);
1100
- }
1101
- };
1102
-
1103
- const tryFn = async (fn, ...args) => {
1104
- try {
1105
- return await fn(...args);
1106
- }
1107
- catch (_a) {
1108
- // ignore
1109
- }
1110
- return null;
1111
- };
1112
- const isInteractive = (sys, flags, object) => {
1113
- const terminalInfo = object ||
1114
- Object.freeze({
1115
- tty: sys.isTTY() ? true : false,
1116
- ci: ['CI', 'BUILD_ID', 'BUILD_NUMBER', 'BITBUCKET_COMMIT', 'CODEBUILD_BUILD_ARN'].filter((v) => !!sys.getEnvironmentVar(v)).length > 0 || !!flags.ci,
1117
- });
1118
- return terminalInfo.tty && !terminalInfo.ci;
1119
- };
1120
- const UUID_REGEX = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i);
1121
- // Plucked from https://github.com/ionic-team/capacitor/blob/b893a57aaaf3a16e13db9c33037a12f1a5ac92e0/cli/src/util/uuid.ts
1122
- function uuidv4() {
1123
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
1124
- const r = (Math.random() * 16) | 0;
1125
- const v = c == 'x' ? r : (r & 0x3) | 0x8;
1126
- return v.toString(16);
1127
- });
1128
- }
1129
- /**
1130
- * Reads and parses a JSON file from the given `path`
1131
- * @param sys The system where the command is invoked
1132
- * @param path the path on the file system to read and parse
1133
- * @returns the parsed JSON
1134
- */
1135
- async function readJson(sys, path) {
1136
- const file = await sys.readFile(path);
1137
- return !!file && JSON.parse(file);
1138
- }
1139
- /**
1140
- * Does the command have the debug flag?
1141
- * @param flags The configuration flags passed into the Stencil command
1142
- * @returns true if --debug has been passed, otherwise false
1143
- */
1144
- function hasDebug(flags) {
1145
- return flags.debug;
1146
- }
1147
- /**
1148
- * Does the command have the verbose and debug flags?
1149
- * @param flags The configuration flags passed into the Stencil command
1150
- * @returns true if both --debug and --verbose have been passed, otherwise false
1151
- */
1152
- function hasVerbose(flags) {
1153
- return flags.verbose && hasDebug(flags);
1154
- }
1155
-
1156
- /**
1157
- * Used to determine if tracking should occur.
1158
- * @param config The config passed into the Stencil command
1159
- * @param sys The system where the command is invoked
1160
- * @param ci whether or not the process is running in a Continuous Integration (CI) environment
1161
- * @returns true if telemetry should be sent, false otherwise
1162
- */
1163
- async function shouldTrack(config, sys, ci) {
1164
- return !ci && isInteractive(sys, config.flags) && (await checkTelemetry(sys));
1165
- }
1166
-
1167
- const isTest$1 = () => process.env.JEST_WORKER_ID !== undefined;
1168
- const defaultConfig = (sys) => sys.resolvePath(`${sys.homeDir()}/.ionic/${isTest$1() ? 'tmp-config.json' : 'config.json'}`);
1169
- const defaultConfigDirectory = (sys) => sys.resolvePath(`${sys.homeDir()}/.ionic`);
1170
- /**
1171
- * Reads an Ionic configuration file from disk, parses it, and performs any necessary corrections to it if certain
1172
- * values are deemed to be malformed
1173
- * @param sys The system where the command is invoked
1174
- * @returns the config read from disk that has been potentially been updated
1175
- */
1176
- async function readConfig(sys) {
1177
- let config = await readJson(sys, defaultConfig(sys));
1178
- if (!config) {
1179
- config = {
1180
- 'tokens.telemetry': uuidv4(),
1181
- 'telemetry.stencil': true,
1182
- };
1183
- await writeConfig(sys, config);
1184
- }
1185
- else if (!UUID_REGEX.test(config['tokens.telemetry'])) {
1186
- const newUuid = uuidv4();
1187
- await writeConfig(sys, { ...config, 'tokens.telemetry': newUuid });
1188
- config['tokens.telemetry'] = newUuid;
1189
- }
1190
- return config;
1191
- }
1192
- /**
1193
- * Writes an Ionic configuration file to disk.
1194
- * @param sys The system where the command is invoked
1195
- * @param config The config passed into the Stencil command
1196
- * @returns boolean If the command was successful
1197
- */
1198
- async function writeConfig(sys, config) {
1199
- let result = false;
1200
- try {
1201
- await sys.createDir(defaultConfigDirectory(sys), { recursive: true });
1202
- await sys.writeFile(defaultConfig(sys), JSON.stringify(config, null, 2));
1203
- result = true;
1204
- }
1205
- catch (error) {
1206
- console.error(`Stencil Telemetry: couldn't write configuration file to ${defaultConfig(sys)} - ${error}.`);
1207
- }
1208
- return result;
1209
- }
1210
- /**
1211
- * Update a subset of the Ionic config.
1212
- * @param sys The system where the command is invoked
1213
- * @param newOptions The new options to save
1214
- * @returns boolean If the command was successful
1215
- */
1216
- async function updateConfig(sys, newOptions) {
1217
- const config = await readConfig(sys);
1218
- return await writeConfig(sys, Object.assign(config, newOptions));
1219
- }
1220
-
1221
- const isOutputTargetHydrate = (o) => o.type === DIST_HYDRATE_SCRIPT;
1222
- const isOutputTargetDocs = (o) => o.type === DOCS_README || o.type === DOCS_JSON || o.type === DOCS_CUSTOM || o.type === DOCS_VSCODE;
1223
- const DIST_HYDRATE_SCRIPT = 'dist-hydrate-script';
1224
- const DOCS_CUSTOM = 'docs-custom';
1225
- const DOCS_JSON = 'docs-json';
1226
- const DOCS_README = 'docs-readme';
1227
- const DOCS_VSCODE = 'docs-vscode';
1228
- const WWW = 'www';
1229
-
1230
- /**
1231
- * Used to within taskBuild to provide the component_count property.
1232
- *
1233
- * @param sys The system where the command is invoked
1234
- * @param config The config passed into the Stencil command
1235
- * @param coreCompiler The compiler used to do builds
1236
- * @param result The results of a compiler build.
1237
- */
1238
- async function telemetryBuildFinishedAction(sys, config, coreCompiler, result) {
1239
- const tracking = await shouldTrack(config, sys, config.flags.ci);
1240
- if (!tracking) {
1241
- return;
1242
- }
1243
- const component_count = Object.keys(result.componentGraph).length;
1244
- const data = await prepareData(coreCompiler, config, sys, result.duration, component_count);
1245
- await sendMetric(sys, config, 'stencil_cli_command', data);
1246
- config.logger.debug(`${config.logger.blue('Telemetry')}: ${config.logger.gray(JSON.stringify(data))}`);
1247
- }
1248
- /**
1249
- * A function to wrap a compiler task function around. Will send telemetry if, and only if, the machine allows.
1250
- *
1251
- * @param sys The system where the command is invoked
1252
- * @param config The config passed into the Stencil command
1253
- * @param coreCompiler The compiler used to do builds
1254
- * @param action A Promise-based function to call in order to get the duration of any given command.
1255
- * @returns void
1256
- */
1257
- async function telemetryAction(sys, config, coreCompiler, action) {
1258
- const tracking = await shouldTrack(config, sys, !!config.flags.ci);
1259
- let duration = undefined;
1260
- let error;
1261
- if (action) {
1262
- const start = new Date();
1263
- try {
1264
- await action();
1265
- }
1266
- catch (e) {
1267
- error = e;
1268
- }
1269
- const end = new Date();
1270
- duration = end.getTime() - start.getTime();
1271
- }
1272
- // We'll get componentCount details inside the taskBuild, so let's not send two messages.
1273
- if (!tracking || (config.flags.task == 'build' && !config.flags.args.includes('--watch'))) {
1274
- return;
1275
- }
1276
- const data = await prepareData(coreCompiler, config, sys, duration);
1277
- await sendMetric(sys, config, 'stencil_cli_command', data);
1278
- config.logger.debug(`${config.logger.blue('Telemetry')}: ${config.logger.gray(JSON.stringify(data))}`);
1279
- if (error) {
1280
- throw error;
1281
- }
1282
- }
1283
- function hasAppTarget(config) {
1284
- return config.outputTargets.some((target) => target.type === WWW && (!!target.serviceWorker || (!!target.baseUrl && target.baseUrl !== '/')));
1285
- }
1286
- function isUsingYarn(sys) {
1287
- var _a;
1288
- return ((_a = sys.getEnvironmentVar('npm_execpath')) === null || _a === void 0 ? void 0 : _a.includes('yarn')) || false;
1289
- }
1290
- async function getActiveTargets(config) {
1291
- const result = config.outputTargets.map((t) => t.type);
1292
- return Array.from(new Set(result));
1293
- }
1294
- /**
1295
- * Prepare data for telemetry
1296
- *
1297
- * @param coreCompiler the core compiler
1298
- * @param config the current Stencil config
1299
- * @param sys the compiler system instance in use
1300
- * @param duration_ms the duration of the action being tracked
1301
- * @param component_count the number of components being built (optional)
1302
- * @returns a Promise wrapping data for the telemetry endpoint
1303
- */
1304
- const prepareData = async (coreCompiler, config, sys, duration_ms, component_count = undefined) => {
1305
- const { typescript, rollup } = coreCompiler.versions || { typescript: 'unknown', rollup: 'unknown' };
1306
- const { packages, packagesNoVersions } = await getInstalledPackages(sys, config);
1307
- const targets = await getActiveTargets(config);
1308
- const yarn = isUsingYarn(sys);
1309
- const stencil = coreCompiler.version || 'unknown';
1310
- const system = `${sys.name} ${sys.version}`;
1311
- const os_name = sys.details.platform;
1312
- const os_version = sys.details.release;
1313
- const cpu_model = sys.details.cpuModel;
1314
- const build = coreCompiler.buildId || 'unknown';
1315
- const has_app_pwa_config = hasAppTarget(config);
1316
- const anonymizedConfig = anonymizeConfigForTelemetry(config);
1317
- return {
1318
- yarn,
1319
- duration_ms,
1320
- component_count,
1321
- targets,
1322
- packages,
1323
- packages_no_versions: packagesNoVersions,
1324
- arguments: config.flags.args,
1325
- task: config.flags.task,
1326
- stencil,
1327
- system,
1328
- system_major: getMajorVersion(system),
1329
- os_name,
1330
- os_version,
1331
- cpu_model,
1332
- build,
1333
- typescript,
1334
- rollup,
1335
- has_app_pwa_config,
1336
- config: anonymizedConfig,
1337
- };
1338
- };
1339
- // props in output targets for which we retain their original values when
1340
- // preparing a config for telemetry
1341
- //
1342
- // we omit the values of all other fields on output targets.
1343
- const OUTPUT_TARGET_KEYS_TO_KEEP = ['type'];
1344
- // top-level config props that we anonymize for telemetry
1345
- const CONFIG_PROPS_TO_ANONYMIZE = [
1346
- 'rootDir',
1347
- 'fsNamespace',
1348
- 'packageJsonFilePath',
1349
- 'namespace',
1350
- 'srcDir',
1351
- 'srcIndexHtml',
1352
- 'buildLogFilePath',
1353
- 'cacheDir',
1354
- 'configPath',
1355
- 'tsconfig',
1356
- ];
1357
- // Props we delete entirely from the config for telemetry
1358
- //
1359
- // TODO(STENCIL-469): Investigate improving anonymization for tsCompilerOptions and devServer
1360
- const CONFIG_PROPS_TO_DELETE = ['sys', 'logger', 'tsCompilerOptions', 'devServer'];
1361
- /**
1362
- * Anonymize the config for telemetry, replacing potentially revealing config props
1363
- * with a placeholder string if they are present (this lets us still track how frequently
1364
- * these config options are being used)
1365
- *
1366
- * @param config the config to anonymize
1367
- * @returns an anonymized copy of the same config
1368
- */
1369
- const anonymizeConfigForTelemetry = (config) => {
1370
- var _a;
1371
- const anonymizedConfig = { ...config };
1372
- for (const prop of CONFIG_PROPS_TO_ANONYMIZE) {
1373
- if (anonymizedConfig[prop] !== undefined) {
1374
- anonymizedConfig[prop] = 'omitted';
1375
- }
1376
- }
1377
- anonymizedConfig.outputTargets = ((_a = config.outputTargets) !== null && _a !== void 0 ? _a : []).map((target) => {
1378
- // Anonymize the outputTargets on our configuration, taking advantage of the
1379
- // optional 2nd argument to `JSON.stringify`. If anything is not a string
1380
- // we retain it so that any nested properties are handled, else we check
1381
- // whether it's in our 'keep' list to decide whether to keep it or replace it
1382
- // with `"omitted"`.
1383
- const anonymizedOT = JSON.parse(JSON.stringify(target, (key, value) => {
1384
- if (!(typeof value === 'string')) {
1385
- return value;
1386
- }
1387
- if (OUTPUT_TARGET_KEYS_TO_KEEP.includes(key)) {
1388
- return value;
1389
- }
1390
- return 'omitted';
1391
- }));
1392
- // this prop has to be handled separately because it is an array
1393
- // so the replace function above will be called with all of its
1394
- // members, giving us `["omitted", "omitted", ...]`.
1395
- //
1396
- // Instead, we check for its presence and manually copy over.
1397
- if (isOutputTargetHydrate(target) && target.external) {
1398
- anonymizedOT['external'] = target.external.concat();
1399
- }
1400
- return anonymizedOT;
1401
- });
1402
- // TODO(STENCIL-469): Investigate improving anonymization for tsCompilerOptions and devServer
1403
- for (const prop of CONFIG_PROPS_TO_DELETE) {
1404
- delete anonymizedConfig[prop];
1405
- }
1406
- return anonymizedConfig;
1407
- };
1408
- /**
1409
- * Reads package-lock.json, yarn.lock, and package.json files in order to cross-reference
1410
- * the dependencies and devDependencies properties. Pulls up the current installed version
1411
- * of each package under the @stencil, @ionic, and @capacitor scopes.
1412
- *
1413
- * @param sys the system instance where telemetry is invoked
1414
- * @param config the Stencil configuration associated with the current task that triggered telemetry
1415
- * @returns an object listing all dev and production dependencies under the aforementioned scopes
1416
- */
1417
- async function getInstalledPackages(sys, config) {
1418
- let packages = [];
1419
- let packagesNoVersions = [];
1420
- const yarn = isUsingYarn(sys);
1421
- try {
1422
- // Read package.json and package-lock.json
1423
- const appRootDir = sys.getCurrentDirectory();
1424
- const packageJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + '/package.json'));
1425
- // They don't have a package.json for some reason? Eject button.
1426
- if (!packageJson) {
1427
- return { packages, packagesNoVersions };
1428
- }
1429
- const rawPackages = Object.entries({
1430
- ...packageJson.devDependencies,
1431
- ...packageJson.dependencies,
1432
- });
1433
- // Collect packages only in the stencil, ionic, or capacitor org's:
1434
- // https://www.npmjs.com/org/stencil
1435
- const ionicPackages = rawPackages.filter(([k]) => k.startsWith('@stencil/') || k.startsWith('@ionic/') || k.startsWith('@capacitor/'));
1436
- try {
1437
- packages = yarn ? await yarnPackages(sys, ionicPackages) : await npmPackages(sys, ionicPackages);
1438
- }
1439
- catch (e) {
1440
- packages = ionicPackages.map(([k, v]) => `${k}@${v.replace('^', '')}`);
1441
- }
1442
- packagesNoVersions = ionicPackages.map(([k]) => `${k}`);
1443
- return { packages, packagesNoVersions };
1444
- }
1445
- catch (err) {
1446
- hasDebug(config.flags) && console.error(err);
1447
- return { packages, packagesNoVersions };
1448
- }
1449
- }
1450
- /**
1451
- * Visits the npm lock file to find the exact versions that are installed
1452
- * @param sys The system where the command is invoked
1453
- * @param ionicPackages a list of the found packages matching `@stencil`, `@capacitor`, or `@ionic` from the package.json file.
1454
- * @returns an array of strings of all the packages and their versions.
1455
- */
1456
- async function npmPackages(sys, ionicPackages) {
1457
- const appRootDir = sys.getCurrentDirectory();
1458
- const packageLockJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + '/package-lock.json'));
1459
- return ionicPackages.map(([k, v]) => {
1460
- var _a, _b, _c, _d;
1461
- let version = (_d = (_b = (_a = packageLockJson === null || packageLockJson === void 0 ? void 0 : packageLockJson.dependencies[k]) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : (_c = packageLockJson === null || packageLockJson === void 0 ? void 0 : packageLockJson.devDependencies[k]) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : v;
1462
- version = version.includes('file:') ? sanitizeDeclaredVersion(v) : version;
1463
- return `${k}@${version}`;
1464
- });
1465
- }
1466
- /**
1467
- * Visits the yarn lock file to find the exact versions that are installed
1468
- * @param sys The system where the command is invoked
1469
- * @param ionicPackages a list of the found packages matching `@stencil`, `@capacitor`, or `@ionic` from the package.json file.
1470
- * @returns an array of strings of all the packages and their versions.
1471
- */
1472
- async function yarnPackages(sys, ionicPackages) {
1473
- const appRootDir = sys.getCurrentDirectory();
1474
- const yarnLock = sys.readFileSync(sys.resolvePath(appRootDir + '/yarn.lock'));
1475
- const yarnLockYml = sys.parseYarnLockFile(yarnLock);
1476
- return ionicPackages.map(([k, v]) => {
1477
- var _a;
1478
- const identifiedVersion = `${k}@${v}`;
1479
- let version = (_a = yarnLockYml.object[identifiedVersion]) === null || _a === void 0 ? void 0 : _a.version;
1480
- version = version.includes('undefined') ? sanitizeDeclaredVersion(identifiedVersion) : version;
1481
- return `${k}@${version}`;
1482
- });
1483
- }
1484
- /**
1485
- * This function is used for fallback purposes, where an npm or yarn lock file doesn't exist in the consumers directory.
1486
- * This will strip away '*', '^' and '~' from the declared package versions in a package.json.
1487
- * @param version the raw semver pattern identifier version string
1488
- * @returns a cleaned up representation without any qualifiers
1489
- */
1490
- function sanitizeDeclaredVersion(version) {
1491
- return version.replace(/[*^~]/g, '');
1492
- }
1493
- /**
1494
- * If telemetry is enabled, send a metric to an external data store
1495
- *
1496
- * @param sys the system instance where telemetry is invoked
1497
- * @param config the Stencil configuration associated with the current task that triggered telemetry
1498
- * @param name the name of a trackable metric. Note this name is not necessarily a scalar value to track, like
1499
- * "Stencil Version". For example, "stencil_cli_command" is a name that is used to track all CLI command information.
1500
- * @param value the data to send to the external data store under the provided name argument
1501
- */
1502
- async function sendMetric(sys, config, name, value) {
1503
- const session_id = await getTelemetryToken(sys);
1504
- const message = {
1505
- name,
1506
- timestamp: new Date().toISOString(),
1507
- source: 'stencil_cli',
1508
- value,
1509
- session_id,
1510
- };
1511
- await sendTelemetry(sys, config, message);
1512
- }
1513
- /**
1514
- * Used to read the config file's tokens.telemetry property.
1515
- *
1516
- * @param sys The system where the command is invoked
1517
- * @returns string
1518
- */
1519
- async function getTelemetryToken(sys) {
1520
- const config = await readConfig(sys);
1521
- if (config['tokens.telemetry'] === undefined) {
1522
- config['tokens.telemetry'] = uuidv4();
1523
- await writeConfig(sys, config);
1524
- }
1525
- return config['tokens.telemetry'];
1526
- }
1527
- /**
1528
- * Issues a request to the telemetry server.
1529
- * @param sys The system where the command is invoked
1530
- * @param config The config passed into the Stencil command
1531
- * @param data Data to be tracked
1532
- */
1533
- async function sendTelemetry(sys, config, data) {
1534
- try {
1535
- const now = new Date().toISOString();
1536
- const body = {
1537
- metrics: [data],
1538
- sent_at: now,
1539
- };
1540
- // This request is only made if telemetry is on.
1541
- const response = await sys.fetch('https://api.ionicjs.com/events/metrics', {
1542
- method: 'POST',
1543
- headers: {
1544
- 'Content-Type': 'application/json',
1545
- },
1546
- body: JSON.stringify(body),
1547
- });
1548
- hasVerbose(config.flags) &&
1549
- console.debug('\nSent %O metric to events service (status: %O)', data.name, response.status, '\n');
1550
- if (response.status !== 204) {
1551
- hasVerbose(config.flags) &&
1552
- console.debug('\nBad response from events service. Request body: %O', response.body.toString(), '\n');
1553
- }
1554
- }
1555
- catch (e) {
1556
- hasVerbose(config.flags) && console.debug('Telemetry request failed:', e);
1557
- }
1558
- }
1559
- /**
1560
- * Checks if telemetry is enabled on this machine
1561
- * @param sys The system where the command is invoked
1562
- * @returns true if telemetry is enabled, false otherwise
1563
- */
1564
- async function checkTelemetry(sys) {
1565
- const config = await readConfig(sys);
1566
- if (config['telemetry.stencil'] === undefined) {
1567
- config['telemetry.stencil'] = true;
1568
- await writeConfig(sys, config);
1569
- }
1570
- return config['telemetry.stencil'];
1571
- }
1572
- /**
1573
- * Writes to the config file, enabling telemetry for this machine.
1574
- * @param sys The system where the command is invoked
1575
- * @returns true if writing the file was successful, false otherwise
1576
- */
1577
- async function enableTelemetry(sys) {
1578
- return await updateConfig(sys, { 'telemetry.stencil': true });
1579
- }
1580
- /**
1581
- * Writes to the config file, disabling telemetry for this machine.
1582
- * @param sys The system where the command is invoked
1583
- * @returns true if writing the file was successful, false otherwise
1584
- */
1585
- async function disableTelemetry(sys) {
1586
- return await updateConfig(sys, { 'telemetry.stencil': false });
1587
- }
1588
- /**
1589
- * Takes in a semver string in order to return the major version.
1590
- * @param version The fully qualified semver version
1591
- * @returns a string of the major version
1592
- */
1593
- function getMajorVersion(version) {
1594
- const parts = version.split('.');
1595
- return parts[0];
1596
- }
1597
-
1598
- const taskBuild = async (coreCompiler, config, sys) => {
1599
- if (config.flags.watch) {
1600
- // watch build
1601
- await taskWatch(coreCompiler, config);
1602
- return;
1603
- }
1604
- // one-time build
1605
- let exitCode = 0;
1606
- try {
1607
- startupCompilerLog(coreCompiler, config);
1608
- const versionChecker = startCheckVersion(config, coreCompiler.version);
1609
- const compiler = await coreCompiler.createCompiler(config);
1610
- const results = await compiler.build();
1611
- // TODO(STENCIL-148) make this parameter no longer optional, remove the surrounding if statement
1612
- if (sys) {
1613
- await telemetryBuildFinishedAction(sys, config, coreCompiler, results);
1614
- }
1615
- await compiler.destroy();
1616
- if (results.hasError) {
1617
- exitCode = 1;
1618
- }
1619
- else if (config.flags.prerender) {
1620
- const prerenderDiagnostics = await runPrerenderTask(coreCompiler, config, results.hydrateAppFilePath, results.componentGraph, null);
1621
- config.logger.printDiagnostics(prerenderDiagnostics);
1622
- if (prerenderDiagnostics.some((d) => d.level === 'error')) {
1623
- exitCode = 1;
1624
- }
1625
- }
1626
- await printCheckVersionResults(versionChecker);
1627
- }
1628
- catch (e) {
1629
- exitCode = 1;
1630
- config.logger.error(e);
1631
- }
1632
- if (exitCode > 0) {
1633
- return config.sys.exit(exitCode);
1634
- }
1635
- };
1636
-
1637
- const taskDocs = async (coreCompiler, config) => {
1638
- config.devServer = null;
1639
- config.outputTargets = config.outputTargets.filter(isOutputTargetDocs);
1640
- config.devMode = true;
1641
- startupCompilerLog(coreCompiler, config);
1642
- const compiler = await coreCompiler.createCompiler(config);
1643
- await compiler.build();
1644
- await compiler.destroy();
1645
- };
1646
-
1647
- const IS_NODE_ENV = typeof global !== 'undefined' &&
1648
- typeof require === 'function' &&
1649
- !!global.process &&
1650
- typeof __filename === 'string' &&
1651
- (!global.origin || typeof global.origin !== 'string');
1652
- const IS_BROWSER_ENV = typeof location !== 'undefined' && typeof navigator !== 'undefined' && typeof XMLHttpRequest !== 'undefined';
1653
-
1654
- /**
1655
- * Task to generate component boilerplate and write it to disk. This task can
1656
- * cause the program to exit with an error under various circumstances, such as
1657
- * being called in an inappropriate place, being asked to overwrite files that
1658
- * already exist, etc.
1659
- *
1660
- * @param coreCompiler the CoreCompiler we're using currently, here we're
1661
- * mainly accessing the `path` module
1662
- * @param config the user-supplied config, which we need here to access `.sys`.
1663
- */
1664
- const taskGenerate = async (coreCompiler, config) => {
1665
- if (!IS_NODE_ENV) {
1666
- config.logger.error(`"generate" command is currently only implemented for a NodeJS environment`);
1667
- return config.sys.exit(1);
1668
- }
1669
- const path = coreCompiler.path;
1670
- if (!config.configPath) {
1671
- config.logger.error('Please run this command in your root directory (i. e. the one containing stencil.config.ts).');
1672
- return config.sys.exit(1);
1673
- }
1674
- const absoluteSrcDir = config.srcDir;
1675
- if (!absoluteSrcDir) {
1676
- config.logger.error(`Stencil's srcDir was not specified.`);
1677
- return config.sys.exit(1);
1678
- }
1679
- const { prompt } = await import('../sys/node/prompts.js');
1680
- const input = config.flags.unknownArgs.find((arg) => !arg.startsWith('-')) ||
1681
- (await prompt({ name: 'tagName', type: 'text', message: 'Component tag name (dash-case):' })).tagName;
1682
- const { dir, base: componentName } = path.parse(input);
1683
- const tagError = validateComponentTag(componentName);
1684
- if (tagError) {
1685
- config.logger.error(tagError);
1686
- return config.sys.exit(1);
1687
- }
1688
- const extensionsToGenerate = ['tsx', ...(await chooseFilesToGenerate())];
1689
- const testFolder = extensionsToGenerate.some(isTest) ? 'test' : '';
1690
- const outDir = path.join(absoluteSrcDir, 'components', dir, componentName);
1691
- await config.sys.createDir(path.join(outDir, testFolder), { recursive: true });
1692
- const filesToGenerate = extensionsToGenerate.map((extension) => ({
1693
- extension,
1694
- path: getFilepathForFile(coreCompiler, outDir, componentName, extension),
1695
- }));
1696
- await checkForOverwrite(filesToGenerate, config);
1697
- const writtenFiles = await Promise.all(filesToGenerate.map((file) => getBoilerplateAndWriteFile(config, componentName, extensionsToGenerate.includes('css'), file))).catch((error) => config.logger.error(error));
1698
- if (!writtenFiles) {
1699
- return config.sys.exit(1);
1700
- }
1701
- // We use `console.log` here rather than our `config.logger` because we don't want
1702
- // our TUI messages to be prefixed with timestamps and so on.
1703
- //
1704
- // See STENCIL-424 for details.
1705
- console.log();
1706
- console.log(`${config.logger.gray('$')} stencil generate ${input}`);
1707
- console.log();
1708
- console.log(config.logger.bold('The following files have been generated:'));
1709
- const absoluteRootDir = config.rootDir;
1710
- writtenFiles.map((file) => console.log(` - ${path.relative(absoluteRootDir, file)}`));
1711
- };
1712
- /**
1713
- * Show a checkbox prompt to select the files to be generated.
1714
- *
1715
- * @returns a read-only array of `GenerableExtension`, the extensions that the user has decided
1716
- * to generate
1717
- */
1718
- const chooseFilesToGenerate = async () => {
1719
- const { prompt } = await import('../sys/node/prompts.js');
1720
- return (await prompt({
1721
- name: 'filesToGenerate',
1722
- type: 'multiselect',
1723
- message: 'Which additional files do you want to generate?',
1724
- choices: [
1725
- { value: 'css', title: 'Stylesheet (.css)', selected: true },
1726
- { value: 'spec.tsx', title: 'Spec Test (.spec.tsx)', selected: true },
1727
- { value: 'e2e.ts', title: 'E2E Test (.e2e.ts)', selected: true },
1728
- ],
1729
- })).filesToGenerate;
1730
- };
1731
- /**
1732
- * Get a filepath for a file we want to generate!
1733
- *
1734
- * The filepath for a given file depends on the path, the user-supplied
1735
- * component name, the extension, and whether we're inside of a test directory.
1736
- *
1737
- * @param coreCompiler the compiler we're using, here to acces the `.path` module
1738
- * @param path path to where we're going to generate the component
1739
- * @param componentName the user-supplied name for the generated component
1740
- * @param extension the file extension
1741
- * @returns the full filepath to the component (with a possible `test` directory
1742
- * added)
1743
- */
1744
- const getFilepathForFile = (coreCompiler, path, componentName, extension) => isTest(extension)
1745
- ? coreCompiler.path.join(path, 'test', `${componentName}.${extension}`)
1746
- : coreCompiler.path.join(path, `${componentName}.${extension}`);
1747
- /**
1748
- * Get the boilerplate for a file and write it to disk
1749
- *
1750
- * @param config the current config, needed for file operations
1751
- * @param componentName the component name (user-supplied)
1752
- * @param withCss are we generating CSS?
1753
- * @param file the file we want to write
1754
- * @returns a `Promise<string>` which holds the full filepath we've written to,
1755
- * used to print out a little summary of our activity to the user.
1756
- */
1757
- const getBoilerplateAndWriteFile = async (config, componentName, withCss, file) => {
1758
- const boilerplate = getBoilerplateByExtension(componentName, file.extension, withCss);
1759
- await config.sys.writeFile(file.path, boilerplate);
1760
- return file.path;
1761
- };
1762
- /**
1763
- * Check to see if any of the files we plan to write already exist and would
1764
- * therefore be overwritten if we proceed, because we'd like to not overwrite
1765
- * people's code!
1766
- *
1767
- * This function will check all the filepaths and if it finds any files log an
1768
- * error and exit with an error code. If it doesn't find anything it will just
1769
- * peacefully return `Promise<void>`.
1770
- *
1771
- * @param files the files we want to check
1772
- * @param config the Config object, used here to get access to `sys.readFile`
1773
- */
1774
- const checkForOverwrite = async (files, config) => {
1775
- const alreadyPresent = [];
1776
- await Promise.all(files.map(async ({ path }) => {
1777
- if ((await config.sys.readFile(path)) !== undefined) {
1778
- alreadyPresent.push(path);
1779
- }
1780
- }));
1781
- if (alreadyPresent.length > 0) {
1782
- config.logger.error('Generating code would overwrite the following files:', ...alreadyPresent.map((path) => '\t' + path));
1783
- await config.sys.exit(1);
1784
- }
1785
- };
1786
- /**
1787
- * Check if an extension is for a test
1788
- *
1789
- * @param extension the extension we want to check
1790
- * @returns a boolean indicating whether or not its a test
1791
- */
1792
- const isTest = (extension) => {
1793
- return extension === 'e2e.ts' || extension === 'spec.tsx';
1794
- };
1795
- /**
1796
- * Get the boilerplate for a file by its extension.
1797
- *
1798
- * @param tagName the name of the component we're generating
1799
- * @param extension the file extension we want boilerplate for (.css, tsx, etc)
1800
- * @param withCss a boolean indicating whether we're generating a CSS file
1801
- * @returns a string container the file boilerplate for the supplied extension
1802
- */
1803
- const getBoilerplateByExtension = (tagName, extension, withCss) => {
1804
- switch (extension) {
1805
- case 'tsx':
1806
- return getComponentBoilerplate(tagName, withCss);
1807
- case 'css':
1808
- return getStyleUrlBoilerplate();
1809
- case 'spec.tsx':
1810
- return getSpecTestBoilerplate(tagName);
1811
- case 'e2e.ts':
1812
- return getE2eTestBoilerplate(tagName);
1813
- default:
1814
- throw new Error(`Unkown extension "${extension}".`);
1815
- }
1816
- };
1817
- /**
1818
- * Get the boilerplate for a file containing the definition of a component
1819
- * @param tagName the name of the tag to give the component
1820
- * @param hasStyle designates if the component has an external stylesheet or not
1821
- * @returns the contents of a file that defines a component
1822
- */
1823
- const getComponentBoilerplate = (tagName, hasStyle) => {
1824
- const decorator = [`{`];
1825
- decorator.push(` tag: '${tagName}',`);
1826
- if (hasStyle) {
1827
- decorator.push(` styleUrl: '${tagName}.css',`);
1828
- }
1829
- decorator.push(` shadow: true,`);
1830
- decorator.push(`}`);
1831
- return `import { Component, Host, h } from '@stencil/core';
1832
-
1833
- @Component(${decorator.join('\n')})
1834
- export class ${toPascalCase(tagName)} {
1835
-
1836
- render() {
1837
- return (
1838
- <Host>
1839
- <slot></slot>
1840
- </Host>
1841
- );
1842
- }
1843
-
1844
- }
1845
- `;
1846
- };
1847
- /**
1848
- * Get the boilerplate for style for a generated component
1849
- * @returns a boilerplate CSS block
1850
- */
1851
- const getStyleUrlBoilerplate = () => `:host {
1852
- display: block;
1853
- }
1854
- `;
1855
- /**
1856
- * Get the boilerplate for a file containing a spec (unit) test for a component
1857
- * @param tagName the name of the tag associated with the component under test
1858
- * @returns the contents of a file that unit tests a component
1859
- */
1860
- const getSpecTestBoilerplate = (tagName) => `import { newSpecPage } from '@stencil/core/testing';
1861
- import { ${toPascalCase(tagName)} } from '../${tagName}';
1862
-
1863
- describe('${tagName}', () => {
1864
- it('renders', async () => {
1865
- const page = await newSpecPage({
1866
- components: [${toPascalCase(tagName)}],
1867
- html: \`<${tagName}></${tagName}>\`,
1868
- });
1869
- expect(page.root).toEqualHtml(\`
1870
- <${tagName}>
1871
- <mock:shadow-root>
1872
- <slot></slot>
1873
- </mock:shadow-root>
1874
- </${tagName}>
1875
- \`);
1876
- });
1877
- });
1878
- `;
1879
- /**
1880
- * Get the boilerplate for a file containing an end-to-end (E2E) test for a component
1881
- * @param tagName the name of the tag associated with the component under test
1882
- * @returns the contents of a file that E2E tests a component
1883
- */
1884
- const getE2eTestBoilerplate = (tagName) => `import { newE2EPage } from '@stencil/core/testing';
1885
-
1886
- describe('${tagName}', () => {
1887
- it('renders', async () => {
1888
- const page = await newE2EPage();
1889
- await page.setContent('<${tagName}></${tagName}>');
1890
-
1891
- const element = await page.find('${tagName}');
1892
- expect(element).toHaveClass('hydrated');
1893
- });
1894
- });
1895
- `;
1896
- /**
1897
- * Convert a dash case string to pascal case.
1898
- * @param str the string to convert
1899
- * @returns the converted input as pascal case
1900
- */
1901
- const toPascalCase = (str) => str.split('-').reduce((res, part) => res + part[0].toUpperCase() + part.slice(1), '');
1902
-
1903
- /**
1904
- * Entrypoint for the Telemetry task
1905
- * @param flags configuration flags provided to Stencil when a task was called (either this task or a task that invokes
1906
- * telemetry)
1907
- * @param sys the abstraction for interfacing with the operating system
1908
- * @param logger a logging implementation to log the results out to the user
1909
- */
1910
- const taskTelemetry = async (flags, sys, logger) => {
1911
- const prompt = logger.dim(sys.details.platform === 'windows' ? '>' : '$');
1912
- const isEnabling = flags.args.includes('on');
1913
- const isDisabling = flags.args.includes('off');
1914
- const INFORMATION = `Opt in or our of telemetry. Information about the data we collect is available on our website: ${logger.bold('https://stenciljs.com/telemetry')}`;
1915
- const THANK_YOU = `Thank you for helping to make Stencil better! 💖`;
1916
- const ENABLED_MESSAGE = `${logger.green('Enabled')}. ${THANK_YOU}\n\n`;
1917
- const DISABLED_MESSAGE = `${logger.red('Disabled')}\n\n`;
1918
- const hasTelemetry = await checkTelemetry(sys);
1919
- if (isEnabling) {
1920
- const result = await enableTelemetry(sys);
1921
- result
1922
- ? console.log(`\n ${logger.bold('Telemetry is now ') + ENABLED_MESSAGE}`)
1923
- : console.log(`Something went wrong when enabling Telemetry.`);
1924
- return;
1925
- }
1926
- if (isDisabling) {
1927
- const result = await disableTelemetry(sys);
1928
- result
1929
- ? console.log(`\n ${logger.bold('Telemetry is now ') + DISABLED_MESSAGE}`)
1930
- : console.log(`Something went wrong when disabling Telemetry.`);
1931
- return;
1932
- }
1933
- console.log(` ${logger.bold('Telemetry:')} ${logger.dim(INFORMATION)}`);
1934
- console.log(`\n ${logger.bold('Status')}: ${hasTelemetry ? ENABLED_MESSAGE : DISABLED_MESSAGE}`);
1935
- console.log(` ${prompt} ${logger.green('stencil telemetry [off|on]')}
1936
-
1937
- ${logger.cyan('off')} ${logger.dim('.............')} Disable sharing anonymous usage data
1938
- ${logger.cyan('on')} ${logger.dim('..............')} Enable sharing anonymous usage data
1939
- `);
1940
- };
1941
-
1942
- /**
1943
- * Entrypoint for the Help task, providing Stencil usage context to the user
1944
- * @param flags configuration flags provided to Stencil when a task was call (either this task or a task that invokes
1945
- * telemetry)
1946
- * @param logger a logging implementation to log the results out to the user
1947
- * @param sys the abstraction for interfacing with the operating system
1948
- */
1949
- const taskHelp = async (flags, logger, sys) => {
1950
- const prompt = logger.dim(sys.details.platform === 'windows' ? '>' : '$');
1951
- console.log(`
1952
- ${logger.bold('Build:')} ${logger.dim('Build components for development or production.')}
1953
-
1954
- ${prompt} ${logger.green('stencil build [--dev] [--watch] [--prerender] [--debug]')}
1955
-
1956
- ${logger.cyan('--dev')} ${logger.dim('.............')} Development build
1957
- ${logger.cyan('--watch')} ${logger.dim('...........')} Rebuild when files update
1958
- ${logger.cyan('--serve')} ${logger.dim('...........')} Start the dev-server
1959
- ${logger.cyan('--prerender')} ${logger.dim('.......')} Prerender the application
1960
- ${logger.cyan('--docs')} ${logger.dim('............')} Generate component readme.md docs
1961
- ${logger.cyan('--config')} ${logger.dim('..........')} Set stencil config file
1962
- ${logger.cyan('--stats')} ${logger.dim('...........')} Write stencil-stats.json file
1963
- ${logger.cyan('--log')} ${logger.dim('.............')} Write stencil-build.log file
1964
- ${logger.cyan('--debug')} ${logger.dim('...........')} Set the log level to debug
1965
-
1966
-
1967
- ${logger.bold('Test:')} ${logger.dim('Run unit and end-to-end tests.')}
1968
-
1969
- ${prompt} ${logger.green('stencil test [--spec] [--e2e]')}
1970
-
1971
- ${logger.cyan('--spec')} ${logger.dim('............')} Run unit tests with Jest
1972
- ${logger.cyan('--e2e')} ${logger.dim('.............')} Run e2e tests with Puppeteer
1973
-
1974
-
1975
- ${logger.bold('Generate:')} ${logger.dim('Bootstrap components.')}
1976
-
1977
- ${prompt} ${logger.green('stencil generate')} or ${logger.green('stencil g')}
1978
-
1979
- `);
1980
- // TODO(STENCIL-148) make this parameter no longer optional, remove the surrounding if statement
1981
- if (sys) {
1982
- await taskTelemetry(flags, sys, logger);
1983
- }
1984
- console.log(`
1985
- ${logger.bold('Examples:')}
1986
-
1987
- ${prompt} ${logger.green('stencil build --dev --watch --serve')}
1988
- ${prompt} ${logger.green('stencil build --prerender')}
1989
- ${prompt} ${logger.green('stencil test --spec --e2e')}
1990
- ${prompt} ${logger.green('stencil telemetry on')}
1991
- ${prompt} ${logger.green('stencil generate')}
1992
- ${prompt} ${logger.green('stencil g my-component')}
1993
- `);
1994
- };
1995
-
1996
- const taskInfo = (coreCompiler, sys, logger) => {
1997
- const details = sys.details;
1998
- const versions = coreCompiler.versions;
1999
- console.log(``);
2000
- console.log(`${logger.cyan(' System:')} ${sys.name} ${sys.version}`);
2001
- console.log(`${logger.cyan(' Plaform:')} ${details.platform} (${details.release})`);
2002
- console.log(`${logger.cyan(' CPU Model:')} ${details.cpuModel} (${sys.hardwareConcurrency} cpu${sys.hardwareConcurrency !== 1 ? 's' : ''})`);
2003
- console.log(`${logger.cyan(' Compiler:')} ${sys.getCompilerExecutingPath()}`);
2004
- console.log(`${logger.cyan(' Build:')} ${coreCompiler.buildId}`);
2005
- console.log(`${logger.cyan(' Stencil:')} ${coreCompiler.version}${logger.emoji(' ' + coreCompiler.vermoji)}`);
2006
- console.log(`${logger.cyan(' TypeScript:')} ${versions.typescript}`);
2007
- console.log(`${logger.cyan(' Rollup:')} ${versions.rollup}`);
2008
- console.log(`${logger.cyan(' Parse5:')} ${versions.parse5}`);
2009
- console.log(`${logger.cyan(' Sizzle:')} ${versions.sizzle}`);
2010
- console.log(`${logger.cyan(' Terser:')} ${versions.terser}`);
2011
- console.log(``);
2012
- };
2013
-
2014
- const taskServe = async (config) => {
2015
- config.suppressLogs = true;
2016
- config.flags.serve = true;
2017
- config.devServer.openBrowser = config.flags.open;
2018
- config.devServer.reloadStrategy = null;
2019
- config.devServer.initialLoadUrl = '/';
2020
- config.devServer.websocket = false;
2021
- config.maxConcurrentWorkers = 1;
2022
- config.devServer.root = isString(config.flags.root) ? config.flags.root : config.sys.getCurrentDirectory();
2023
- const devServerPath = config.sys.getDevServerExecutingPath();
2024
- const { start } = await config.sys.dynamicImport(devServerPath);
2025
- const devServer = await start(config.devServer, config.logger);
2026
- console.log(`${config.logger.cyan(' Root:')} ${devServer.root}`);
2027
- console.log(`${config.logger.cyan(' Address:')} ${devServer.address}`);
2028
- console.log(`${config.logger.cyan(' Port:')} ${devServer.port}`);
2029
- console.log(`${config.logger.cyan(' Server:')} ${devServer.browserUrl}`);
2030
- console.log(``);
2031
- config.sys.onProcessInterrupt(() => {
2032
- if (devServer) {
2033
- config.logger.debug(`dev server close: ${devServer.browserUrl}`);
2034
- devServer.close();
2035
- }
2036
- });
2037
- };
2038
-
2039
- /**
2040
- * Entrypoint for any Stencil tests
2041
- * @param config a validated Stencil configuration entity
2042
- */
2043
- const taskTest = async (config) => {
2044
- if (!IS_NODE_ENV) {
2045
- config.logger.error(`"test" command is currently only implemented for a NodeJS environment`);
2046
- return config.sys.exit(1);
2047
- }
2048
- try {
2049
- config.buildDocs = false;
2050
- const testingRunOpts = {
2051
- e2e: !!config.flags.e2e,
2052
- screenshot: !!config.flags.screenshot,
2053
- spec: !!config.flags.spec,
2054
- updateScreenshot: !!config.flags.updateScreenshot,
2055
- };
2056
- // always ensure we have jest modules installed
2057
- const ensureModuleIds = ['@types/jest', 'jest', 'jest-cli'];
2058
- if (testingRunOpts.e2e) {
2059
- // if it's an e2e test, also make sure we're got
2060
- // puppeteer modules installed and if browserExecutablePath is provided don't download Chromium use only puppeteer-core instead
2061
- const puppeteer = config.testing.browserExecutablePath ? 'puppeteer-core' : 'puppeteer';
2062
- ensureModuleIds.push(puppeteer);
2063
- if (testingRunOpts.screenshot) {
2064
- // ensure we've got pixelmatch for screenshots
2065
- config.logger.warn(config.logger.yellow(`EXPERIMENTAL: screenshot visual diff testing is currently under heavy development and has not reached a stable status. However, any assistance testing would be appreciated.`));
2066
- }
2067
- }
2068
- // ensure we've got the required modules installed
2069
- const diagnostics = await config.sys.lazyRequire.ensure(config.rootDir, ensureModuleIds);
2070
- if (diagnostics.length > 0) {
2071
- config.logger.printDiagnostics(diagnostics);
2072
- return config.sys.exit(1);
2073
- }
2074
- // let's test!
2075
- const { createTesting } = await import('../testing/index.js');
2076
- const testing = await createTesting(config);
2077
- const passed = await testing.run(testingRunOpts);
2078
- await testing.destroy();
2079
- if (!passed) {
2080
- return config.sys.exit(1);
2081
- }
2082
- }
2083
- catch (e) {
2084
- config.logger.error(e);
2085
- return config.sys.exit(1);
2086
- }
2087
- };
2088
-
2089
- /**
2090
- * Creates an instance of a logger
2091
- * @returns the new logger instance
2092
- */
2093
- const createLogger = () => {
2094
- let useColors = IS_BROWSER_ENV;
2095
- let level = 'info';
2096
- return {
2097
- enableColors: (uc) => (useColors = uc),
2098
- getLevel: () => level,
2099
- setLevel: (l) => (level = l),
2100
- emoji: (e) => e,
2101
- info: console.log.bind(console),
2102
- warn: console.warn.bind(console),
2103
- error: console.error.bind(console),
2104
- debug: console.debug.bind(console),
2105
- red: (msg) => msg,
2106
- green: (msg) => msg,
2107
- yellow: (msg) => msg,
2108
- blue: (msg) => msg,
2109
- magenta: (msg) => msg,
2110
- cyan: (msg) => msg,
2111
- gray: (msg) => msg,
2112
- bold: (msg) => msg,
2113
- dim: (msg) => msg,
2114
- bgRed: (msg) => msg,
2115
- createTimeSpan: (_startMsg, _debug = false) => ({
2116
- duration: () => 0,
2117
- finish: () => 0,
2118
- }),
2119
- printDiagnostics(diagnostics) {
2120
- diagnostics.forEach((diagnostic) => logDiagnostic(diagnostic, useColors));
2121
- },
2122
- };
2123
- };
2124
- const logDiagnostic = (diagnostic, useColors) => {
2125
- let color = BLUE;
2126
- let prefix = 'Build';
2127
- let msg = '';
2128
- if (diagnostic.level === 'error') {
2129
- color = RED;
2130
- prefix = 'Error';
2131
- }
2132
- else if (diagnostic.level === 'warn') {
2133
- color = YELLOW;
2134
- prefix = 'Warning';
2135
- }
2136
- if (diagnostic.header) {
2137
- prefix = diagnostic.header;
2138
- }
2139
- const filePath = diagnostic.relFilePath || diagnostic.absFilePath;
2140
- if (filePath) {
2141
- msg += filePath;
2142
- if (typeof diagnostic.lineNumber === 'number' && diagnostic.lineNumber > 0) {
2143
- msg += ', line ' + diagnostic.lineNumber;
2144
- if (typeof diagnostic.columnNumber === 'number' && diagnostic.columnNumber > 0) {
2145
- msg += ', column ' + diagnostic.columnNumber;
2146
- }
2147
- }
2148
- msg += '\n';
2149
- }
2150
- msg += diagnostic.messageText;
2151
- if (diagnostic.lines && diagnostic.lines.length > 0) {
2152
- diagnostic.lines.forEach((l) => {
2153
- msg += '\n' + l.lineNumber + ': ' + l.text;
2154
- });
2155
- msg += '\n';
2156
- }
2157
- if (useColors) {
2158
- const styledPrefix = [
2159
- '%c' + prefix,
2160
- `background: ${color}; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;`,
2161
- ];
2162
- console.log(...styledPrefix, msg);
2163
- }
2164
- else if (diagnostic.level === 'error') {
2165
- console.error(msg);
2166
- }
2167
- else if (diagnostic.level === 'warn') {
2168
- console.warn(msg);
2169
- }
2170
- else {
2171
- console.log(msg);
2172
- }
2173
- };
2174
- const YELLOW = `#f39c12`;
2175
- const RED = `#c0392b`;
2176
- const BLUE = `#3498db`;
2177
-
2178
- const run = async (init) => {
2179
- const { args, logger, sys } = init;
2180
- try {
2181
- const flags = parseFlags(args, sys);
2182
- const task = flags.task;
2183
- if (flags.debug || flags.verbose) {
2184
- logger.setLevel('debug');
2185
- }
2186
- if (flags.ci) {
2187
- logger.enableColors(false);
2188
- }
2189
- if (isFunction(sys.applyGlobalPatch)) {
2190
- sys.applyGlobalPatch(sys.getCurrentDirectory());
2191
- }
2192
- if (task === 'help' || flags.help) {
2193
- await taskHelp({ task: 'help', args }, logger, sys);
2194
- return;
2195
- }
2196
- startupLog(logger, task);
2197
- const findConfigResults = await findConfig({ sys, configPath: flags.config });
2198
- if (hasError(findConfigResults.diagnostics)) {
2199
- logger.printDiagnostics(findConfigResults.diagnostics);
2200
- return sys.exit(1);
2201
- }
2202
- const ensureDepsResults = await sys.ensureDependencies({
2203
- rootDir: findConfigResults.rootDir,
2204
- logger,
2205
- dependencies: dependencies,
2206
- });
2207
- if (hasError(ensureDepsResults.diagnostics)) {
2208
- logger.printDiagnostics(ensureDepsResults.diagnostics);
2209
- return sys.exit(1);
2210
- }
2211
- const coreCompiler = await loadCoreCompiler(sys);
2212
- if (task === 'version' || flags.version) {
2213
- console.log(coreCompiler.version);
2214
- return;
2215
- }
2216
- startupLogVersion(logger, task, coreCompiler);
2217
- loadedCompilerLog(sys, logger, flags, coreCompiler);
2218
- if (task === 'info') {
2219
- await telemetryAction(sys, { flags: { task: 'info' }, logger }, coreCompiler, async () => {
2220
- await taskInfo(coreCompiler, sys, logger);
2221
- });
2222
- return;
2223
- }
2224
- const validated = await coreCompiler.loadConfig({
2225
- config: {
2226
- flags,
2227
- },
2228
- configPath: findConfigResults.configPath,
2229
- logger,
2230
- sys,
2231
- });
2232
- if (validated.diagnostics.length > 0) {
2233
- logger.printDiagnostics(validated.diagnostics);
2234
- if (hasError(validated.diagnostics)) {
2235
- return sys.exit(1);
2236
- }
2237
- }
2238
- if (isFunction(sys.applyGlobalPatch)) {
2239
- sys.applyGlobalPatch(validated.config.rootDir);
2240
- }
2241
- await sys.ensureResources({ rootDir: validated.config.rootDir, logger, dependencies: dependencies });
2242
- await telemetryAction(sys, validated.config, coreCompiler, async () => {
2243
- await runTask(coreCompiler, validated.config, task, sys);
2244
- });
2245
- }
2246
- catch (e) {
2247
- if (!shouldIgnoreError(e)) {
2248
- const details = `${logger.getLevel() === 'debug' && e instanceof Error ? e.stack : ''}`;
2249
- logger.error(`uncaught cli error: ${e}${details}`);
2250
- return sys.exit(1);
2251
- }
2252
- }
2253
- };
2254
- const runTask = async (coreCompiler, config, task, sys) => {
2255
- var _a, _b;
2256
- const logger = (_a = config.logger) !== null && _a !== void 0 ? _a : createLogger();
2257
- const strictConfig = { ...config, flags: (_b = { ...config.flags }) !== null && _b !== void 0 ? _b : { task }, logger };
2258
- strictConfig.outputTargets = strictConfig.outputTargets || [];
2259
- switch (task) {
2260
- case 'build':
2261
- await taskBuild(coreCompiler, strictConfig, sys);
2262
- break;
2263
- case 'docs':
2264
- await taskDocs(coreCompiler, strictConfig);
2265
- break;
2266
- case 'generate':
2267
- case 'g':
2268
- await taskGenerate(coreCompiler, strictConfig);
2269
- break;
2270
- case 'help':
2271
- await taskHelp(strictConfig.flags, strictConfig.logger, sys);
2272
- break;
2273
- case 'prerender':
2274
- await taskPrerender(coreCompiler, strictConfig);
2275
- break;
2276
- case 'serve':
2277
- await taskServe(strictConfig);
2278
- break;
2279
- case 'telemetry':
2280
- // TODO(STENCIL-148) make this parameter no longer optional, remove the surrounding if statement
2281
- if (sys) {
2282
- await taskTelemetry(strictConfig.flags, sys, strictConfig.logger);
2283
- }
2284
- break;
2285
- case 'test':
2286
- await taskTest(strictConfig);
2287
- break;
2288
- case 'version':
2289
- console.log(coreCompiler.version);
2290
- break;
2291
- default:
2292
- strictConfig.logger.error(`${strictConfig.logger.emoji('❌ ')}Invalid stencil command, please see the options below:`);
2293
- await taskHelp(strictConfig.flags, strictConfig.logger, sys);
2294
- return config.sys.exit(1);
2295
- }
2296
- };
2297
-
2298
- export { parseFlags, run, runTask };
2299
- //# sourceMappingURL=index.js.map