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