@vendure-platform/create 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +39 -39
  3. package/dist/add-to-existing.js +1 -1
  4. package/dist/assets/demo-data/initial-data.json +663 -663
  5. package/dist/assets/storefront/components.json +20 -20
  6. package/dist/assets/storefront/eslint.config.mjs +10 -10
  7. package/dist/assets/storefront/graphql.config.yml +1 -1
  8. package/dist/assets/storefront/messages/de.json +2 -0
  9. package/dist/assets/storefront/messages/en.json +2 -0
  10. package/dist/assets/storefront/next.config.ts +5 -4
  11. package/dist/assets/storefront/package.json +1 -1
  12. package/dist/assets/storefront/postcss.config.mjs +1 -1
  13. package/dist/assets/storefront/src/app/[locale]/(catalog)/catalog/page.tsx +17 -21
  14. package/dist/assets/storefront/src/app/[locale]/(catalog)/collection/[slug]/page.tsx +64 -42
  15. package/dist/assets/storefront/src/app/[locale]/(catalog)/layout.tsx +1 -5
  16. package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/actions.ts +69 -65
  17. package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/page.tsx +68 -37
  18. package/dist/assets/storefront/src/app/[locale]/(catalog)/search/page.tsx +24 -27
  19. package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-results.tsx +11 -9
  20. package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-term.tsx +4 -4
  21. package/dist/assets/storefront/src/app/[locale]/(scenario)/[...path]/page.tsx +1 -1
  22. package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/accept-invitation-client.tsx +8 -13
  23. package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/actions.ts +11 -14
  24. package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/page.tsx +30 -33
  25. package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/sign-out-and-retry.tsx +6 -6
  26. package/dist/assets/storefront/src/app/[locale]/account/addresses/actions.ts +30 -45
  27. package/dist/assets/storefront/src/app/[locale]/account/addresses/address-form.tsx +166 -159
  28. package/dist/assets/storefront/src/app/[locale]/account/addresses/addresses-client.tsx +35 -26
  29. package/dist/assets/storefront/src/app/[locale]/account/addresses/loading.tsx +1 -3
  30. package/dist/assets/storefront/src/app/[locale]/account/addresses/page.tsx +16 -18
  31. package/dist/assets/storefront/src/app/[locale]/account/approvals/actions.ts +5 -8
  32. package/dist/assets/storefront/src/app/[locale]/account/approvals/page.tsx +77 -69
  33. package/dist/assets/storefront/src/app/[locale]/account/company/actions.ts +10 -11
  34. package/dist/assets/storefront/src/app/[locale]/account/company/addresses/actions.ts +6 -15
  35. package/dist/assets/storefront/src/app/[locale]/account/company/addresses/address-form.tsx +57 -49
  36. package/dist/assets/storefront/src/app/[locale]/account/company/addresses/addresses-client.tsx +23 -25
  37. package/dist/assets/storefront/src/app/[locale]/account/company/addresses/page.tsx +30 -30
  38. package/dist/assets/storefront/src/app/[locale]/account/company/business-units/actions.ts +20 -29
  39. package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-unit-form.tsx +32 -37
  40. package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-units-client.tsx +32 -25
  41. package/dist/assets/storefront/src/app/[locale]/account/company/business-units/page.tsx +24 -24
  42. package/dist/assets/storefront/src/app/[locale]/account/company/business-units/types.ts +7 -4
  43. package/dist/assets/storefront/src/app/[locale]/account/company/edit-company-form.tsx +11 -21
  44. package/dist/assets/storefront/src/app/[locale]/account/company/page.tsx +23 -28
  45. package/dist/assets/storefront/src/app/[locale]/account/company/payment-methods/page.tsx +24 -24
  46. package/dist/assets/storefront/src/app/[locale]/account/company/payment-methods/payment-methods-client.tsx +5 -7
  47. package/dist/assets/storefront/src/app/[locale]/account/company/roles/page.tsx +22 -25
  48. package/dist/assets/storefront/src/app/[locale]/account/company/roles/roles-client.tsx +11 -26
  49. package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/actions.ts +6 -10
  50. package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/page.tsx +18 -16
  51. package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/tax-ids-client.tsx +74 -67
  52. package/dist/assets/storefront/src/app/[locale]/account/company/users/actions.ts +16 -25
  53. package/dist/assets/storefront/src/app/[locale]/account/company/users/edit-user-form.tsx +27 -25
  54. package/dist/assets/storefront/src/app/[locale]/account/company/users/invite-user-form.tsx +27 -19
  55. package/dist/assets/storefront/src/app/[locale]/account/company/users/page.tsx +32 -29
  56. package/dist/assets/storefront/src/app/[locale]/account/company/users/users-client.tsx +35 -38
  57. package/dist/assets/storefront/src/app/[locale]/account/error.tsx +1 -3
  58. package/dist/assets/storefront/src/app/[locale]/account/layout.tsx +16 -22
  59. package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/page.tsx +151 -103
  60. package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-actions.ts +6 -7
  61. package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-dialog.tsx +22 -48
  62. package/dist/assets/storefront/src/app/[locale]/account/orders/loading.tsx +8 -8
  63. package/dist/assets/storefront/src/app/[locale]/account/orders/page.tsx +101 -61
  64. package/dist/assets/storefront/src/app/[locale]/account/profile/actions.ts +32 -23
  65. package/dist/assets/storefront/src/app/[locale]/account/profile/change-password-form.tsx +6 -16
  66. package/dist/assets/storefront/src/app/[locale]/account/profile/edit-email-form.tsx +7 -17
  67. package/dist/assets/storefront/src/app/[locale]/account/profile/edit-profile-form.tsx +6 -16
  68. package/dist/assets/storefront/src/app/[locale]/account/profile/loading.tsx +12 -18
  69. package/dist/assets/storefront/src/app/[locale]/account/profile/page.tsx +15 -15
  70. package/dist/assets/storefront/src/app/[locale]/account/quick-order/file-upload-tab.tsx +2 -6
  71. package/dist/assets/storefront/src/app/[locale]/account/quick-order/manual-entry-tab.tsx +18 -15
  72. package/dist/assets/storefront/src/app/[locale]/account/quick-order/page.tsx +3 -6
  73. package/dist/assets/storefront/src/app/[locale]/account/quick-order/preview-table.tsx +10 -2
  74. package/dist/assets/storefront/src/app/[locale]/account/quick-order/save-to-list-dialog.tsx +24 -26
  75. package/dist/assets/storefront/src/app/[locale]/account/quick-order/sku-autocomplete.tsx +19 -10
  76. package/dist/assets/storefront/src/app/[locale]/account/quick-order/text-input-tab.tsx +3 -8
  77. package/dist/assets/storefront/src/app/[locale]/account/quotes/[id]/page.tsx +86 -59
  78. package/dist/assets/storefront/src/app/[locale]/account/quotes/actions.ts +38 -45
  79. package/dist/assets/storefront/src/app/[locale]/account/quotes/new/new-quote-form.tsx +3 -5
  80. package/dist/assets/storefront/src/app/[locale]/account/quotes/new/page.tsx +6 -6
  81. package/dist/assets/storefront/src/app/[locale]/account/quotes/page.tsx +92 -59
  82. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/activity-feed.tsx +152 -0
  83. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/add-item-search.tsx +132 -0
  84. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/add-member-form.tsx +140 -0
  85. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/members-panel.tsx +259 -0
  86. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/page.tsx +55 -0
  87. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/rename-dialog.tsx +117 -0
  88. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/shared-cart-detail-client.tsx +555 -0
  89. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/actions.ts +305 -0
  90. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/new/new-shared-cart-form.tsx +84 -0
  91. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/new/page.tsx +47 -0
  92. package/dist/assets/storefront/src/app/[locale]/account/shared-carts/page.tsx +276 -0
  93. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/page.tsx +22 -8
  94. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/shopping-list-detail-client.tsx +62 -49
  95. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/actions.ts +9 -4
  96. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/create-shopping-list-form.tsx +5 -11
  97. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/loading.tsx +1 -1
  98. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/page.tsx +32 -42
  99. package/dist/assets/storefront/src/app/[locale]/account/store-credits/actions.ts +8 -8
  100. package/dist/assets/storefront/src/app/[locale]/account/store-credits/claim-form.tsx +6 -10
  101. package/dist/assets/storefront/src/app/[locale]/account/store-credits/page.tsx +76 -55
  102. package/dist/assets/storefront/src/app/[locale]/account/store-credits/reveal-code.tsx +10 -6
  103. package/dist/assets/storefront/src/app/[locale]/account/verify-email/page.tsx +32 -39
  104. package/dist/assets/storefront/src/app/[locale]/cart/actions.ts +29 -23
  105. package/dist/assets/storefront/src/app/[locale]/cart/cart-items.tsx +111 -40
  106. package/dist/assets/storefront/src/app/[locale]/cart/cart-line-actions.tsx +9 -9
  107. package/dist/assets/storefront/src/app/[locale]/cart/cart-quantity-control.tsx +61 -48
  108. package/dist/assets/storefront/src/app/[locale]/cart/cart-remove-button.tsx +15 -9
  109. package/dist/assets/storefront/src/app/[locale]/cart/cart.tsx +38 -41
  110. package/dist/assets/storefront/src/app/[locale]/cart/code-input.tsx +8 -8
  111. package/dist/assets/storefront/src/app/[locale]/cart/order-summary.tsx +70 -29
  112. package/dist/assets/storefront/src/app/[locale]/cart/page.tsx +11 -11
  113. package/dist/assets/storefront/src/app/[locale]/cart/promotion-code.tsx +48 -42
  114. package/dist/assets/storefront/src/app/[locale]/cart/reapproval-confirm.tsx +22 -20
  115. package/dist/assets/storefront/src/app/[locale]/cart/request-quote-button.tsx +7 -16
  116. package/dist/assets/storefront/src/app/[locale]/checkout/actions.ts +39 -65
  117. package/dist/assets/storefront/src/app/[locale]/checkout/cancel-quote-checkout-button.tsx +5 -5
  118. package/dist/assets/storefront/src/app/[locale]/checkout/checkout-flow.tsx +202 -202
  119. package/dist/assets/storefront/src/app/[locale]/checkout/checkout-provider.tsx +142 -142
  120. package/dist/assets/storefront/src/app/[locale]/checkout/order-summary.tsx +158 -139
  121. package/dist/assets/storefront/src/app/[locale]/checkout/page.tsx +56 -47
  122. package/dist/assets/storefront/src/app/[locale]/checkout/steps/delivery-step.tsx +86 -88
  123. package/dist/assets/storefront/src/app/[locale]/checkout/steps/payment-step.tsx +90 -91
  124. package/dist/assets/storefront/src/app/[locale]/checkout/steps/review-step.tsx +166 -161
  125. package/dist/assets/storefront/src/app/[locale]/checkout/steps/shipping-address-step.tsx +573 -494
  126. package/dist/assets/storefront/src/app/[locale]/error.tsx +3 -5
  127. package/dist/assets/storefront/src/app/[locale]/forgot-password/actions.ts +10 -7
  128. package/dist/assets/storefront/src/app/[locale]/forgot-password/forgot-password-form.tsx +10 -25
  129. package/dist/assets/storefront/src/app/[locale]/forgot-password/page.tsx +5 -5
  130. package/dist/assets/storefront/src/app/[locale]/globals.css +48 -48
  131. package/dist/assets/storefront/src/app/[locale]/layout.tsx +53 -47
  132. package/dist/assets/storefront/src/app/[locale]/not-found.tsx +3 -5
  133. package/dist/assets/storefront/src/app/[locale]/order-confirmation/[code]/order-confirmation.tsx +71 -44
  134. package/dist/assets/storefront/src/app/[locale]/order-confirmation/[code]/page.tsx +7 -5
  135. package/dist/assets/storefront/src/app/[locale]/page.tsx +33 -35
  136. package/dist/assets/storefront/src/app/[locale]/register/actions.ts +7 -7
  137. package/dist/assets/storefront/src/app/[locale]/register/page.tsx +22 -16
  138. package/dist/assets/storefront/src/app/[locale]/register/registration-form.tsx +22 -34
  139. package/dist/assets/storefront/src/app/[locale]/register-company/actions.ts +15 -19
  140. package/dist/assets/storefront/src/app/[locale]/register-company/page.tsx +17 -15
  141. package/dist/assets/storefront/src/app/[locale]/register-company/registration-form.tsx +9 -15
  142. package/dist/assets/storefront/src/app/[locale]/reset-password/actions.ts +7 -8
  143. package/dist/assets/storefront/src/app/[locale]/reset-password/page.tsx +18 -12
  144. package/dist/assets/storefront/src/app/[locale]/reset-password/reset-password-form.tsx +8 -16
  145. package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/add-to-cart-button.tsx +10 -4
  146. package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/page.tsx +62 -30
  147. package/dist/assets/storefront/src/app/[locale]/sign-in/actions.ts +14 -16
  148. package/dist/assets/storefront/src/app/[locale]/sign-in/login-form.tsx +17 -30
  149. package/dist/assets/storefront/src/app/[locale]/sign-in/page.tsx +35 -30
  150. package/dist/assets/storefront/src/app/[locale]/verify/actions.ts +8 -8
  151. package/dist/assets/storefront/src/app/[locale]/verify/page.tsx +18 -14
  152. package/dist/assets/storefront/src/app/[locale]/verify/verify-content.tsx +25 -27
  153. package/dist/assets/storefront/src/app/[locale]/verify-pending/page.tsx +23 -23
  154. package/dist/assets/storefront/src/app/api/clear-company-context/route.ts +6 -3
  155. package/dist/assets/storefront/src/app/api/revalidate/route.ts +19 -28
  156. package/dist/assets/storefront/src/app/api/search-analytics/route.ts +1 -1
  157. package/dist/assets/storefront/src/components/commerce/account-nav-items.ts +44 -17
  158. package/dist/assets/storefront/src/components/commerce/account-sidebar.tsx +30 -22
  159. package/dist/assets/storefront/src/components/commerce/active-filters.tsx +1 -1
  160. package/dist/assets/storefront/src/components/commerce/add-to-shared-cart.tsx +247 -0
  161. package/dist/assets/storefront/src/components/commerce/approval-decision-form.tsx +9 -13
  162. package/dist/assets/storefront/src/components/commerce/approval-status-badge.tsx +23 -15
  163. package/dist/assets/storefront/src/components/commerce/business-unit-switcher.tsx +11 -11
  164. package/dist/assets/storefront/src/components/commerce/catalog-search-bar.tsx +2 -2
  165. package/dist/assets/storefront/src/components/commerce/category-product-section.tsx +28 -16
  166. package/dist/assets/storefront/src/components/commerce/category-sidebar.tsx +31 -18
  167. package/dist/assets/storefront/src/components/commerce/collection-hero-banner.tsx +2 -4
  168. package/dist/assets/storefront/src/components/commerce/company-state-badge.tsx +10 -16
  169. package/dist/assets/storefront/src/components/commerce/company-switcher.tsx +12 -12
  170. package/dist/assets/storefront/src/components/commerce/configurator-form.tsx +188 -79
  171. package/dist/assets/storefront/src/components/commerce/facet-filters.tsx +29 -49
  172. package/dist/assets/storefront/src/components/commerce/gift-card-pdp.tsx +4 -4
  173. package/dist/assets/storefront/src/components/commerce/gift-card-product-info.tsx +20 -30
  174. package/dist/assets/storefront/src/components/commerce/instant-search-dropdown.tsx +258 -227
  175. package/dist/assets/storefront/src/components/commerce/order-status-badge.tsx +27 -19
  176. package/dist/assets/storefront/src/components/commerce/packaging-unit-selector.tsx +27 -26
  177. package/dist/assets/storefront/src/components/commerce/permission-gate.tsx +4 -4
  178. package/dist/assets/storefront/src/components/commerce/price-range-filter.tsx +5 -5
  179. package/dist/assets/storefront/src/components/commerce/price-tiers.tsx +38 -21
  180. package/dist/assets/storefront/src/components/commerce/price.tsx +3 -3
  181. package/dist/assets/storefront/src/components/commerce/product-card-list.tsx +35 -14
  182. package/dist/assets/storefront/src/components/commerce/product-card.tsx +31 -16
  183. package/dist/assets/storefront/src/components/commerce/product-carousel.tsx +20 -12
  184. package/dist/assets/storefront/src/components/commerce/product-grid.tsx +14 -13
  185. package/dist/assets/storefront/src/components/commerce/product-image-carousel.tsx +10 -8
  186. package/dist/assets/storefront/src/components/commerce/product-info.tsx +129 -72
  187. package/dist/assets/storefront/src/components/commerce/product-list-expansion.tsx +102 -74
  188. package/dist/assets/storefront/src/components/commerce/product-list-view.tsx +1 -1
  189. package/dist/assets/storefront/src/components/commerce/product-sidebar.tsx +36 -11
  190. package/dist/assets/storefront/src/components/commerce/product-view-switcher.tsx +33 -21
  191. package/dist/assets/storefront/src/components/commerce/quote-action-buttons.tsx +54 -36
  192. package/dist/assets/storefront/src/components/commerce/quote-activity-timeline.tsx +126 -50
  193. package/dist/assets/storefront/src/components/commerce/quote-comment-form.tsx +9 -13
  194. package/dist/assets/storefront/src/components/commerce/quote-csv-export-button.tsx +6 -6
  195. package/dist/assets/storefront/src/components/commerce/quote-product-search.tsx +22 -18
  196. package/dist/assets/storefront/src/components/commerce/quote-request-form.tsx +28 -27
  197. package/dist/assets/storefront/src/components/commerce/quote-status-badge.tsx +26 -18
  198. package/dist/assets/storefront/src/components/commerce/quote-validity-indicator.tsx +7 -7
  199. package/dist/assets/storefront/src/components/commerce/quote-version-comparison.tsx +50 -30
  200. package/dist/assets/storefront/src/components/commerce/related-products.tsx +37 -28
  201. package/dist/assets/storefront/src/components/commerce/shared-cart-role.ts +39 -0
  202. package/dist/assets/storefront/src/components/commerce/shared-cart-status-badge.tsx +28 -0
  203. package/dist/assets/storefront/src/components/commerce/shop-by-category.tsx +8 -7
  204. package/dist/assets/storefront/src/components/commerce/shopping-list-toggle.tsx +14 -20
  205. package/dist/assets/storefront/src/components/commerce/sort-dropdown.tsx +9 -16
  206. package/dist/assets/storefront/src/components/commerce/store-credit-summary.tsx +30 -32
  207. package/dist/assets/storefront/src/components/commerce/subcollection-tiles.tsx +11 -13
  208. package/dist/assets/storefront/src/components/layout/auth-page-shell.tsx +2 -2
  209. package/dist/assets/storefront/src/components/layout/draft-mode-indicator.tsx +2 -7
  210. package/dist/assets/storefront/src/components/layout/draft-mode-link.tsx +4 -2
  211. package/dist/assets/storefront/src/components/layout/footer.tsx +70 -28
  212. package/dist/assets/storefront/src/components/layout/navbar/actions.ts +9 -12
  213. package/dist/assets/storefront/src/components/layout/navbar/cart-icon.tsx +9 -9
  214. package/dist/assets/storefront/src/components/layout/navbar/channel-picker-wrapper.tsx +4 -9
  215. package/dist/assets/storefront/src/components/layout/navbar/channel-picker.tsx +13 -8
  216. package/dist/assets/storefront/src/components/layout/navbar/currency-picker-wrapper.tsx +4 -4
  217. package/dist/assets/storefront/src/components/layout/navbar/currency-picker.tsx +11 -6
  218. package/dist/assets/storefront/src/components/layout/navbar/language-picker.tsx +7 -7
  219. package/dist/assets/storefront/src/components/layout/navbar/login-button.tsx +24 -21
  220. package/dist/assets/storefront/src/components/layout/navbar/mobile-nav.tsx +8 -8
  221. package/dist/assets/storefront/src/components/layout/navbar/nav-menu-items.tsx +4 -6
  222. package/dist/assets/storefront/src/components/layout/navbar/navbar-cart.tsx +1 -1
  223. package/dist/assets/storefront/src/components/layout/navbar/navbar-collections.tsx +41 -42
  224. package/dist/assets/storefront/src/components/layout/navbar/navbar-link.tsx +7 -10
  225. package/dist/assets/storefront/src/components/layout/navbar/navbar-user.tsx +18 -23
  226. package/dist/assets/storefront/src/components/layout/navbar/theme-switcher.tsx +9 -9
  227. package/dist/assets/storefront/src/components/layout/navbar.tsx +36 -31
  228. package/dist/assets/storefront/src/components/layout/search-input.tsx +35 -32
  229. package/dist/assets/storefront/src/components/providers/awaiting-approval-banner.tsx +12 -10
  230. package/dist/assets/storefront/src/components/providers/cart-count-server.tsx +14 -12
  231. package/dist/assets/storefront/src/components/providers/company-context-guard.tsx +4 -4
  232. package/dist/assets/storefront/src/components/providers/company-permissions-server.tsx +2 -6
  233. package/dist/assets/storefront/src/components/providers/theme-provider.tsx +3 -3
  234. package/dist/assets/storefront/src/components/shared/breadcrumbs.tsx +4 -1
  235. package/dist/assets/storefront/src/components/shared/country-select.tsx +63 -67
  236. package/dist/assets/storefront/src/components/shared/pagination.tsx +15 -28
  237. package/dist/assets/storefront/src/components/shared/prefetch-link.tsx +1 -1
  238. package/dist/assets/storefront/src/components/shared/skeletons/search-input-skeleton.tsx +1 -3
  239. package/dist/assets/storefront/src/components/ui/accordion.tsx +46 -51
  240. package/dist/assets/storefront/src/components/ui/alert-dialog.tsx +94 -121
  241. package/dist/assets/storefront/src/components/ui/alert.tsx +48 -54
  242. package/dist/assets/storefront/src/components/ui/aspect-ratio.tsx +5 -7
  243. package/dist/assets/storefront/src/components/ui/avatar.tsx +29 -44
  244. package/dist/assets/storefront/src/components/ui/badge.tsx +28 -37
  245. package/dist/assets/storefront/src/components/ui/breadcrumb.tsx +82 -89
  246. package/dist/assets/storefront/src/components/ui/button.tsx +43 -49
  247. package/dist/assets/storefront/src/components/ui/calendar.tsx +157 -198
  248. package/dist/assets/storefront/src/components/ui/card.tsx +53 -76
  249. package/dist/assets/storefront/src/components/ui/carousel.tsx +194 -212
  250. package/dist/assets/storefront/src/components/ui/chart.tsx +274 -317
  251. package/dist/assets/storefront/src/components/ui/checkbox.tsx +24 -27
  252. package/dist/assets/storefront/src/components/ui/collapsible.tsx +9 -21
  253. package/dist/assets/storefront/src/components/ui/command.tsx +114 -159
  254. package/dist/assets/storefront/src/components/ui/context-menu.tsx +167 -199
  255. package/dist/assets/storefront/src/components/ui/dialog.tsx +97 -114
  256. package/dist/assets/storefront/src/components/ui/drawer.tsx +93 -107
  257. package/dist/assets/storefront/src/components/ui/dropdown-menu.tsx +171 -206
  258. package/dist/assets/storefront/src/components/ui/empty-state.tsx +5 -5
  259. package/dist/assets/storefront/src/components/ui/field.tsx +196 -208
  260. package/dist/assets/storefront/src/components/ui/form.tsx +115 -139
  261. package/dist/assets/storefront/src/components/ui/hover-card.tsx +27 -33
  262. package/dist/assets/storefront/src/components/ui/input-otp.tsx +50 -59
  263. package/dist/assets/storefront/src/components/ui/input.tsx +17 -17
  264. package/dist/assets/storefront/src/components/ui/kbd-shortcut.tsx +3 -1
  265. package/dist/assets/storefront/src/components/ui/label.tsx +16 -19
  266. package/dist/assets/storefront/src/components/ui/menubar.tsx +193 -223
  267. package/dist/assets/storefront/src/components/ui/navigation-menu.tsx +123 -130
  268. package/dist/assets/storefront/src/components/ui/pagination.tsx +87 -108
  269. package/dist/assets/storefront/src/components/ui/popover.tsx +29 -35
  270. package/dist/assets/storefront/src/components/ui/progress.tsx +19 -26
  271. package/dist/assets/storefront/src/components/ui/radio-group.tsx +32 -38
  272. package/dist/assets/storefront/src/components/ui/resizable.tsx +37 -42
  273. package/dist/assets/storefront/src/components/ui/scroll-area.tsx +41 -47
  274. package/dist/assets/storefront/src/components/ui/select.tsx +130 -152
  275. package/dist/assets/storefront/src/components/ui/separator.tsx +21 -21
  276. package/dist/assets/storefront/src/components/ui/sheet.tsx +90 -111
  277. package/dist/assets/storefront/src/components/ui/sidebar.tsx +611 -649
  278. package/dist/assets/storefront/src/components/ui/skeleton.tsx +10 -10
  279. package/dist/assets/storefront/src/components/ui/slider.tsx +50 -55
  280. package/dist/assets/storefront/src/components/ui/sonner.tsx +20 -20
  281. package/dist/assets/storefront/src/components/ui/switch.tsx +23 -26
  282. package/dist/assets/storefront/src/components/ui/table.tsx +65 -97
  283. package/dist/assets/storefront/src/components/ui/tabs.tsx +39 -55
  284. package/dist/assets/storefront/src/components/ui/textarea.tsx +14 -14
  285. package/dist/assets/storefront/src/components/ui/toggle-group.tsx +56 -62
  286. package/dist/assets/storefront/src/components/ui/toggle.tsx +37 -38
  287. package/dist/assets/storefront/src/components/ui/tooltip.tsx +38 -46
  288. package/dist/assets/storefront/src/config/scenario-meta.ts +2 -2
  289. package/dist/assets/storefront/src/config/scenario.ts +14 -16
  290. package/dist/assets/storefront/src/contexts/auth-context.tsx +5 -6
  291. package/dist/assets/storefront/src/graphql-env.d.ts +18 -5
  292. package/dist/assets/storefront/src/graphql.ts +5 -5
  293. package/dist/assets/storefront/src/hooks/use-mobile.ts +13 -13
  294. package/dist/assets/storefront/src/i18n/locale-utils.ts +3 -3
  295. package/dist/assets/storefront/src/i18n/navigation.ts +4 -4
  296. package/dist/assets/storefront/src/i18n/request.ts +4 -4
  297. package/dist/assets/storefront/src/i18n/routing.ts +5 -5
  298. package/dist/assets/storefront/src/i18n/server.ts +3 -3
  299. package/dist/assets/storefront/src/lib/actions/switch-channel.ts +9 -9
  300. package/dist/assets/storefront/src/lib/actions/switch-currency.ts +7 -7
  301. package/dist/assets/storefront/src/lib/auth.ts +1 -1
  302. package/dist/assets/storefront/src/lib/backend-health.ts +3 -3
  303. package/dist/assets/storefront/src/lib/cart-count-context.tsx +10 -4
  304. package/dist/assets/storefront/src/lib/cart-guard-utils.ts +2 -1
  305. package/dist/assets/storefront/src/lib/cart-guard.ts +7 -6
  306. package/dist/assets/storefront/src/lib/channel-server.ts +4 -4
  307. package/dist/assets/storefront/src/lib/company-context.ts +1 -1
  308. package/dist/assets/storefront/src/lib/company-permissions-context.tsx +1 -5
  309. package/dist/assets/storefront/src/lib/currency-server.ts +4 -4
  310. package/dist/assets/storefront/src/lib/format.ts +16 -7
  311. package/dist/assets/storefront/src/lib/metadata.ts +39 -44
  312. package/dist/assets/storefront/src/lib/quantity.ts +2 -4
  313. package/dist/assets/storefront/src/lib/search-bar-context.tsx +7 -4
  314. package/dist/assets/storefront/src/lib/use-recent-searches.ts +8 -6
  315. package/dist/assets/storefront/src/lib/utils.ts +3 -3
  316. package/dist/assets/storefront/src/lib/vendure/actions.ts +18 -16
  317. package/dist/assets/storefront/src/lib/vendure/api.ts +44 -27
  318. package/dist/assets/storefront/src/lib/vendure/approval-utils.ts +9 -8
  319. package/dist/assets/storefront/src/lib/vendure/cached.ts +20 -15
  320. package/dist/assets/storefront/src/lib/vendure/mutations.ts +96 -0
  321. package/dist/assets/storefront/src/lib/vendure/queries.ts +157 -5
  322. package/dist/assets/storefront/src/middleware.ts +1 -1
  323. package/dist/assets/storefront/src/scenarios/customer/hero.tsx +2 -2
  324. package/dist/assets/storefront/src/scenarios/customer/meta.ts +1 -1
  325. package/dist/assets/storefront/src/schema.graphql +134 -0
  326. package/dist/bin/run.js +1 -1
  327. package/dist/cli.d.ts +1 -1
  328. package/dist/index.d.ts +5 -5
  329. package/dist/index.js +1 -1
  330. package/dist/plugin-registry.js +1 -1
  331. package/dist/scaffold-storefront-only.js +1 -1
  332. package/dist/scaffolder.js +1 -1
  333. package/dist/template-renderer.js +1 -1
  334. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- import {cacheLife, cacheTag} from 'next/cache';
2
- import {publicClient} from './api';
3
- import {GetActiveChannelQuery, GetAvailableCountriesQuery, GetTopCollectionsQuery} from './queries';
1
+ import { cacheLife, cacheTag } from 'next/cache';
2
+ import { publicClient } from './api';
3
+ import { GetActiveChannelQuery, GetAvailableCountriesQuery, GetTopCollectionsQuery } from './queries';
4
4
 
5
5
  /**
6
6
  * Get the active channel with caching enabled.
@@ -19,11 +19,18 @@ export async function getActiveChannelCached(channelToken?: string) {
19
19
  const [result, error] = await publicClient.query(
20
20
  GetActiveChannelQuery,
21
21
  undefined,
22
- channelToken ? {channelToken} : undefined,
22
+ channelToken ? { channelToken } : undefined,
23
23
  );
24
24
  if (error) {
25
25
  // Vendure API unavailable during build
26
- return { id: '', code: '', defaultLanguageCode: 'en' as const, availableLanguageCodes: [], defaultCurrencyCode: 'USD' as const, availableCurrencyCodes: [] };
26
+ return {
27
+ id: '',
28
+ code: '',
29
+ defaultLanguageCode: 'en' as const,
30
+ availableLanguageCodes: [],
31
+ defaultCurrencyCode: 'USD' as const,
32
+ availableCurrencyCodes: [],
33
+ };
27
34
  }
28
35
  return result.data.activeChannel;
29
36
  }
@@ -38,11 +45,10 @@ export async function getAvailableCountriesCached(locale: string, channelToken?:
38
45
  cacheLife('max');
39
46
  cacheTag(`countries-${locale}${channelToken ? `-${channelToken}` : ''}`);
40
47
 
41
- const [result, error] = await publicClient.query(
42
- GetAvailableCountriesQuery,
43
- undefined,
44
- {languageCode: locale, ...(channelToken ? {channelToken} : {})},
45
- );
48
+ const [result, error] = await publicClient.query(GetAvailableCountriesQuery, undefined, {
49
+ languageCode: locale,
50
+ ...(channelToken ? { channelToken } : {}),
51
+ });
46
52
  if (error) {
47
53
  return [];
48
54
  }
@@ -59,11 +65,10 @@ export async function getTopCollections(locale: string, channelToken?: string) {
59
65
  cacheLife('days');
60
66
  cacheTag(`collections-${locale}${channelToken ? `-${channelToken}` : ''}`);
61
67
 
62
- const [result, error] = await publicClient.query(
63
- GetTopCollectionsQuery,
64
- undefined,
65
- {languageCode: locale, ...(channelToken ? {channelToken} : {})},
66
- );
68
+ const [result, error] = await publicClient.query(GetTopCollectionsQuery, undefined, {
69
+ languageCode: locale,
70
+ ...(channelToken ? { channelToken } : {}),
71
+ });
67
72
  if (error) {
68
73
  return [];
69
74
  }
@@ -1144,3 +1144,99 @@ export const AddReorderToActiveOrderMutation = graphql(`
1144
1144
  }
1145
1145
  }
1146
1146
  `);
1147
+
1148
+ export const CreateSharedCartMutation = graphql(`
1149
+ mutation CreateSharedCart($input: CreateSharedCartInput!) {
1150
+ createSharedCart(input: $input) {
1151
+ id
1152
+ }
1153
+ }
1154
+ `);
1155
+
1156
+ export const UpdateSharedCartMutation = graphql(`
1157
+ mutation UpdateSharedCart($input: UpdateSharedCartInput!) {
1158
+ updateSharedCart(input: $input) {
1159
+ id
1160
+ name
1161
+ description
1162
+ }
1163
+ }
1164
+ `);
1165
+
1166
+ export const DeleteSharedCartMutation = graphql(`
1167
+ mutation DeleteSharedCart($id: ID!) {
1168
+ deleteSharedCart(id: $id) {
1169
+ result
1170
+ message
1171
+ }
1172
+ }
1173
+ `);
1174
+
1175
+ export const AddItemToSharedCartMutation = graphql(`
1176
+ mutation AddItemToSharedCart($sharedCartId: ID!, $productVariantId: ID!, $quantity: Int!) {
1177
+ addItemToSharedCart(
1178
+ sharedCartId: $sharedCartId
1179
+ productVariantId: $productVariantId
1180
+ quantity: $quantity
1181
+ ) {
1182
+ id
1183
+ }
1184
+ }
1185
+ `);
1186
+
1187
+ export const AdjustSharedCartLineMutation = graphql(`
1188
+ mutation AdjustSharedCartLine($sharedCartId: ID!, $lineId: ID!, $quantity: Int!) {
1189
+ adjustSharedCartLine(sharedCartId: $sharedCartId, lineId: $lineId, quantity: $quantity) {
1190
+ id
1191
+ }
1192
+ }
1193
+ `);
1194
+
1195
+ export const RemoveSharedCartLineMutation = graphql(`
1196
+ mutation RemoveSharedCartLine($sharedCartId: ID!, $lineId: ID!) {
1197
+ removeSharedCartLine(sharedCartId: $sharedCartId, lineId: $lineId) {
1198
+ id
1199
+ }
1200
+ }
1201
+ `);
1202
+
1203
+ export const AddSharedCartMemberMutation = graphql(`
1204
+ mutation AddSharedCartMember($input: CreateSharedCartMemberInput!) {
1205
+ addSharedCartMember(input: $input) {
1206
+ id
1207
+ }
1208
+ }
1209
+ `);
1210
+
1211
+ export const RemoveSharedCartMemberMutation = graphql(`
1212
+ mutation RemoveSharedCartMember($sharedCartId: ID!, $customerId: ID!) {
1213
+ removeSharedCartMember(sharedCartId: $sharedCartId, customerId: $customerId) {
1214
+ id
1215
+ }
1216
+ }
1217
+ `);
1218
+
1219
+ export const SetSharedCartMemberRoleMutation = graphql(`
1220
+ mutation SetSharedCartMemberRole($input: UpdateSharedCartMemberInput!) {
1221
+ setSharedCartMemberRole(input: $input) {
1222
+ id
1223
+ }
1224
+ }
1225
+ `);
1226
+
1227
+ export const TransferSharedCartOwnershipMutation = graphql(`
1228
+ mutation TransferSharedCartOwnership($sharedCartId: ID!, $newOwnerCustomerId: ID!) {
1229
+ transferSharedCartOwnership(sharedCartId: $sharedCartId, newOwnerCustomerId: $newOwnerCustomerId) {
1230
+ id
1231
+ }
1232
+ }
1233
+ `);
1234
+
1235
+ export const InitiateSharedCartCheckoutMutation = graphql(`
1236
+ mutation InitiateSharedCartCheckout($sharedCartId: ID!) {
1237
+ initiateSharedCartCheckout(sharedCartId: $sharedCartId) {
1238
+ id
1239
+ status
1240
+ }
1241
+ }
1242
+ `);
@@ -381,7 +381,9 @@ export const GetActiveOrderQuery = graphql(`
381
381
  `);
382
382
 
383
383
  /** A store credit applied to the active order. */
384
- export type StoreCredit = NonNullable<ResultOf<typeof GetActiveOrderQuery>['activeOrder']>['storeCreditsApplied'][number];
384
+ export type StoreCredit = NonNullable<
385
+ ResultOf<typeof GetActiveOrderQuery>['activeOrder']
386
+ >['storeCreditsApplied'][number];
385
387
 
386
388
  export const GetActiveOrderForCheckoutQuery = graphql(`
387
389
  query GetActiveOrderForCheckout {
@@ -871,7 +873,9 @@ export const GetMyCompaniesQuery = graphql(`
871
873
  }
872
874
  `);
873
875
 
874
- export type CompanyUserCompany = NonNullable<ResultOf<typeof GetMyCompaniesQuery>['activeCustomer']>['companyUsers'][number]['company'];
876
+ export type CompanyUserCompany = NonNullable<
877
+ ResultOf<typeof GetMyCompaniesQuery>['activeCustomer']
878
+ >['companyUsers'][number]['company'];
875
879
 
876
880
  export const GetActiveCustomerCompanyQuery = graphql(
877
881
  `
@@ -1144,7 +1148,9 @@ export const GetGiftCardTemplatesQuery = graphql(`
1144
1148
  `);
1145
1149
 
1146
1150
  /** A gift card template. */
1147
- export type GiftCardTemplate = ResultOf<typeof GetGiftCardTemplatesQuery>['giftCardTemplates']['items'][number];
1151
+ export type GiftCardTemplate = ResultOf<
1152
+ typeof GetGiftCardTemplatesQuery
1153
+ >['giftCardTemplates']['items'][number];
1148
1154
 
1149
1155
  export const GetMyQuoteDetailQuery = graphql(`
1150
1156
  query GetMyQuoteDetail($id: ID!) {
@@ -1281,7 +1287,9 @@ export const GetConfiguratorSystemQuery = graphql(`
1281
1287
  }
1282
1288
  `);
1283
1289
 
1284
- export type ConfiguratorSystem = NonNullable<ResultOf<typeof GetConfiguratorSystemQuery>['configuratorSystem']>;
1290
+ export type ConfiguratorSystem = NonNullable<
1291
+ ResultOf<typeof GetConfiguratorSystemQuery>['configuratorSystem']
1292
+ >;
1285
1293
  export type ConfiguratorModule = ConfiguratorSystem['modules'][number];
1286
1294
  export type ConfiguratorField = ConfiguratorModule['fields'][number];
1287
1295
 
@@ -1350,7 +1358,9 @@ export const EvaluateConfigurationQuery = graphql(`
1350
1358
  }
1351
1359
  `);
1352
1360
 
1353
- export type ConfigurationEvaluation = ResultOf<typeof EvaluateConfigurationQuery>['evaluateProductConfiguration'];
1361
+ export type ConfigurationEvaluation = ResultOf<
1362
+ typeof EvaluateConfigurationQuery
1363
+ >['evaluateProductConfiguration'];
1354
1364
  export type EvaluatedField = ConfigurationEvaluation['fields'][number];
1355
1365
  export type EvaluatedLine = ConfigurationEvaluation['lines'][number];
1356
1366
  export type EvaluatedExecutedRule = ConfigurationEvaluation['executedRules'][number];
@@ -1436,3 +1446,145 @@ export const PreviewReorderQuery = graphql(`
1436
1446
  }
1437
1447
  }
1438
1448
  `);
1449
+
1450
+ // ---------------------------------------------------------------------------
1451
+ // Shared Carts (EE-13)
1452
+ // A SharedCart wraps a live Order plus a membership overlay. The list query is
1453
+ // kept light; the detail query carries full lines + the activity log so a
1454
+ // single poll refreshes the whole collaborative view. Fields are inlined (not
1455
+ // fragments) to match the masking-on convention of the other list queries.
1456
+ // ---------------------------------------------------------------------------
1457
+
1458
+ export const GetMySharedCartsQuery = graphql(`
1459
+ query GetMySharedCarts($options: SharedCartListOptions) {
1460
+ mySharedCarts(options: $options) {
1461
+ totalItems
1462
+ items {
1463
+ id
1464
+ name
1465
+ status
1466
+ updatedAt
1467
+ owner {
1468
+ id
1469
+ firstName
1470
+ lastName
1471
+ }
1472
+ members {
1473
+ role
1474
+ customer {
1475
+ id
1476
+ }
1477
+ }
1478
+ order {
1479
+ id
1480
+ currencyCode
1481
+ totalWithTax
1482
+ totalQuantity
1483
+ }
1484
+ }
1485
+ }
1486
+ }
1487
+ `);
1488
+
1489
+ // Company-wide list for company admins (ManageSharedCarts): every cart in the company, including
1490
+ // ones the admin isn't a member of. Same shape as GetMySharedCarts so the list page can render
1491
+ // either result interchangeably.
1492
+ export const GetCompanySharedCartsQuery = graphql(`
1493
+ query GetCompanySharedCarts($options: SharedCartListOptions) {
1494
+ companySharedCarts(options: $options) {
1495
+ totalItems
1496
+ items {
1497
+ id
1498
+ name
1499
+ status
1500
+ updatedAt
1501
+ owner {
1502
+ id
1503
+ firstName
1504
+ lastName
1505
+ }
1506
+ members {
1507
+ role
1508
+ customer {
1509
+ id
1510
+ }
1511
+ }
1512
+ order {
1513
+ id
1514
+ currencyCode
1515
+ totalWithTax
1516
+ totalQuantity
1517
+ }
1518
+ }
1519
+ }
1520
+ }
1521
+ `);
1522
+
1523
+ export const GetSharedCartQuery = graphql(`
1524
+ query GetSharedCart($id: ID!) {
1525
+ sharedCart(id: $id) {
1526
+ id
1527
+ name
1528
+ description
1529
+ status
1530
+ createdAt
1531
+ updatedAt
1532
+ companyId
1533
+ owner {
1534
+ id
1535
+ firstName
1536
+ lastName
1537
+ emailAddress
1538
+ }
1539
+ members {
1540
+ role
1541
+ customer {
1542
+ id
1543
+ firstName
1544
+ lastName
1545
+ emailAddress
1546
+ }
1547
+ }
1548
+ order {
1549
+ id
1550
+ code
1551
+ currencyCode
1552
+ subTotalWithTax
1553
+ totalWithTax
1554
+ totalQuantity
1555
+ customer {
1556
+ id
1557
+ firstName
1558
+ lastName
1559
+ }
1560
+ lines {
1561
+ id
1562
+ quantity
1563
+ unitPriceWithTax
1564
+ linePriceWithTax
1565
+ productVariant {
1566
+ id
1567
+ name
1568
+ sku
1569
+ }
1570
+ featuredAsset {
1571
+ preview
1572
+ }
1573
+ }
1574
+ }
1575
+ activity {
1576
+ id
1577
+ createdAt
1578
+ action
1579
+ targetLineId
1580
+ detail
1581
+ actorLabel
1582
+ targetCustomer {
1583
+ id
1584
+ firstName
1585
+ lastName
1586
+ }
1587
+ }
1588
+ }
1589
+ }
1590
+ `);
@@ -1,5 +1,5 @@
1
1
  import createMiddleware from 'next-intl/middleware';
2
- import {routing} from './i18n/routing';
2
+ import { routing } from './i18n/routing';
3
3
 
4
4
  // Next.js 16 renamed "middleware" to "proxy" but next-intl still uses the
5
5
  // middleware convention. The deprecation warning is cosmetic and doesn't
@@ -1,8 +1,8 @@
1
- import { getTranslations } from 'next-intl/server';
2
1
  import { Button } from '@/components/ui/button';
3
- import { Link } from '@/i18n/navigation';
4
2
  import { getBranding } from '@/config/branding';
3
+ import { Link } from '@/i18n/navigation';
5
4
  import { ArrowRight } from 'lucide-react';
5
+ import { getTranslations } from 'next-intl/server';
6
6
 
7
7
  /**
8
8
  * Generic hero shipped with the `customer` scenario. Purely visual — no
@@ -1,3 +1,3 @@
1
- import type {ScenarioMeta} from '@/config/scenario-meta';
1
+ import type { ScenarioMeta } from '@/config/scenario-meta';
2
2
 
3
3
  export const customerMeta: ScenarioMeta = {};
@@ -147,6 +147,9 @@ type Query {
147
147
  Check stock availability for all items in a quote before proceeding to checkout.
148
148
  """
149
149
  quoteStockCheck(quoteId: ID!): QuoteStockCheckResult!
150
+ mySharedCarts(options: SharedCartListOptions): SharedCartList!
151
+ companySharedCarts(options: SharedCartListOptions): SharedCartList!
152
+ sharedCart(id: ID!): SharedCart
150
153
 
151
154
  """
152
155
  Fetch a single product variant by ID. Supports draft mode preview via the DraftModeInterceptor.
@@ -499,6 +502,17 @@ type Mutation {
499
502
  Cancel an in-progress quote checkout. Clears the active quote order marker.
500
503
  """
501
504
  cancelQuoteCheckout: Boolean!
505
+ createSharedCart(input: CreateSharedCartInput!): SharedCart!
506
+ updateSharedCart(input: UpdateSharedCartInput!): SharedCart!
507
+ deleteSharedCart(id: ID!): DeletionResponse!
508
+ addItemToSharedCart(sharedCartId: ID!, productVariantId: ID!, quantity: Int!): SharedCart!
509
+ adjustSharedCartLine(sharedCartId: ID!, lineId: ID!, quantity: Int!): SharedCart!
510
+ removeSharedCartLine(sharedCartId: ID!, lineId: ID!): SharedCart!
511
+ addSharedCartMember(input: CreateSharedCartMemberInput!): SharedCart!
512
+ removeSharedCartMember(sharedCartId: ID!, customerId: ID!): SharedCart!
513
+ setSharedCartMemberRole(input: UpdateSharedCartMemberInput!): SharedCart!
514
+ transferSharedCartOwnership(sharedCartId: ID!, newOwnerCustomerId: ID!): SharedCart!
515
+ initiateSharedCartCheckout(sharedCartId: ID!): SharedCart!
502
516
  addProductConfigurationToOrder(input: AddProductConfigurationToOrderInput!): ProductConfiguration!
503
517
 
504
518
  """
@@ -1165,6 +1179,9 @@ enum Permission {
1165
1179
  """Grants permission to delete QuoteManagement"""
1166
1180
  DeleteQuoteManagement
1167
1181
 
1182
+ """Allows administrators to view and manage all shared carts"""
1183
+ SharedCart
1184
+
1168
1185
  """Grants permission to create PriceList"""
1169
1186
  CreatePriceList
1170
1187
 
@@ -5311,6 +5328,100 @@ input RequestQuoteInput {
5311
5328
  note: String
5312
5329
  }
5313
5330
 
5331
+ enum SharedCartRole {
5332
+ view
5333
+ edit
5334
+ checkout
5335
+ }
5336
+
5337
+ enum SharedCartStatus {
5338
+ Open
5339
+ Locked
5340
+ Closed
5341
+ }
5342
+
5343
+ type SharedCart implements Node {
5344
+ id: ID!
5345
+ createdAt: DateTime!
5346
+ updatedAt: DateTime!
5347
+ name: String!
5348
+ description: String
5349
+ status: SharedCartStatus!
5350
+ order: Order!
5351
+ members: [SharedCartMember!]!
5352
+ activity: [SharedCartActivity!]!
5353
+ owner: Customer!
5354
+ companyId: ID!
5355
+ businessUnitId: ID
5356
+ }
5357
+
5358
+ type SharedCartMember implements Node {
5359
+ id: ID!
5360
+ createdAt: DateTime!
5361
+ updatedAt: DateTime!
5362
+ customer: Customer!
5363
+ role: SharedCartRole!
5364
+ }
5365
+
5366
+ type SharedCartActivity implements Node {
5367
+ id: ID!
5368
+ createdAt: DateTime!
5369
+ updatedAt: DateTime!
5370
+ actor: Customer
5371
+ actorLabel: String!
5372
+ action: String!
5373
+ targetLineId: ID
5374
+ targetCustomer: Customer
5375
+ detail: JSON
5376
+ }
5377
+
5378
+ type SharedCartList implements PaginatedList {
5379
+ items: [SharedCart!]!
5380
+ totalItems: Int!
5381
+ }
5382
+
5383
+ input SharedCartListOptions {
5384
+ """Skips the first n results, for use in pagination"""
5385
+ skip: Int
5386
+
5387
+ """Takes n results, for use in pagination"""
5388
+ take: Int
5389
+
5390
+ """Specifies which properties to sort the results by"""
5391
+ sort: SharedCartSortParameter
5392
+
5393
+ """Allows the results to be filtered"""
5394
+ filter: SharedCartFilterParameter
5395
+
5396
+ """
5397
+ Specifies whether multiple top-level "filter" fields should be combined with a logical AND or OR operation. Defaults to AND.
5398
+ """
5399
+ filterOperator: LogicalOperator
5400
+ }
5401
+
5402
+ input CreateSharedCartInput {
5403
+ name: String!
5404
+ description: String
5405
+ }
5406
+
5407
+ input UpdateSharedCartInput {
5408
+ id: ID!
5409
+ name: String
5410
+ description: String
5411
+ }
5412
+
5413
+ input CreateSharedCartMemberInput {
5414
+ sharedCartId: ID!
5415
+ customerId: ID!
5416
+ role: SharedCartRole!
5417
+ }
5418
+
5419
+ input UpdateSharedCartMemberInput {
5420
+ sharedCartId: ID!
5421
+ customerId: ID!
5422
+ role: SharedCartRole
5423
+ }
5424
+
5314
5425
  type PriceTier {
5315
5426
  minQuantity: Int!
5316
5427
  price: Money!
@@ -5965,6 +6076,29 @@ input QuoteSortParameter {
5965
6076
  convertedOrderId: SortOrder
5966
6077
  }
5967
6078
 
6079
+ input SharedCartFilterParameter {
6080
+ id: IDOperators
6081
+ createdAt: DateOperators
6082
+ updatedAt: DateOperators
6083
+ name: StringOperators
6084
+ description: StringOperators
6085
+ status: StringOperators
6086
+ companyId: IDOperators
6087
+ businessUnitId: IDOperators
6088
+ _and: [SharedCartFilterParameter!]
6089
+ _or: [SharedCartFilterParameter!]
6090
+ }
6091
+
6092
+ input SharedCartSortParameter {
6093
+ id: SortOrder
6094
+ createdAt: SortOrder
6095
+ updatedAt: SortOrder
6096
+ name: SortOrder
6097
+ description: SortOrder
6098
+ companyId: SortOrder
6099
+ businessUnitId: SortOrder
6100
+ }
6101
+
5968
6102
  input ApprovalRequestFilterParameter {
5969
6103
  id: IDOperators
5970
6104
  createdAt: DateOperators
package/dist/bin/run.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(){var n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},n(e)};return function(o){if(o&&o.__esModule)return o;var r={};if(null!=o)for(var i=n(o),a=0;a<i.length;a++)"default"!==i[a]&&e(r,o,i[a]);return t(r,o),r}}();Object.defineProperty(exports,"__esModule",{value:!0});const o=n(require("fs")),r=n(require("path")),i=require("commander"),a=require("../cli"),s=require("../scaffolder"),u=require("../scaffold-storefront-only"),l=require("../add-to-existing");function c(){const e=r.join(__dirname,"..","..","package.json");return JSON.parse(o.readFileSync(e,"utf8")).version}const p=(new i.Command).name("create-vendure-platform").description("Scaffold a Vendure project with Vendure Platform plugins, or a standalone storefront").version(c(),"-v, --version").enablePositionalOptions();p.command("add").description("Add Vendure Platform to an existing Vendure project (run from the project root)").option("--plugins <list>","Comma-separated list of plugin keys to include (skips the interactive prompt)").option("--registry-token <token>","Vendure private-registry npm auth token (written to project .npmrc as _authToken)").option("--license-token <token>","Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)").option("--dry-run","Show what would be changed without writing files").action(async e=>{const t=await(0,l.runAddToExistingCli)({plugins:e.plugins,dryRun:e.dryRun,registryToken:e.registryToken,licenseToken:e.licenseToken});await(0,l.addToExisting)(t)}),p.argument("[project-name]","Name of the project to create").option("--plugins <list>","Comma-separated list of plugin keys to include").option("--company <name>","Company name for the demo project").option("--no-storefront","Skip the Next.js storefront").option("--github","Create a GitHub repository").option("--github-org <org>","GitHub organization (only used with --github)","vendurehq").option("--no-github","Do not create a GitHub repository").option("--no-install","Skip dependency install").option("--no-git","Skip git init").option("--dry-run","Show what would be created without writing files").option("--storefront-only","Scaffold just the Next.js storefront, no server or plugins").option("--api-url <url>","Vendure Shop API URL (storefront-only mode)").option("--scenario <name>","Storefront scenario (storefront-only mode; default: customer)").option("--pm <bun|npm|pnpm>","Package manager used for the install step (default: bun)").option("--registry-token <token>","Vendure private-registry npm auth token (written to project .npmrc as _authToken)").option("--license-token <token>","Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)").action(async(e,t)=>{const n={plugins:t.plugins,company:t.company,storefront:t.storefront,github:t.github,githubOrg:t.githubOrg,install:t.install,git:t.git,dryRun:t.dryRun,storefrontOnly:t.storefrontOnly,apiUrl:t.apiUrl,scenario:t.scenario,pm:t.pm,registryToken:t.registryToken,licenseToken:t.licenseToken};if(n.storefrontOnly){const t=await(0,a.runStorefrontOnlyCli)(e,n);return void await(0,u.scaffoldStorefrontOnly)(t)}const o=await(0,a.runCli)(e,n);await(0,s.scaffold)(o)}),p.parseAsync().catch(e=>{console.error("Error:",e.message),process.exit(1)});
2
+ "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(){var n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},n(e)};return function(o){if(o&&o.__esModule)return o;var r={};if(null!=o)for(var i=n(o),a=0;a<i.length;a++)"default"!==i[a]&&e(r,o,i[a]);return t(r,o),r}}();Object.defineProperty(exports,"__esModule",{value:!0});const o=require("commander"),r=n(require("fs")),i=n(require("path")),a=require("../add-to-existing"),s=require("../cli"),u=require("../scaffold-storefront-only"),l=require("../scaffolder");function c(){const e=i.join(__dirname,"..","..","package.json");return JSON.parse(r.readFileSync(e,"utf8")).version}const p=(new o.Command).name("create-vendure-platform").description("Scaffold a Vendure project with Vendure Platform plugins, or a standalone storefront").version(c(),"-v, --version").enablePositionalOptions();p.command("add").description("Add Vendure Platform to an existing Vendure project (run from the project root)").option("--plugins <list>","Comma-separated list of plugin keys to include (skips the interactive prompt)").option("--registry-token <token>","Vendure private-registry npm auth token (written to project .npmrc as _authToken)").option("--license-token <token>","Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)").option("--dry-run","Show what would be changed without writing files").action(async e=>{const t=await(0,a.runAddToExistingCli)({plugins:e.plugins,dryRun:e.dryRun,registryToken:e.registryToken,licenseToken:e.licenseToken});await(0,a.addToExisting)(t)}),p.argument("[project-name]","Name of the project to create").option("--plugins <list>","Comma-separated list of plugin keys to include").option("--company <name>","Company name for the demo project").option("--no-storefront","Skip the Next.js storefront").option("--github","Create a GitHub repository").option("--github-org <org>","GitHub organization (only used with --github)","vendurehq").option("--no-github","Do not create a GitHub repository").option("--no-install","Skip dependency install").option("--no-git","Skip git init").option("--dry-run","Show what would be created without writing files").option("--storefront-only","Scaffold just the Next.js storefront, no server or plugins").option("--api-url <url>","Vendure Shop API URL (storefront-only mode)").option("--scenario <name>","Storefront scenario (storefront-only mode; default: customer)").option("--pm <bun|npm|pnpm>","Package manager used for the install step (default: bun)").option("--registry-token <token>","Vendure private-registry npm auth token (written to project .npmrc as _authToken)").option("--license-token <token>","Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)").action(async(e,t)=>{const n={plugins:t.plugins,company:t.company,storefront:t.storefront,github:t.github,githubOrg:t.githubOrg,install:t.install,git:t.git,dryRun:t.dryRun,storefrontOnly:t.storefrontOnly,apiUrl:t.apiUrl,scenario:t.scenario,pm:t.pm,registryToken:t.registryToken,licenseToken:t.licenseToken};if(n.storefrontOnly){const t=await(0,s.runStorefrontOnlyCli)(e,n);return void await(0,u.scaffoldStorefrontOnly)(t)}const o=await(0,s.runCli)(e,n);await(0,l.scaffold)(o)}),p.parseAsync().catch(e=>{console.error("Error:",e.message),process.exit(1)});
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ScaffoldOptions, StorefrontOnlyOptions, CliFlags } from './types';
1
+ import { CliFlags, ScaffoldOptions, StorefrontOnlyOptions } from './types';
2
2
  /**
3
3
  * Run the CLI in storefront-only mode. Returns options for `scaffoldStorefrontOnly`.
4
4
  * Interactive prompts kick in for any value not provided via flags.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { scaffold, TEMPLATE_FILES } from './scaffolder';
2
- export { scaffoldStorefrontOnly } from './scaffold-storefront-only';
3
- export { pluginRegistry, INTERNAL_PACKAGES, resolveActivePluginKeys, ALWAYS_ACTIVE_KEYS, SELECTABLE_KEYS, getPlugin, } from './plugin-registry';
1
+ export type { PluginCategory, PluginKey, PluginMeta, PluginMetaKey, PluginTier, } from '@vendure-platform/plugin-meta';
4
2
  export { runCli, runStorefrontOnlyCli } from './cli';
5
- export { ScaffoldOptions, StorefrontOnlyOptions, PluginDefinition, ScaffolderPluginExtras, EnvVar, CliFlags, PackageManager, } from './types';
6
- export type { PluginKey, PluginTier, PluginCategory, PluginMeta, PluginMetaKey, } from '@vendure-platform/plugin-meta';
3
+ export { ALWAYS_ACTIVE_KEYS, INTERNAL_PACKAGES, SELECTABLE_KEYS, getPlugin, pluginRegistry, resolveActivePluginKeys, } from './plugin-registry';
4
+ export { scaffoldStorefrontOnly } from './scaffold-storefront-only';
5
+ export { TEMPLATE_FILES, scaffold } from './scaffolder';
6
+ export { CliFlags, EnvVar, PackageManager, PluginDefinition, ScaffoldOptions, ScaffolderPluginExtras, StorefrontOnlyOptions, } from './types';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.runStorefrontOnlyCli=exports.runCli=exports.getPlugin=exports.SELECTABLE_KEYS=exports.ALWAYS_ACTIVE_KEYS=exports.resolveActivePluginKeys=exports.INTERNAL_PACKAGES=exports.pluginRegistry=exports.scaffoldStorefrontOnly=exports.TEMPLATE_FILES=exports.scaffold=void 0;var e=require("./scaffolder");Object.defineProperty(exports,"scaffold",{enumerable:!0,get:function(){return e.scaffold}}),Object.defineProperty(exports,"TEMPLATE_FILES",{enumerable:!0,get:function(){return e.TEMPLATE_FILES}});var r=require("./scaffold-storefront-only");Object.defineProperty(exports,"scaffoldStorefrontOnly",{enumerable:!0,get:function(){return r.scaffoldStorefrontOnly}});var t=require("./plugin-registry");Object.defineProperty(exports,"pluginRegistry",{enumerable:!0,get:function(){return t.pluginRegistry}}),Object.defineProperty(exports,"INTERNAL_PACKAGES",{enumerable:!0,get:function(){return t.INTERNAL_PACKAGES}}),Object.defineProperty(exports,"resolveActivePluginKeys",{enumerable:!0,get:function(){return t.resolveActivePluginKeys}}),Object.defineProperty(exports,"ALWAYS_ACTIVE_KEYS",{enumerable:!0,get:function(){return t.ALWAYS_ACTIVE_KEYS}}),Object.defineProperty(exports,"SELECTABLE_KEYS",{enumerable:!0,get:function(){return t.SELECTABLE_KEYS}}),Object.defineProperty(exports,"getPlugin",{enumerable:!0,get:function(){return t.getPlugin}});var n=require("./cli");Object.defineProperty(exports,"runCli",{enumerable:!0,get:function(){return n.runCli}}),Object.defineProperty(exports,"runStorefrontOnlyCli",{enumerable:!0,get:function(){return n.runStorefrontOnlyCli}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scaffold=exports.TEMPLATE_FILES=exports.scaffoldStorefrontOnly=exports.resolveActivePluginKeys=exports.pluginRegistry=exports.getPlugin=exports.SELECTABLE_KEYS=exports.INTERNAL_PACKAGES=exports.ALWAYS_ACTIVE_KEYS=exports.runStorefrontOnlyCli=exports.runCli=void 0;var e=require("./cli");Object.defineProperty(exports,"runCli",{enumerable:!0,get:function(){return e.runCli}}),Object.defineProperty(exports,"runStorefrontOnlyCli",{enumerable:!0,get:function(){return e.runStorefrontOnlyCli}});var r=require("./plugin-registry");Object.defineProperty(exports,"ALWAYS_ACTIVE_KEYS",{enumerable:!0,get:function(){return r.ALWAYS_ACTIVE_KEYS}}),Object.defineProperty(exports,"INTERNAL_PACKAGES",{enumerable:!0,get:function(){return r.INTERNAL_PACKAGES}}),Object.defineProperty(exports,"SELECTABLE_KEYS",{enumerable:!0,get:function(){return r.SELECTABLE_KEYS}}),Object.defineProperty(exports,"getPlugin",{enumerable:!0,get:function(){return r.getPlugin}}),Object.defineProperty(exports,"pluginRegistry",{enumerable:!0,get:function(){return r.pluginRegistry}}),Object.defineProperty(exports,"resolveActivePluginKeys",{enumerable:!0,get:function(){return r.resolveActivePluginKeys}});var t=require("./scaffold-storefront-only");Object.defineProperty(exports,"scaffoldStorefrontOnly",{enumerable:!0,get:function(){return t.scaffoldStorefrontOnly}});var n=require("./scaffolder");Object.defineProperty(exports,"TEMPLATE_FILES",{enumerable:!0,get:function(){return n.TEMPLATE_FILES}}),Object.defineProperty(exports,"scaffold",{enumerable:!0,get:function(){return n.scaffold}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SELECTABLE_KEYS=exports.ALWAYS_ACTIVE_KEYS=exports.INTERNAL_PACKAGES=exports.pluginRegistry=void 0,exports.getPlugin=o,exports.resolveActivePluginKeys=t;const e=require("@vendure-platform/plugin-meta"),n={"license-guard":{envVars:[{name:"VENDURE_PLATFORM_LICENSE_TOKEN",defaultValue:"dev-license-token"}],platformOptionsBlock:"licenseGuard: {\n token: process.env.VENDURE_PLATFORM_LICENSE_TOKEN,\n }"},"org-hierarchy":{envVars:[],platformOptionsBlock:""},"advanced-search":{envVars:[{name:"TYPESENSE_API_KEY",defaultValue:"your-typesense-api-key"},{name:"TYPESENSE_HOST",defaultValue:"localhost"},{name:"TYPESENSE_PORT",defaultValue:"8108"},{name:"TYPESENSE_PROTOCOL",defaultValue:"http"}],platformOptionsBlock:"advancedSearch: {\n typeSenseClientOptions: {\n apiKey: process.env.TYPESENSE_API_KEY as string,\n nodes: [\n {\n host: process.env.TYPESENSE_HOST as string,\n port: Number(process.env.TYPESENSE_PORT ?? 8108),\n protocol: (process.env.TYPESENSE_PROTOCOL ?? 'http') as 'http' | 'https',\n },\n ],\n },\n analytics: {\n analyticsStrategy: new SqlAnalyticsStrategy(),\n },\n }",platformImports:["import { SqlAnalyticsStrategy } from '@vendure-platform/advanced-search';"]},"workflow-engine":{envVars:[{name:"WORKFLOW_ENGINE_SCHEMA",defaultValue:"dbos"}],platformOptionsBlock:"workflowEngine: {\n databaseConnection: {\n host: process.env.DB_HOST ?? 'localhost',\n port: Number(process.env.DB_PORT ?? 5432),\n database: process.env.DB_NAME ?? 'vendure',\n username: process.env.DB_USERNAME ?? 'vendure',\n password: process.env.DB_PASSWORD ?? 'vendure',\n ssl: process.env.APP_ENV === 'production',\n },\n systemDatabaseSchemaName: process.env.WORKFLOW_ENGINE_SCHEMA ?? 'dbos',\n applicationVersion: 'v1',\n }"},"approval-workflows":{envVars:[],platformOptionsBlock:""},"global-search":{envVars:[],platformOptionsBlock:""},"entity-access-control":{envVars:[],platformOptionsBlock:""},"tax-id-management":{envVars:[],platformOptionsBlock:""},"shopping-list":{envVars:[],platformOptionsBlock:""},"quick-order":{envVars:[],platformOptionsBlock:""},"reorder-from-history":{envVars:[],platformOptionsBlock:""},"store-credit":{envVars:[],platformOptionsBlock:"storeCredit: {\n availableFontStacks: [\n 'Arial, Helvetica Neue, Helvetica, sans-serif',\n 'Impact, Charcoal, sans-serif',\n ],\n createDefaultGiftCardProduct: {\n name: 'Gift Card',\n sku: 'GC01',\n },\n }"},"quote-management":{envVars:[],platformOptionsBlock:""},"price-rules":{envVars:[],platformOptionsBlock:""},"packaging-units":{envVars:[],platformOptionsBlock:""},"content-versioning":{envVars:[],platformOptionsBlock:""},configurator:{envVars:[],platformOptionsBlock:""},sso:{envVars:[{name:"GOOGLE_CLIENT_ID",defaultValue:""},{name:"GOOGLE_CLIENT_SECRET",defaultValue:""},{name:"VENDURE_HOST",defaultValue:"http://localhost:3500"}],platformOptionsBlock:"sso: {\n vendureHost: process.env.VENDURE_HOST ?? 'http://localhost:3500',\n providers: [\n {\n type: 'oidc',\n id: 'google',\n displayName: 'Google SSO',\n issuerUrl: 'https://accounts.google.com',\n clientId: process.env.GOOGLE_CLIENT_ID ?? '',\n clientSecret: process.env.GOOGLE_CLIENT_SECRET ?? '',\n scopes: ['openid', 'profile', 'email'],\n },\n ],\n }"},"audit-trail":{envVars:[],platformOptionsBlock:"auditTrail: (defaults) => ({\n ...defaults,\n logSink: new DatabaseLogSink({\n dataSourceOptions: {\n type: 'postgres',\n host: process.env.DB_HOST ?? 'localhost',\n port: Number(process.env.DB_PORT ?? 5432),\n database: process.env.DB_NAME ?? 'vendure',\n schema: process.env.AUDIT_LOG_SCHEMA ?? 'audit_trail',\n username: process.env.DB_USERNAME ?? 'vendure',\n password: process.env.DB_PASSWORD ?? 'vendure',\n synchronize: true,\n },\n }),\n })",platformImports:["import { DatabaseLogSink } from '@vendure-platform/audit-trail';"]},punchout:{envVars:[{name:"PUNCHOUT_STOREFRONT_URL",defaultValue:"http://localhost:3000"}],platformOptionsBlock:"punchout: {\n storefrontUrl: process.env.PUNCHOUT_STOREFRONT_URL ?? 'http://localhost:3000',\n }"}};function o(e){return exports.pluginRegistry.find(n=>n.key===e)}function t(e){const n=new Set(exports.ALWAYS_ACTIVE_KEYS);for(const t of e){if(!o(t))throw new Error(`Unknown plugin key: "${t}"`);n.add(t)}return exports.pluginRegistry.filter(e=>n.has(e.key)).map(e=>e.key)}exports.pluginRegistry=e.PLUGIN_META.map(e=>({...e,...n[e.key]})),exports.INTERNAL_PACKAGES=[{packageName:"@vendure-platform/platform"},{packageName:"@vendure-platform/integration"},{packageName:"@vendure-platform/demo-center"}],exports.ALWAYS_ACTIVE_KEYS=exports.pluginRegistry.filter(e=>"core"===e.tier||"core-requires-config"===e.tier).map(e=>e.key),exports.SELECTABLE_KEYS=exports.pluginRegistry.filter(e=>"core"!==e.tier&&"core-requires-config"!==e.tier).map(e=>e.key);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SELECTABLE_KEYS=exports.ALWAYS_ACTIVE_KEYS=exports.INTERNAL_PACKAGES=exports.pluginRegistry=void 0,exports.getPlugin=o,exports.resolveActivePluginKeys=t;const e=require("@vendure-platform/plugin-meta"),n={"license-guard":{envVars:[{name:"VENDURE_PLATFORM_LICENSE_TOKEN",defaultValue:"dev-license-token"}],platformOptionsBlock:"licenseGuard: {\n token: process.env.VENDURE_PLATFORM_LICENSE_TOKEN,\n }"},"org-hierarchy":{envVars:[],platformOptionsBlock:""},"advanced-search":{envVars:[{name:"TYPESENSE_API_KEY",defaultValue:"your-typesense-api-key"},{name:"TYPESENSE_HOST",defaultValue:"localhost"},{name:"TYPESENSE_PORT",defaultValue:"8108"},{name:"TYPESENSE_PROTOCOL",defaultValue:"http"}],platformOptionsBlock:"advancedSearch: {\n typeSenseClientOptions: {\n apiKey: process.env.TYPESENSE_API_KEY as string,\n nodes: [\n {\n host: process.env.TYPESENSE_HOST as string,\n port: Number(process.env.TYPESENSE_PORT ?? 8108),\n protocol: (process.env.TYPESENSE_PROTOCOL ?? 'http') as 'http' | 'https',\n },\n ],\n },\n analytics: {\n analyticsStrategy: new SqlAnalyticsStrategy(),\n },\n }",platformImports:["import { SqlAnalyticsStrategy } from '@vendure-platform/advanced-search';"]},"workflow-engine":{envVars:[{name:"WORKFLOW_ENGINE_SCHEMA",defaultValue:"dbos"}],platformOptionsBlock:"workflowEngine: {\n databaseConnection: {\n host: process.env.DB_HOST ?? 'localhost',\n port: Number(process.env.DB_PORT ?? 5432),\n database: process.env.DB_NAME ?? 'vendure',\n username: process.env.DB_USERNAME ?? 'vendure',\n password: process.env.DB_PASSWORD ?? 'vendure',\n ssl: process.env.APP_ENV === 'production',\n },\n systemDatabaseSchemaName: process.env.WORKFLOW_ENGINE_SCHEMA ?? 'dbos',\n applicationVersion: 'v1',\n }"},"approval-workflows":{envVars:[],platformOptionsBlock:""},"global-search":{envVars:[],platformOptionsBlock:""},"entity-access-control":{envVars:[],platformOptionsBlock:""},"tax-id-management":{envVars:[],platformOptionsBlock:""},"shopping-list":{envVars:[],platformOptionsBlock:""},"quick-order":{envVars:[],platformOptionsBlock:""},"reorder-from-history":{envVars:[],platformOptionsBlock:""},"store-credit":{envVars:[],platformOptionsBlock:"storeCredit: {\n availableFontStacks: [\n 'Arial, Helvetica Neue, Helvetica, sans-serif',\n 'Impact, Charcoal, sans-serif',\n ],\n createDefaultGiftCardProduct: {\n name: 'Gift Card',\n sku: 'GC01',\n },\n }"},"quote-management":{envVars:[],platformOptionsBlock:""},"shared-carts":{envVars:[],platformOptionsBlock:""},"price-rules":{envVars:[],platformOptionsBlock:""},"packaging-units":{envVars:[],platformOptionsBlock:""},"product-types":{envVars:[],platformOptionsBlock:""},"content-versioning":{envVars:[],platformOptionsBlock:""},configurator:{envVars:[],platformOptionsBlock:""},sso:{envVars:[{name:"GOOGLE_CLIENT_ID",defaultValue:""},{name:"GOOGLE_CLIENT_SECRET",defaultValue:""},{name:"VENDURE_HOST",defaultValue:"http://localhost:3500"}],platformOptionsBlock:"sso: {\n vendureHost: process.env.VENDURE_HOST ?? 'http://localhost:3500',\n providers: [\n {\n type: 'oidc',\n id: 'google',\n displayName: 'Google SSO',\n issuerUrl: 'https://accounts.google.com',\n clientId: process.env.GOOGLE_CLIENT_ID ?? '',\n clientSecret: process.env.GOOGLE_CLIENT_SECRET ?? '',\n scopes: ['openid', 'profile', 'email'],\n },\n ],\n }"},"audit-trail":{envVars:[],platformOptionsBlock:"auditTrail: (defaults) => ({\n ...defaults,\n logSink: new DatabaseLogSink({\n dataSourceOptions: {\n type: 'postgres',\n host: process.env.DB_HOST ?? 'localhost',\n port: Number(process.env.DB_PORT ?? 5432),\n database: process.env.DB_NAME ?? 'vendure',\n schema: process.env.AUDIT_LOG_SCHEMA ?? 'audit_trail',\n username: process.env.DB_USERNAME ?? 'vendure',\n password: process.env.DB_PASSWORD ?? 'vendure',\n synchronize: true,\n },\n }),\n })",platformImports:["import { DatabaseLogSink } from '@vendure-platform/audit-trail';"]},punchout:{envVars:[{name:"PUNCHOUT_STOREFRONT_URL",defaultValue:"http://localhost:3000"}],platformOptionsBlock:"punchout: {\n storefrontUrl: process.env.PUNCHOUT_STOREFRONT_URL ?? 'http://localhost:3000',\n }"}};function o(e){return exports.pluginRegistry.find(n=>n.key===e)}function t(e){const n=new Set(exports.ALWAYS_ACTIVE_KEYS);for(const t of e){if(!o(t))throw new Error(`Unknown plugin key: "${t}"`);n.add(t)}return exports.pluginRegistry.filter(e=>n.has(e.key)).map(e=>e.key)}exports.pluginRegistry=e.PLUGIN_META.map(e=>({...e,...n[e.key]})),exports.INTERNAL_PACKAGES=[{packageName:"@vendure-platform/platform"},{packageName:"@vendure-platform/integration"},{packageName:"@vendure-platform/demo-center"}],exports.ALWAYS_ACTIVE_KEYS=exports.pluginRegistry.filter(e=>"core"===e.tier||"core-requires-config"===e.tier).map(e=>e.key),exports.SELECTABLE_KEYS=exports.pluginRegistry.filter(e=>"core"!==e.tier&&"core-requires-config"!==e.tier).map(e=>e.key);
@@ -1 +1 @@
1
- "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(){var r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},r(e)};return function(n){if(n&&n.__esModule)return n;var o={};if(null!=n)for(var a=r(n),i=0;i<a.length;i++)"default"!==a[i]&&e(o,n,a[i]);return t(o,n),o}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.scaffoldStorefrontOnly=c;const n=r(require("fs-extra")),o=r(require("path")),a=r(require("@clack/prompts")),i=require("./storefront-copier"),s=require("./scaffold-shared");async function c(e){const{projectName:t,apiUrl:r,scenario:c,packageManager:l,skipInstall:u,skipGit:p,dryRun:d}=e,f=o.resolve(process.cwd(),t);if(await n.pathExists(f)&&(await n.readdir(f)).length>0&&(a.log.error(`Directory "${f}" already exists and is not empty.`),process.exit(1)),d){const e=[`Project: ${t} \u2192 ${f}`,"","Mode: storefront-only",`Scenario: ${c}`,`API URL: ${null!=r?r:"(use default localhost)"}`,`Package manager: ${l}`,"Install deps: "+(u?"no":"yes"),"Git init: "+(p?"no":"yes")].join("\n");return a.note(e,"Dry run"),void a.outro("Dry run complete \u2014 no files written.")}const y=a.spinner();y.start("Creating project directory..."),await n.ensureDir(f),y.message("Copying storefront..."),await(0,i.copyStorefront)(f,{mode:"storefront-only",scenario:c,apiUrl:r,packageName:t}),u||await(0,s.installDependencies)(f,l,y),p||await(0,s.initRepository)(f,!1,void 0,y),y.stop(`Project "${t}" created successfully!`);const g=[`cd ${t}`,r?`# .env.local already points VENDURE_SHOP_API_URL at ${r}`:"# Edit .env.local and set VENDURE_SHOP_API_URL to your Vendure server","npm"===l?"npm run dev":`${l} run dev`,"","Storefront: http://localhost:${STOREFRONT_PORT:-3001}"].join("\n");a.note(g,"Next steps"),a.outro("Happy building!")}
1
+ "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(){var r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},r(e)};return function(n){if(n&&n.__esModule)return n;var o={};if(null!=n)for(var a=r(n),i=0;i<a.length;i++)"default"!==a[i]&&e(o,n,a[i]);return t(o,n),o}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.scaffoldStorefrontOnly=c;const n=r(require("@clack/prompts")),o=r(require("fs-extra")),a=r(require("path")),i=require("./scaffold-shared"),s=require("./storefront-copier");async function c(e){const{projectName:t,apiUrl:r,scenario:c,packageManager:l,skipInstall:u,skipGit:p,dryRun:d}=e,f=a.resolve(process.cwd(),t);if(await o.pathExists(f)&&(await o.readdir(f)).length>0&&(n.log.error(`Directory "${f}" already exists and is not empty.`),process.exit(1)),d){const e=[`Project: ${t} \u2192 ${f}`,"","Mode: storefront-only",`Scenario: ${c}`,`API URL: ${null!=r?r:"(use default localhost)"}`,`Package manager: ${l}`,"Install deps: "+(u?"no":"yes"),"Git init: "+(p?"no":"yes")].join("\n");return n.note(e,"Dry run"),void n.outro("Dry run complete \u2014 no files written.")}const y=n.spinner();y.start("Creating project directory..."),await o.ensureDir(f),y.message("Copying storefront..."),await(0,s.copyStorefront)(f,{mode:"storefront-only",scenario:c,apiUrl:r,packageName:t}),u||await(0,i.installDependencies)(f,l,y),p||await(0,i.initRepository)(f,!1,void 0,y),y.stop(`Project "${t}" created successfully!`);const g=[`cd ${t}`,r?`# .env.local already points VENDURE_SHOP_API_URL at ${r}`:"# Edit .env.local and set VENDURE_SHOP_API_URL to your Vendure server","npm"===l?"npm run dev":`${l} run dev`,"","Storefront: http://localhost:${STOREFRONT_PORT:-3001}"].join("\n");n.note(g,"Next steps"),n.outro("Happy building!")}