@vendure-platform/create 1.0.2-nightly.202611020955.154.1 → 1.0.2

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 (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/assets/storefront/package.json +1 -1
  3. package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-units-client.tsx +1 -1
  4. package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/tax-ids-client.tsx +1 -1
  5. package/dist/assets/storefront/src/app/[locale]/account/company/users/users-client.tsx +1 -1
  6. package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-dialog.tsx +1 -1
  7. package/dist/assets/storefront/src/app/[locale]/account/orders/page.tsx +1 -1
  8. package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/shopping-list-detail-client.tsx +5 -1
  9. package/dist/assets/storefront/src/app/[locale]/cart/request-quote-button.tsx +6 -1
  10. package/dist/assets/storefront/src/app/api/demo-persona/demo-route-helpers.ts +2 -2
  11. package/dist/assets/storefront/src/app/api/demo-seed/route.ts +4 -3
  12. package/dist/assets/storefront/src/app/api/demo-story-state/route.ts +14 -3
  13. package/dist/assets/storefront/src/components/commerce/price-tiers.tsx +1 -1
  14. package/dist/assets/storefront/src/components/commerce/product-info.tsx +1 -1
  15. package/dist/assets/storefront/src/components/commerce/quote-action-buttons.tsx +1 -0
  16. package/dist/assets/storefront/src/graphql-env.d.ts +2 -2
  17. package/dist/assets/storefront/src/lib/demo-tour/driver.ts +10 -0
  18. package/dist/assets/storefront/src/lib/demo-tour/highlight.ts +16 -2
  19. package/dist/assets/storefront/src/schema.graphql +18 -7
  20. package/dist/assets/templates/env.hbs +4 -0
  21. package/dist/assets/templates/server-package.json.hbs +1 -1
  22. package/dist/console-onboarding.js +1 -1
  23. package/dist/next-steps.d.ts +13 -0
  24. package/dist/next-steps.js +1 -0
  25. package/dist/plugin-registry.js +1 -1
  26. package/dist/scaffold-storefront-only.js +1 -1
  27. package/dist/scaffolder.js +1 -1
  28. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.0.2 (2026-11-04)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - fix Cloud testing papercuts in the scaffold and its output ([#851](https://github.com/vendurehq/vendure-platform/pull/851))
6
+ - declare the plugin packages that the generated config imports ([#844](https://github.com/vendurehq/vendure-platform/pull/844))
7
+ - pin prereleases to their exact version and quiet Git, npm and docs papercuts ([#841](https://github.com/vendurehq/vendure-platform/pull/841))
8
+
1
9
  ## 1.0.1 (2026-10-13)
2
10
 
3
11
  ### 🩹 Fixes
@@ -37,7 +37,7 @@
37
37
  "@radix-ui/react-toggle": "^1.1.10",
38
38
  "@radix-ui/react-toggle-group": "^1.1.11",
39
39
  "@radix-ui/react-tooltip": "^1.2.8",
40
- "@vendure-platform/storefront-client": "^1.0.2-nightly.202611020955.154.1",
40
+ "@vendure-platform/storefront-client": "^1.0.2",
41
41
  "class-variance-authority": "^0.7.1",
42
42
  "clsx": "^2.1.1",
43
43
  "cmdk": "^1.1.1",
@@ -161,7 +161,7 @@ export function BusinessUnitsClient({ businessUnits }: BusinessUnitsClientProps)
161
161
  {businessUnits.length === 0 ? (
162
162
  <div className="text-center py-12 text-muted-foreground">{t('noBusinessUnits')}</div>
163
163
  ) : (
164
- <div className="space-y-2">
164
+ <div className="space-y-2" data-tour="company-business-units">
165
165
  {topLevelBus.map((bu) => (
166
166
  <BusinessUnitNode
167
167
  key={bu.id}
@@ -252,7 +252,7 @@ export function TaxIdsClient({ taxIds }: TaxIdsClientProps) {
252
252
  </CardContent>
253
253
  </Card>
254
254
  ) : (
255
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
255
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4" data-tour="company-tax-ids">
256
256
  {taxIds.map((taxId) => (
257
257
  <Card key={taxId.id}>
258
258
  <CardHeader className="flex flex-row items-start justify-between space-y-0 pb-2">
@@ -132,7 +132,7 @@ export function UsersClient({ users, roles, businessUnits, canManageUsers }: Use
132
132
  {users.length === 0 ? (
133
133
  <div className="text-center py-12 text-muted-foreground">{t('noUsers')}</div>
134
134
  ) : (
135
- <Table>
135
+ <Table data-tour="company-users">
136
136
  <TableHeader>
137
137
  <TableRow>
138
138
  <TableHead>{t('tableHeadName')}</TableHead>
@@ -211,7 +211,7 @@ export function ReorderDialog({ sourceOrderId, sourceOrderCode, sourceLines }: P
211
211
  return (
212
212
  <Dialog open={open} onOpenChange={handleOpenChange}>
213
213
  <DialogTrigger asChild>
214
- <Button variant="outline" size="sm" data-testid="reorder-trigger">
214
+ <Button variant="outline" size="sm" data-testid="reorder-trigger" data-tour="reorder">
215
215
  <ShoppingCart className="h-4 w-4 mr-2" />
216
216
  {t('trigger')}
217
217
  </Button>
@@ -62,7 +62,7 @@ function OrderTable({
62
62
  tReorder: Awaited<ReturnType<typeof getTranslations<'Reorder'>>>;
63
63
  }) {
64
64
  return (
65
- <div className="border rounded-lg">
65
+ <div className="border rounded-lg" data-tour="order-history">
66
66
  <Table>
67
67
  <TableHeader className="bg-muted">
68
68
  <TableRow>
@@ -443,7 +443,11 @@ export function ShoppingListDetailClient({
443
443
  <p className="text-sm text-muted-foreground">
444
444
  {tRoot('itemCount', { count: shoppingList.totalItems })}
445
445
  </p>
446
- <Button onClick={handleAddAllToCart} disabled={isPending || inStockItems.length === 0}>
446
+ <Button
447
+ onClick={handleAddAllToCart}
448
+ disabled={isPending || inStockItems.length === 0}
449
+ data-tour="shopping-list-add-all"
450
+ >
447
451
  <ShoppingCart className="mr-2 h-4 w-4" />
448
452
  {inStockItems.length === items.length
449
453
  ? t('addAllToCartButton')
@@ -54,7 +54,12 @@ export function RequestQuoteButton({
54
54
 
55
55
  return (
56
56
  <>
57
- <Button variant="outline" className="w-full mt-2" onClick={() => setDialogOpen(true)}>
57
+ <Button
58
+ variant="outline"
59
+ className="w-full mt-2"
60
+ onClick={() => setDialogOpen(true)}
61
+ data-tour="request-quote"
62
+ >
58
63
  <FileText className="h-4 w-4 mr-2" />
59
64
  {t('requestQuote')}
60
65
  </Button>
@@ -13,8 +13,8 @@ import { NextResponse } from 'next/server';
13
13
  /** The persona keys of `PUBLIC_DEMO_LEAD_DATA` in the vendure-branded scenario. */
14
14
  export const DEMO_PERSONAS = ['buyer', 'approver', 'admin'];
15
15
 
16
- /** The stories that the Vendure server can seed (`LEAD_STORY_KEYS`). */
17
- export const DEMO_STORIES = ['blocked-order'];
16
+ /** The stories of the Vendure server (`LEAD_STORY_KEYS`). `pricing` has a state but no seed. */
17
+ export const DEMO_STORIES = ['blocked-order', 'pricing', 'rfq', 'repeat-buying', 'company-account'];
18
18
 
19
19
  export type DemoRouteError =
20
20
  | 'no-session'
@@ -14,9 +14,10 @@ import {
14
14
 
15
15
  /**
16
16
  * Story seed of the demo shell (GTM-610).
17
- * `/api/demo-seed?story=<story>&redirect=<path>` puts the current persona's
18
- * cart into the start state of the story and redirects to the path. A second
19
- * call gives the same state again. See docs-internal/public-demo-stories.md.
17
+ * `/api/demo-seed?story=<story>&redirect=<path>` puts the lead company of the
18
+ * current persona into the start state of the story and redirects to the
19
+ * path. A second call gives the same state again. See
20
+ * docs-internal/public-demo-stories.md.
20
21
  */
21
22
 
22
23
  const PublicDemoSeedStoryMutation = graphql(`
@@ -11,9 +11,10 @@ import {
11
11
  } from '../demo-persona/demo-route-helpers';
12
12
 
13
13
  /**
14
- * Story state for the demo shell (GTM-610).
15
- * `/api/demo-story-state?story=<story>` answers with the newest order of the
16
- * lead company in the story and its approval request. The approval workflow
14
+ * Story state for the demo shell (GTM-610, GTM-1150).
15
+ * `/api/demo-story-state?story=<story>` answers with the records of the lead
16
+ * company in the story: its order and approval request, quote and shopping
17
+ * list, and the item count of its carts. The approval workflow
17
18
  * creates the request asynchronously, so while the order waits for it, the
18
19
  * route asks again for up to about 10 seconds.
19
20
  */
@@ -24,11 +25,16 @@ const RETRY_DELAYS_MS = [250, 500, 1000, 2000, 3000, 3250];
24
25
  const PublicDemoStoryStateQuery = graphql(`
25
26
  query PublicDemoStoryState($story: String!) {
26
27
  publicDemoStoryState(story: $story) {
28
+ companyId
27
29
  orderId
28
30
  orderCode
29
31
  orderState
30
32
  approvalRequestId
31
33
  approvalState
34
+ quoteId
35
+ quoteState
36
+ shoppingListId
37
+ cartQuantity
32
38
  }
33
39
  }
34
40
  `);
@@ -50,11 +56,16 @@ export async function GET(request: NextRequest) {
50
56
  if (!waiting || attempt >= RETRY_DELAYS_MS.length) {
51
57
  return demoJson({
52
58
  story,
59
+ companyId: state?.companyId ?? null,
53
60
  orderId: state?.orderId ?? null,
54
61
  orderCode: state?.orderCode ?? null,
55
62
  orderState: state?.orderState ?? null,
56
63
  approvalRequestId: state?.approvalRequestId ?? null,
57
64
  approvalState: state?.approvalState ?? null,
65
+ quoteId: state?.quoteId ?? null,
66
+ quoteState: state?.quoteState ?? null,
67
+ shoppingListId: state?.shoppingListId ?? null,
68
+ cartQuantity: state?.cartQuantity ?? 0,
58
69
  });
59
70
  }
60
71
  await sleep(RETRY_DELAYS_MS[attempt]);
@@ -49,7 +49,7 @@ export function PriceTiers({
49
49
  );
50
50
 
51
51
  return (
52
- <div className="rounded-lg border bg-muted/30 p-4">
52
+ <div className="rounded-lg border bg-muted/30 p-4" data-tour="price-tiers">
53
53
  <h3 className="text-sm font-semibold mb-3">
54
54
  {t('volumePricing')}{' '}
55
55
  <span className="text-[10px] font-normal text-muted-foreground">
@@ -298,7 +298,7 @@ export function ProductInfo({
298
298
  <div className="space-y-1.5">
299
299
  <h1 className="text-2xl font-bold">{product.name}</h1>
300
300
  {selectedVariant && (
301
- <div className="flex items-center gap-3 flex-wrap">
301
+ <div className="flex items-center gap-3 flex-wrap" data-tour="product-price">
302
302
  <div>
303
303
  <span className="text-3xl font-bold text-primary">
304
304
  <Price
@@ -200,6 +200,7 @@ export function QuoteActionButtons({
200
200
  )}
201
201
  <div className="flex flex-col gap-2">
202
202
  <Button
203
+ data-tour="quote-accept"
203
204
  onClick={() => {
204
205
  startTransition(async () => {
205
206
  const stockResult = await checkQuoteStock(quoteId);
@@ -205,7 +205,7 @@ export type introspection_types = {
205
205
  'LogicalOperator': { name: 'LogicalOperator'; enumValues: 'AND' | 'OR'; };
206
206
  'MissingPasswordError': { kind: 'OBJECT'; name: 'MissingPasswordError'; fields: { 'errorCode': { name: 'errorCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ErrorCode'; ofType: null; }; } }; 'message': { name: 'message'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
207
207
  'Money': unknown;
208
- 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'acceptAndConvertQuote': { name: 'acceptAndConvertQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'acceptCompanyInvitation': { name: 'acceptCompanyInvitation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AcceptCompanyInvitationResult'; ofType: null; }; } }; 'acceptQuote': { name: 'acceptQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'activatePunchoutSession': { name: 'activatePunchoutSession'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PunchoutSessionInfo'; ofType: null; }; } }; 'addCompanyTaxId': { name: 'addCompanyTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxId'; ofType: null; }; } }; 'addGiftCardToOrder': { name: 'addGiftCardToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addItemToOrder': { name: 'addItemToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addItemToSharedCart': { name: 'addItemToSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'addItemsToOrder': { name: 'addItemsToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'UpdateMultipleOrderItemsResult'; ofType: null; }; } }; 'addPaymentToOrder': { name: 'addPaymentToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddPaymentToOrderResult'; ofType: null; }; } }; 'addPaymentToOrderWithStoreCredit': { name: 'addPaymentToOrderWithStoreCredit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddPaymentToOrderWithStoreCreditResult'; ofType: null; }; } }; 'addProductConfigurationToOrder': { name: 'addProductConfigurationToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductConfiguration'; ofType: null; }; } }; 'addQuickOrderItemsToOrder': { name: 'addQuickOrderItemsToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'QuickOrderAddToOrderResult'; ofType: null; }; } }; 'addQuoteComment': { name: 'addQuoteComment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QuoteComment'; ofType: null; }; } }; 'addReorderToActiveOrder': { name: 'addReorderToActiveOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ReorderResult'; ofType: null; }; } }; 'addSharedCartMember': { name: 'addSharedCartMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'addShoppingListItemsToOrder': { name: 'addShoppingListItemsToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addTaxId': { name: 'addTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxId'; ofType: null; }; } }; 'addToShoppingList': { name: 'addToShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'adjustOrderLine': { name: 'adjustOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'adjustSharedCartLine': { name: 'adjustSharedCartLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'applyCouponCode': { name: 'applyCouponCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ApplyCouponCodeResult'; ofType: null; }; } }; 'applyStoreCreditToOrder': { name: 'applyStoreCreditToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ApplyStoreCreditToOrderResult'; ofType: null; }; } }; 'assignCompanyUserRole': { name: 'assignCompanyUserRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyUser'; ofType: null; }; } }; 'authenticate': { name: 'authenticate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AuthenticationResult'; ofType: null; }; } }; 'batchSubmitApprovalDecisions': { name: 'batchSubmitApprovalDecisions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'BatchApprovalDecisionResult'; ofType: null; }; }; }; } }; 'cancelQuoteCheckout': { name: 'cancelQuoteCheckout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'claimStoreCredit': { name: 'claimStoreCredit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ClaimStoreCreditResult'; ofType: null; }; } }; 'createCompanyAddress': { name: 'createCompanyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAddress'; ofType: null; }; } }; 'createCompanyBusinessUnit': { name: 'createCompanyBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyBusinessUnit'; ofType: null; }; } }; 'createCustomerAddress': { name: 'createCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'createSharedCart': { name: 'createSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'createShoppingList': { name: 'createShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'deleteCompanyAddress': { name: 'deleteCompanyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCompanyBusinessUnit': { name: 'deleteCompanyBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomerAddress': { name: 'deleteCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'deleteSharedCart': { name: 'deleteSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteShoppingList': { name: 'deleteShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'initiateSharedCartCheckout': { name: 'initiateSharedCartCheckout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'inviteCompanyUser': { name: 'inviteCompanyUser'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'logSearchListViewed': { name: 'logSearchListViewed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'logSearchResultClicked': { name: 'logSearchResultClicked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'login': { name: 'login'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NativeAuthenticationResult'; ofType: null; }; } }; 'logout': { name: 'logout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'moveShoppingListItems': { name: 'moveShoppingListItems'; type: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; } }; 'publicDemoDashboardToken': { name: 'publicDemoDashboardToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'publicDemoSeedStory': { name: 'publicDemoSeedStory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'refreshCustomerVerification': { name: 'refreshCustomerVerification'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RefreshCustomerVerificationResult'; ofType: null; }; } }; 'registerCompany': { name: 'registerCompany'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAccount'; ofType: null; }; } }; 'registerCustomerAccount': { name: 'registerCustomerAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RegisterCustomerAccountResult'; ofType: null; }; } }; 'rejectQuote': { name: 'rejectQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'removeAllOrderLines': { name: 'removeAllOrderLines'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOrderItemsResult'; ofType: null; }; } }; 'removeCompanyTaxId': { name: 'removeCompanyTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'removeCompanyUser': { name: 'removeCompanyUser'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'removeCouponCode': { name: 'removeCouponCode'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'removeFromShoppingList': { name: 'removeFromShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'removeOrderLine': { name: 'removeOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOrderItemsResult'; ofType: null; }; } }; 'removeProductConfigurationFromOrder': { name: 'removeProductConfigurationFromOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'removeSharedCartLine': { name: 'removeSharedCartLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'removeSharedCartMember': { name: 'removeSharedCartMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'removeStoreCreditFromOrder': { name: 'removeStoreCreditFromOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'removeTaxId': { name: 'removeTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'requestPasswordReset': { name: 'requestPasswordReset'; type: { kind: 'UNION'; name: 'RequestPasswordResetResult'; ofType: null; } }; 'requestQuote': { name: 'requestQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'requestQuoteChanges': { name: 'requestQuoteChanges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'requestQuoteFromCart': { name: 'requestQuoteFromCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'requestUpdateCustomerEmailAddress': { name: 'requestUpdateCustomerEmailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RequestUpdateCustomerEmailAddressResult'; ofType: null; }; } }; 'resetPassword': { name: 'resetPassword'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ResetPasswordResult'; ofType: null; }; } }; 'setCurrencyCodeForOrder': { name: 'setCurrencyCodeForOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'setCustomerForOrder': { name: 'setCustomerForOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetCustomerForOrderResult'; ofType: null; }; } }; 'setDefaultTaxId': { name: 'setDefaultTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxId'; ofType: null; }; } }; 'setOrderBillingAddress': { name: 'setOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'setOrderCustomFields': { name: 'setOrderCustomFields'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'setOrderShippingAddress': { name: 'setOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'setOrderShippingMethod': { name: 'setOrderShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetOrderShippingMethodResult'; ofType: null; }; } }; 'setSharedCartMemberRole': { name: 'setSharedCartMemberRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'setShoppingListVisibility': { name: 'setShoppingListVisibility'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'submitApprovalDecision': { name: 'submitApprovalDecision'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ApprovalRequest'; ofType: null; }; } }; 'submitQuoteRequest': { name: 'submitQuoteRequest'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'switchBusinessUnit': { name: 'switchBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAccount'; ofType: null; }; } }; 'transferPunchoutCart': { name: 'transferPunchoutCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PunchoutCartTransferResult'; ofType: null; }; } }; 'transferSharedCartOwnership': { name: 'transferSharedCartOwnership'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'transitionOrderToState': { name: 'transitionOrderToState'; type: { kind: 'UNION'; name: 'TransitionOrderToStateResult'; ofType: null; } }; 'unsetOrderBillingAddress': { name: 'unsetOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'unsetOrderShippingAddress': { name: 'unsetOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'updateCompanyAccount': { name: 'updateCompanyAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAccount'; ofType: null; }; } }; 'updateCompanyAddress': { name: 'updateCompanyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAddress'; ofType: null; }; } }; 'updateCompanyBusinessUnit': { name: 'updateCompanyBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyBusinessUnit'; ofType: null; }; } }; 'updateCompanyUser': { name: 'updateCompanyUser'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyUser'; ofType: null; }; } }; 'updateCustomer': { name: 'updateCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Customer'; ofType: null; }; } }; 'updateCustomerAddress': { name: 'updateCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'updateCustomerEmailAddress': { name: 'updateCustomerEmailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateCustomerEmailAddressResult'; ofType: null; }; } }; 'updateCustomerPassword': { name: 'updateCustomerPassword'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateCustomerPasswordResult'; ofType: null; }; } }; 'updateProductConfigurationOnOrder': { name: 'updateProductConfigurationOnOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductConfiguration'; ofType: null; }; } }; 'updateSharedCart': { name: 'updateSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'updateShoppingList': { name: 'updateShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'updateShoppingListItem': { name: 'updateShoppingListItem'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingListItem'; ofType: null; }; } }; 'validateQuickOrderItems': { name: 'validateQuickOrderItems'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QuickOrderValidationResult'; ofType: null; }; } }; 'verifyCustomerAccount': { name: 'verifyCustomerAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'VerifyCustomerAccountResult'; ofType: null; }; } }; }; };
208
+ 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'acceptAndConvertQuote': { name: 'acceptAndConvertQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'acceptCompanyInvitation': { name: 'acceptCompanyInvitation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AcceptCompanyInvitationResult'; ofType: null; }; } }; 'acceptQuote': { name: 'acceptQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'activatePunchoutSession': { name: 'activatePunchoutSession'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PunchoutSessionInfo'; ofType: null; }; } }; 'addCompanyTaxId': { name: 'addCompanyTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxId'; ofType: null; }; } }; 'addGiftCardToOrder': { name: 'addGiftCardToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addItemToOrder': { name: 'addItemToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addItemToSharedCart': { name: 'addItemToSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'addItemsToOrder': { name: 'addItemsToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'UpdateMultipleOrderItemsResult'; ofType: null; }; } }; 'addPaymentToOrder': { name: 'addPaymentToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddPaymentToOrderResult'; ofType: null; }; } }; 'addPaymentToOrderWithStoreCredit': { name: 'addPaymentToOrderWithStoreCredit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddPaymentToOrderWithStoreCreditResult'; ofType: null; }; } }; 'addProductConfigurationToOrder': { name: 'addProductConfigurationToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductConfiguration'; ofType: null; }; } }; 'addQuickOrderItemsToOrder': { name: 'addQuickOrderItemsToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'QuickOrderAddToOrderResult'; ofType: null; }; } }; 'addQuoteComment': { name: 'addQuoteComment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QuoteComment'; ofType: null; }; } }; 'addReorderToActiveOrder': { name: 'addReorderToActiveOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ReorderResult'; ofType: null; }; } }; 'addSharedCartMember': { name: 'addSharedCartMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'addShoppingListItemsToOrder': { name: 'addShoppingListItemsToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addTaxId': { name: 'addTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxId'; ofType: null; }; } }; 'addToShoppingList': { name: 'addToShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'adjustOrderLine': { name: 'adjustOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'adjustSharedCartLine': { name: 'adjustSharedCartLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'applyCouponCode': { name: 'applyCouponCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ApplyCouponCodeResult'; ofType: null; }; } }; 'applyStoreCreditToOrder': { name: 'applyStoreCreditToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ApplyStoreCreditToOrderResult'; ofType: null; }; } }; 'assignCompanyUserRole': { name: 'assignCompanyUserRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyUser'; ofType: null; }; } }; 'authenticate': { name: 'authenticate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AuthenticationResult'; ofType: null; }; } }; 'batchSubmitApprovalDecisions': { name: 'batchSubmitApprovalDecisions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'BatchApprovalDecisionResult'; ofType: null; }; }; }; } }; 'cancelQuoteCheckout': { name: 'cancelQuoteCheckout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'claimStoreCredit': { name: 'claimStoreCredit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ClaimStoreCreditResult'; ofType: null; }; } }; 'createCompanyAddress': { name: 'createCompanyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAddress'; ofType: null; }; } }; 'createCompanyBusinessUnit': { name: 'createCompanyBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyBusinessUnit'; ofType: null; }; } }; 'createCustomerAddress': { name: 'createCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'createSharedCart': { name: 'createSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'createShoppingList': { name: 'createShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'deleteCompanyAddress': { name: 'deleteCompanyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCompanyBusinessUnit': { name: 'deleteCompanyBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomerAddress': { name: 'deleteCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'deleteSharedCart': { name: 'deleteSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteShoppingList': { name: 'deleteShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'initiateSharedCartCheckout': { name: 'initiateSharedCartCheckout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'inviteCompanyUser': { name: 'inviteCompanyUser'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'logSearchListViewed': { name: 'logSearchListViewed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'logSearchResultClicked': { name: 'logSearchResultClicked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'login': { name: 'login'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NativeAuthenticationResult'; ofType: null; }; } }; 'logout': { name: 'logout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'moveShoppingListItems': { name: 'moveShoppingListItems'; type: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; } }; 'publicDemoDashboardToken': { name: 'publicDemoDashboardToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'publicDemoSeedStory': { name: 'publicDemoSeedStory'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'refreshCustomerVerification': { name: 'refreshCustomerVerification'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RefreshCustomerVerificationResult'; ofType: null; }; } }; 'registerCompany': { name: 'registerCompany'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAccount'; ofType: null; }; } }; 'registerCustomerAccount': { name: 'registerCustomerAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RegisterCustomerAccountResult'; ofType: null; }; } }; 'rejectQuote': { name: 'rejectQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'removeAllOrderLines': { name: 'removeAllOrderLines'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOrderItemsResult'; ofType: null; }; } }; 'removeCompanyTaxId': { name: 'removeCompanyTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'removeCompanyUser': { name: 'removeCompanyUser'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'removeCouponCode': { name: 'removeCouponCode'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'removeFromShoppingList': { name: 'removeFromShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'removeOrderLine': { name: 'removeOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOrderItemsResult'; ofType: null; }; } }; 'removeProductConfigurationFromOrder': { name: 'removeProductConfigurationFromOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'removeSharedCartLine': { name: 'removeSharedCartLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'removeSharedCartMember': { name: 'removeSharedCartMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'removeStoreCreditFromOrder': { name: 'removeStoreCreditFromOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'removeTaxId': { name: 'removeTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'requestPasswordReset': { name: 'requestPasswordReset'; type: { kind: 'UNION'; name: 'RequestPasswordResetResult'; ofType: null; } }; 'requestQuote': { name: 'requestQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'requestQuoteChanges': { name: 'requestQuoteChanges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'requestQuoteFromCart': { name: 'requestQuoteFromCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'requestUpdateCustomerEmailAddress': { name: 'requestUpdateCustomerEmailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RequestUpdateCustomerEmailAddressResult'; ofType: null; }; } }; 'resetPassword': { name: 'resetPassword'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ResetPasswordResult'; ofType: null; }; } }; 'setCurrencyCodeForOrder': { name: 'setCurrencyCodeForOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'setCustomerForOrder': { name: 'setCustomerForOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetCustomerForOrderResult'; ofType: null; }; } }; 'setDefaultTaxId': { name: 'setDefaultTaxId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxId'; ofType: null; }; } }; 'setOrderBillingAddress': { name: 'setOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'setOrderCustomFields': { name: 'setOrderCustomFields'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'setOrderShippingAddress': { name: 'setOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'setOrderShippingMethod': { name: 'setOrderShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetOrderShippingMethodResult'; ofType: null; }; } }; 'setSharedCartMemberRole': { name: 'setSharedCartMemberRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'setShoppingListVisibility': { name: 'setShoppingListVisibility'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'submitApprovalDecision': { name: 'submitApprovalDecision'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ApprovalRequest'; ofType: null; }; } }; 'submitQuoteRequest': { name: 'submitQuoteRequest'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Quote'; ofType: null; }; } }; 'switchBusinessUnit': { name: 'switchBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAccount'; ofType: null; }; } }; 'transferPunchoutCart': { name: 'transferPunchoutCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PunchoutCartTransferResult'; ofType: null; }; } }; 'transferSharedCartOwnership': { name: 'transferSharedCartOwnership'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'transitionOrderToState': { name: 'transitionOrderToState'; type: { kind: 'UNION'; name: 'TransitionOrderToStateResult'; ofType: null; } }; 'unsetOrderBillingAddress': { name: 'unsetOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'unsetOrderShippingAddress': { name: 'unsetOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActiveOrderResult'; ofType: null; }; } }; 'updateCompanyAccount': { name: 'updateCompanyAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAccount'; ofType: null; }; } }; 'updateCompanyAddress': { name: 'updateCompanyAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyAddress'; ofType: null; }; } }; 'updateCompanyBusinessUnit': { name: 'updateCompanyBusinessUnit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyBusinessUnit'; ofType: null; }; } }; 'updateCompanyUser': { name: 'updateCompanyUser'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CompanyUser'; ofType: null; }; } }; 'updateCustomer': { name: 'updateCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Customer'; ofType: null; }; } }; 'updateCustomerAddress': { name: 'updateCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'updateCustomerEmailAddress': { name: 'updateCustomerEmailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateCustomerEmailAddressResult'; ofType: null; }; } }; 'updateCustomerPassword': { name: 'updateCustomerPassword'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateCustomerPasswordResult'; ofType: null; }; } }; 'updateProductConfigurationOnOrder': { name: 'updateProductConfigurationOnOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductConfiguration'; ofType: null; }; } }; 'updateSharedCart': { name: 'updateSharedCart'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SharedCart'; ofType: null; }; } }; 'updateShoppingList': { name: 'updateShoppingList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingList'; ofType: null; }; } }; 'updateShoppingListItem': { name: 'updateShoppingListItem'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShoppingListItem'; ofType: null; }; } }; 'validateQuickOrderItems': { name: 'validateQuickOrderItems'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QuickOrderValidationResult'; ofType: null; }; } }; 'verifyCustomerAccount': { name: 'verifyCustomerAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'VerifyCustomerAccountResult'; ofType: null; }; } }; }; };
209
209
  'NativeAuthInput': { kind: 'INPUT_OBJECT'; name: 'NativeAuthInput'; isOneOf: false; inputFields: [{ name: 'username'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; };
210
210
  'NativeAuthStrategyError': { kind: 'OBJECT'; name: 'NativeAuthStrategyError'; fields: { 'errorCode': { name: 'errorCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ErrorCode'; ofType: null; }; } }; 'message': { name: 'message'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
211
211
  'NativeAuthenticationResult': { kind: 'UNION'; name: 'NativeAuthenticationResult'; fields: {}; possibleTypes: 'CurrentUser' | 'InvalidCredentialsError' | 'NativeAuthStrategyError' | 'NotVerifiedError'; };
@@ -287,7 +287,7 @@ export type introspection_types = {
287
287
  'ProvinceList': { kind: 'OBJECT'; name: 'ProvinceList'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Province'; ofType: null; }; }; }; } }; 'totalItems': { name: 'totalItems'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
288
288
  'PublicDemoAuthInput': { kind: 'INPUT_OBJECT'; name: 'PublicDemoAuthInput'; isOneOf: false; inputFields: [{ name: 'token'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; };
289
289
  'PublicDemoPersonaAuthInput': { kind: 'INPUT_OBJECT'; name: 'PublicDemoPersonaAuthInput'; isOneOf: false; inputFields: [{ name: 'persona'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; };
290
- 'PublicDemoStoryState': { kind: 'OBJECT'; name: 'PublicDemoStoryState'; fields: { 'approvalRequestId': { name: 'approvalRequestId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'approvalState': { name: 'approvalState'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'orderCode': { name: 'orderCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'orderId': { name: 'orderId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'orderState': { name: 'orderState'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
290
+ 'PublicDemoStoryState': { kind: 'OBJECT'; name: 'PublicDemoStoryState'; fields: { 'approvalRequestId': { name: 'approvalRequestId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'approvalState': { name: 'approvalState'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'cartQuantity': { name: 'cartQuantity'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'companyId': { name: 'companyId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'orderCode': { name: 'orderCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'orderId': { name: 'orderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'orderState': { name: 'orderState'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quoteId': { name: 'quoteId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'quoteState': { name: 'quoteState'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'shoppingListId': { name: 'shoppingListId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; }; };
291
291
  'PublicPaymentMethod': { kind: 'OBJECT'; name: 'PublicPaymentMethod'; fields: { 'code': { name: 'code'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'customFields': { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'translations': { name: 'translations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethodTranslation'; ofType: null; }; }; }; } }; }; };
292
292
  'PublicShippingMethod': { kind: 'OBJECT'; name: 'PublicShippingMethod'; fields: { 'code': { name: 'code'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'customFields': { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'translations': { name: 'translations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethodTranslation'; ofType: null; }; }; }; } }; }; };
293
293
  'PunchoutActiveOrderInput': { kind: 'INPUT_OBJECT'; name: 'PunchoutActiveOrderInput'; isOneOf: false; inputFields: [{ name: 'sessionId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; };
@@ -8,6 +8,7 @@ import type { HighlightRequest } from './highlight';
8
8
 
9
9
  let active: Driver | undefined;
10
10
  let resizes: ResizeObserver | undefined;
11
+ let release: (() => void) | undefined;
11
12
 
12
13
  export function showHighlight(element: Element, request: HighlightRequest, onDismiss: () => void): void {
13
14
  hideHighlight();
@@ -28,11 +29,20 @@ export function showHighlight(element: Element, request: HighlightRequest, onDis
28
29
  if (active === instance) {
29
30
  active = undefined;
30
31
  resizes?.disconnect();
32
+ release?.();
31
33
  }
32
34
  if (reason !== 'api') onDismiss();
33
35
  },
34
36
  });
35
37
  active = instance;
38
+ // A click on the target closes the highlight, as the close button does. The
39
+ // target can open a dialog, and the overlay would then cover the dialog.
40
+ const onTargetClick = () => {
41
+ hideHighlight();
42
+ onDismiss();
43
+ };
44
+ element.addEventListener('click', onTargetClick, { capture: true });
45
+ release = () => element.removeEventListener('click', onTargetClick, { capture: true });
36
46
  // driver.js places the popover again only on a window resize or scroll.
37
47
  // Content that loads later can move the target, so it places it again then too.
38
48
  resizes = new ResizeObserver(() => instance.refresh());
@@ -13,8 +13,22 @@ export const TOUR_MESSAGES = {
13
13
  ready: 'vendure-demo:ready',
14
14
  } as const;
15
15
 
16
- /** The `data-tour` keys of the storefront. The blocked-order story of the shell uses them. */
17
- export const STOREFRONT_TOUR_TARGETS = ['cart-total', 'checkout-steps', 'approval-approve'] as const;
16
+ /** The `data-tour` keys of the storefront that the stories of the shell use (`docs-internal/demo-shell.md`). */
17
+ export const STOREFRONT_TOUR_TARGETS = [
18
+ 'cart-total',
19
+ 'checkout-steps',
20
+ 'approval-approve',
21
+ 'product-price',
22
+ 'price-tiers',
23
+ 'request-quote',
24
+ 'quote-accept',
25
+ 'order-history',
26
+ 'reorder',
27
+ 'shopping-list-add-all',
28
+ 'company-users',
29
+ 'company-business-units',
30
+ 'company-tax-ids',
31
+ ] as const;
18
32
 
19
33
  export interface HighlightRequest {
20
34
  target: string;
@@ -3769,7 +3769,7 @@ type Query {
3769
3769
  activePunchoutSession: PunchoutSessionInfo
3770
3770
 
3771
3771
  """
3772
- The newest order of the signed-in lead's company in the story. Only a public demo lead persona can call it.
3772
+ The records of the story for the signed-in lead's company. Only a public demo lead persona can call it.
3773
3773
  """
3774
3774
  publicDemoStoryState(story: String!): PublicDemoStoryState
3775
3775
  }
@@ -4168,9 +4168,9 @@ type Mutation {
4168
4168
  removeCompanyTaxId(id: ID!): DeletionResponse!
4169
4169
 
4170
4170
  """
4171
- Puts the signed-in lead persona's active order into the start state of the story.
4171
+ Puts the signed-in lead's company into the start state of the story. Returns the persona's cart, or null for a story without one.
4172
4172
  """
4173
- publicDemoSeedStory(story: String!): Order!
4173
+ publicDemoSeedStory(story: String!): Order
4174
4174
 
4175
4175
  """
4176
4176
  A one-minute token for a Dashboard session as Demo Visitor. Only a public demo lead persona can call it.
@@ -5931,13 +5931,24 @@ input AddCompanyTaxIdInput {
5931
5931
  companyAddressId: ID
5932
5932
  }
5933
5933
 
5934
+ """
5935
+ The records of a story that the demo shell shows. A field is null when the story does not use it.
5936
+ """
5934
5937
  type PublicDemoStoryState {
5935
- """The order ID for the Dashboard order detail page."""
5936
- orderId: ID!
5937
- orderCode: String!
5938
- orderState: String!
5938
+ companyId: ID!
5939
+
5940
+ """The order of the story, for the Dashboard order detail page."""
5941
+ orderId: ID
5942
+ orderCode: String
5943
+ orderState: String
5939
5944
  approvalRequestId: ID
5940
5945
  approvalState: String
5946
+ quoteId: ID
5947
+ quoteState: String
5948
+ shoppingListId: ID
5949
+
5950
+ """The number of items in the carts of the company's personas."""
5951
+ cartQuantity: Int!
5941
5952
  }
5942
5953
 
5943
5954
  input ProductVariantFilterParameter {
@@ -67,6 +67,10 @@ WORKFLOW_ENGINE_SSL=false
67
67
 
68
68
  {{#ifPlugin "sso"}}
69
69
  # SSO (Google OIDC)
70
+ # The Dashboard login page shows a Google button only when GOOGLE_CLIENT_ID and
71
+ # GOOGLE_CLIENT_SECRET are both set. Use the OAuth client of your Google Cloud
72
+ # project. VENDURE_HOST is the public URL of this server. It builds the callback
73
+ # URL, so it must match the redirect URI that you register at Google.
70
74
  GOOGLE_CLIENT_ID=
71
75
  GOOGLE_CLIENT_SECRET=
72
76
  VENDURE_HOST=http://localhost:3500
@@ -28,7 +28,7 @@
28
28
  "dotenv": "^16.4.7"{{platformDependencies}}
29
29
  },
30
30
  "devDependencies": {
31
- "vite": "^6.3.5",
31
+ "vite": "^7.3.1",
32
32
  "ts-node": "^10.9.2",
33
33
  "typescript": "^5.9.3",
34
34
  "@types/node": "^22.0.0",
@@ -1 +1 @@
1
- "use strict";var e=this&&this.__createBinding||(Object.create?function(e,n,o,t){void 0===t&&(t=o);var r=Object.getOwnPropertyDescriptor(n,o);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(e,t,r)}:function(e,n,o,t){void 0===t&&(t=o),e[t]=n[o]}),n=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),o=this&&this.__importStar||function(){var o=function(e){return o=Object.getOwnPropertyNames||function(e){var n=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[n.length]=o);return n},o(e)};return function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var i=o(t),s=0;s<i.length;s++)"default"!==i[s]&&e(r,t,i[s]);return n(r,t),r}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveRegistryToken=d,exports.startConsoleOnboarding=g,exports.isInteractive=f,exports.finishConsoleOnboarding=p,exports.registryTokenStep=v;const t=o(require("@clack/prompts")),r=require("@vendure-platform/console-auth"),i=require("node:fs"),s=require("node:path"),c=require("./docs-url"),a=require("./plugin-registry"),l=require("./registry");class ProjectHasNoPlan extends Error{constructor(){super(...arguments),this.name="ProjectHasNoPlan"}}const u="Continuing without a Vendure Console Project.";function d(e,n){return e?{token:e,projectId:void 0}:{token:n.registryToken,projectId:n.registryProjectId}}async function g(e){const n=Boolean(e.projectId);let o;try{o=(0,r.resolveConsoleOrigins)(process.env)}catch(e){if(n)throw e;return void t.log.warn(`${V(e)} Continuing without Vendure Console.`)}const i=await b(o,e.interactive,e.projectId);if(!i)return;let s=i;const c=new r.ConsoleApi({apiOrigin:o.apiOrigin,getAccessToken:()=>s,refreshAccessToken:async()=>{s=await(0,r.refreshStoredConsoleToken)({...o,failedAccessToken:s})}});let l;for(;!l;)try{l=await(0,r.selectConsoleProject)({api:c,interaction:O(e.projectId),origins:o,projectRoot:e.projectDir})}catch(i){if(i instanceof r.ConsoleOnboardingCancelled)throw i;if(i instanceof r.ConsoleApiError&&"auth.organization_missing"===i.code)throw new r.ConsoleCustomerAccountRequired(`Your Vendure Console login is not scoped to a Customer Account. Run "${(0,r.accountLoginCommand)(o.apiOrigin)}", then run this command again.`);const a=await R(c,i);if(!a){if(n)throw i;return void t.log.warn(`${V(i)} ${u}`)}const l=()=>new Error(`${a} No files were created. To use another account, run "${(0,r.accountLoginCommand)(o.apiOrigin)}", then run this command again.`);if(!e.interactive){if(n)throw l();return void t.log.warn(`${a} ${u}`)}t.log.warn(a);const d=await t.confirm({message:"Sign in with another Vendure Console account?",initialValue:!0});if(t.isCancel(d))throw new r.ConsoleOnboardingCancelled;if(!d){if(n)throw l();return void t.log.warn(u)}const g=await k(o,n);if(!g)return;s=g}const{project:d,edition:g}=l,f=(0,r.projectSubscriptionUrl)(o.appOrigin,d.id);if(!g)throw t.note(`Choose a plan: ${f}\nThen retry this command and select ${d.name}.`,"Next steps"),new ProjectHasNoPlan(`The Console Project ${d.name} is kept. No files or Registry Access Token were created.`);return{project:{id:d.id,name:d.name},edition:g&&(0,a.isCapabilityProfileName)(g)?g:void 0,subscriptionUrl:f,finish:async n=>({...await $(c,d,n,o,e.projectDir),subscriptionUrl:f})}}function f(){return Boolean(process.stdin.isTTY&&process.stdout.isTTY)}async function p(e,n,o){if(!e)return(0,l.offlineRegistry)();try{const r=await e.finish(n);return r.registryAccessDenied&&!o&&t.log.warn(`Your Console role cannot issue Registry Access Tokens for ${e.project.name}, so this project cannot install Platform packages yet. Ask a member with the Credential manager, Project admin or Admin role to create an access token on the Registry access page of ${e.project.name} in Vendure Console. ${(0,l.setRegistryTokenStep)(r.registryUrl)}`),r}catch(o){return t.log.warn(`Could not finish linking to Vendure Console. ${V(o)} ${j(n)}`),{...(0,l.offlineRegistry)(),subscriptionUrl:e.subscriptionUrl}}}const h=[3,8],w=`${c.PLATFORM_DOCS_URL}/getting-started/registry-access`;function C(e){for(let n=e;;n=(0,s.dirname)(n)){try{const e=JSON.parse((0,i.readFileSync)((0,s.join)(n,"node_modules","@vendure","cli","package.json"),"utf8"));if("string"==typeof e.version)return e.version}catch{}if((0,s.dirname)(n)===n)return}}function m(e){const n=C(e);if(void 0===n)return;const[o,t]=n.split(".").map(e=>Number.parseInt(e,10)),[r,i]=h;return o>r||o===r&&t>=i?void 0:n}function y(e,n){const[o,t]=h;return`@vendure/cli ${n} has no "console link" command. Update it to ${o}.${t} or later and run "npx vendure console link" in ${e}, or create a Registry Access Token for the Project in Vendure Console and add it to ${(0,s.join)(e,".npmrc")} by hand. Steps: ${w}`}function j(e){const n=m(e);return void 0===n?`Run "npx vendure console link" in ${e} to finish.`:y(e,n)}function v(e){const n=m(e);return void 0===n?"Run `vendure console link` to link this project and get a Registry Access Token.":y(e,n)}async function $(e,n,o,i,s){await(0,r.writeProjectLink)({api:e,interaction:O(),projectRoot:o,projectId:n.id,origins:i}),t.log.success(`Linked ${o} to ${n.name}.`);const c=await(0,r.acquireRegistryAccess)({api:e,projectId:n.id,projectRoot:s,interaction:{confirmRotate:async e=>{const n=await t.confirm({message:`Replace the Registry Access Token "${e}"? Whatever installs with the current one stops working.`,initialValue:!1});if(t.isCancel(n))throw new r.ConsoleOnboardingCancelled;return n},report:e=>t.log.info(e),warn:e=>t.log.warn(e)},defaultRegistryUrl:(0,r.registryUrlFor)(i.apiOrigin),defaultScope:l.REGISTRY_SCOPE});if("permission-denied"===c.reason)return{registryUrl:c.registryUrl,scope:c.scope,registryAccessDenied:!0};if("npm-login"===c.fallback){const e=`npm login --auth-type=web --registry=${(0,l.registryLoginUrl)(c.registryUrl)}`,n="rotation-declined"===c.reason?"You kept the existing Registry Access Token. Its secret was not written to this directory.":"The named Registry Access Token is inactive. Replace it in Vendure Console.";return t.log.warn(`${n} Log in to the registry before installing:\n ${e}`),{registryUrl:c.registryUrl,scope:c.scope,registryLogin:e}}return{registryUrl:c.registryUrl,scope:c.scope,registryToken:c.token,registryProjectId:n.id}}async function b(e,n,o){let i;try{i=await(0,r.resolveStoredConsoleToken)(e)}catch(e){if(o)throw e;return void t.log.warn(`${V(e)} Continuing without Vendure Console.`)}if(i)return(0,r.scopeStoredConsoleSession)({...e,accessToken:i,...n?{chooseCustomerAccount:P}:{}});if(!n)return;const s=await t.confirm({message:"Sign in to Vendure Console to set this project up?",initialValue:!0});if(t.isCancel(s))throw new r.ConsoleOnboardingCancelled;if(s)return A(e,n,Boolean(o));if(o)throw new Error(`--console-project ${o} needs a Vendure Console sign-in. No files were created. Run this command again and sign in.`)}async function k(e,n){try{const o=await(0,r.otherConsoleCustomerAccounts)(e);if(0===o.length)return A(e,!0,n);const i=1===o.length?o[0]:await P(o),s=await(0,r.switchConsoleCustomerAccount)(i,e);return t.log.info(`This session now uses the Vendure Console account "${i.name}".`),s}catch(e){if(n||e instanceof r.ConsoleOnboardingCancelled)throw e;return void t.log.warn(`${V(e)} ${u}`)}}async function A(e,n,o=!1){const i=t.spinner();i.start("Waiting for you to finish signing in to Vendure Console");let s=!0;const c=e=>{s&&i.stop(e),s=!1};try{const o=await(0,r.loginAndStoreConsoleToken)({...e,onDeviceAuthorization:e=>t.log.info(`Open ${e.verificationUriComplete} and enter code ${e.userCode} to sign in.`),...n?{chooseCustomerAccount:e=>(c("Signed in to Vendure Console."),P(e))}:{}});return c("Signed in to Vendure Console."),o}catch(e){if(e instanceof r.ConsoleCustomerAccountRequired||e instanceof r.ConsoleOnboardingCancelled)throw c("Signed in to Vendure Console."),e;if(c("Could not sign in to Vendure Console."),o)throw e;return void t.log.warn(`${V(e)} Continuing without it.`)}}const P=async e=>{const n=await t.select({message:"Which Vendure Console Customer Account is this project for?",options:e.map(e=>({label:e.name,value:e.customerAccountId,hint:`Account identifier ${e.customerAccountId}`}))});if(t.isCancel(n))throw new r.ConsoleOnboardingCancelled;const o=e.find(e=>e.customerAccountId===n);if(!o)throw new r.ConsoleOnboardingCancelled;return o};function O(e){return{chooseProject:async n=>{if(e){const o=n.find(n=>n.id===e);if(!o)throw new ProjectNotInSessionAccount(e);return o}const o=await t.select({message:"Which Vendure Console Project is this?",options:[...n.map(e=>({label:e.name,value:e.id,hint:e.edition?`${e.edition} edition`:"no edition yet"})),{label:"Create a new Project",value:""}]});if(t.isCancel(o))throw new r.ConsoleOnboardingCancelled;return n.find(e=>e.id===o)},newProjectName:async()=>{if(e)throw new ProjectNotInSessionAccount(e);const n=await t.text({message:"Name for the new Vendure Console Project:",validate:e=>e.trim()?void 0:"A name is required"});if(t.isCancel(n))throw new r.ConsoleOnboardingCancelled;return n},report:e=>t.log.info(e),warn:e=>t.log.warn(e)}}class ProjectNotInSessionAccount extends Error{constructor(e){super(),this.projectId=e}}async function T(e,n){const o=await(0,r.readViewerAccount)(e).catch(()=>{}),t=`--console-project ${n.projectId}`;return o?`${t} is not a Project of the account "${o.name}" that this session uses.`:`${t} is not one of your Vendure Console Projects.`}async function R(e,n){if(n instanceof ProjectNotInSessionAccount)return T(e,n);if(!(0,r.isPermissionDenied)(n))return;const o=await(0,r.readViewerAccount)(e).catch(()=>{});return o?`${V(n)} This session uses the Vendure Console account "${o.name}".`:V(n)}function V(e){return e instanceof Error?e.message:String(e)}
1
+ "use strict";var e=this&&this.__createBinding||(Object.create?function(e,n,o,t){void 0===t&&(t=o);var r=Object.getOwnPropertyDescriptor(n,o);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(e,t,r)}:function(e,n,o,t){void 0===t&&(t=o),e[t]=n[o]}),n=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),o=this&&this.__importStar||function(){var o=function(e){return o=Object.getOwnPropertyNames||function(e){var n=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[n.length]=o);return n},o(e)};return function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var i=o(t),s=0;s<i.length;s++)"default"!==i[s]&&e(r,t,i[s]);return n(r,t),r}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveRegistryToken=g,exports.startConsoleOnboarding=f,exports.isInteractive=p,exports.finishConsoleOnboarding=h,exports.registryTokenStep=$;const t=o(require("@clack/prompts")),r=require("@vendure-platform/console-auth"),i=require("node:fs"),s=require("node:path"),c=require("./docs-url"),a=require("./next-steps"),u=require("./plugin-registry"),l=require("./registry");class ProjectHasNoPlan extends Error{constructor(){super(...arguments),this.name="ProjectHasNoPlan"}}const d="Continuing without a Vendure Console Project.";function g(e,n){return e?{token:e,projectId:void 0}:{token:n.registryToken,projectId:n.registryProjectId}}async function f(e){const n=Boolean(e.projectId);let o;try{o=(0,r.resolveConsoleOrigins)(process.env)}catch(e){if(n)throw e;return void t.log.warn(`${V(e)} Continuing without Vendure Console.`)}const i=await k(o,e.interactive,e.projectId);if(!i)return;let s=i;const c=new r.ConsoleApi({apiOrigin:o.apiOrigin,getAccessToken:()=>s,refreshAccessToken:async()=>{s=await(0,r.refreshStoredConsoleToken)({...o,failedAccessToken:s})}});let l;for(;!l;)try{l=await(0,r.selectConsoleProject)({api:c,interaction:T(e.projectId),origins:o,projectRoot:e.projectDir})}catch(i){if(i instanceof r.ConsoleOnboardingCancelled)throw i;if(i instanceof r.ConsoleApiError&&"auth.organization_missing"===i.code)throw new r.ConsoleCustomerAccountRequired(`Your Vendure Console login is not scoped to a Customer Account. Run "${(0,r.accountLoginCommand)(o.apiOrigin)}", then run this command again.`);const a=await S(c,i);if(!a){if(n)throw i;return void t.log.warn(`${V(i)} ${d}`)}const u=()=>new Error(`${a} No files were created. To use another account, run "${(0,r.accountLoginCommand)(o.apiOrigin)}", then run this command again.`);if(!e.interactive){if(n)throw u();return void t.log.warn(`${a} ${d}`)}t.log.warn(a);const l=await t.confirm({message:"Sign in with another Vendure Console account?",initialValue:!0});if(t.isCancel(l))throw new r.ConsoleOnboardingCancelled;if(!l){if(n)throw u();return void t.log.warn(d)}const g=await A(o,n);if(!g)return;s=g}const{project:g,edition:f}=l,p=(0,r.projectSubscriptionUrl)(o.appOrigin,g.id);if(!f)throw(0,a.printNextSteps)([],[`Choose a plan: ${p}`,`Then retry this command and select ${g.name}.`]),new ProjectHasNoPlan(`The Console Project ${g.name} is kept. No files or Registry Access Token were created.`);return{project:{id:g.id,name:g.name},edition:f&&(0,u.isCapabilityProfileName)(f)?f:void 0,subscriptionUrl:p,finish:async n=>({...await b(c,g,n,o,e.projectDir),subscriptionUrl:p})}}function p(){return Boolean(process.stdin.isTTY&&process.stdout.isTTY)}async function h(e,n,o){if(!e)return(0,l.offlineRegistry)();try{const r=await e.finish(n);return r.registryAccessDenied&&!o&&t.log.warn(`Your Console role cannot issue Registry Access Tokens for ${e.project.name}, so this project cannot install Platform packages yet. Ask a member with the Credential manager, Project admin or Admin role to create an access token on the Registry access page of ${e.project.name} in Vendure Console. ${(0,l.setRegistryTokenStep)(r.registryUrl)}`),r}catch(o){return t.log.warn(`Could not finish linking to Vendure Console. ${V(o)} ${v(n)}`),{...(0,l.offlineRegistry)(),subscriptionUrl:e.subscriptionUrl}}}const w=[3,8],C=`${c.PLATFORM_DOCS_URL}/getting-started/registry-access`;function m(e){for(let n=e;;n=(0,s.dirname)(n)){try{const e=JSON.parse((0,i.readFileSync)((0,s.join)(n,"node_modules","@vendure","cli","package.json"),"utf8"));if("string"==typeof e.version)return e.version}catch{}if((0,s.dirname)(n)===n)return}}function y(e){const n=m(e);if(void 0===n)return;const[o,t]=n.split(".").map(e=>Number.parseInt(e,10)),[r,i]=w;return o>r||o===r&&t>=i?void 0:n}function j(e,n){const[o,t]=w;return`@vendure/cli ${n} has no "console link" command. Update it to ${o}.${t} or later and run "npx vendure console link" in ${e}, or create a Registry Access Token for the Project in Vendure Console and add it to ${(0,s.join)(e,".npmrc")} by hand. Steps: ${C}`}function v(e){const n=y(e);return void 0===n?`Run "npx vendure console link" in ${e} to finish.`:j(e,n)}function $(e){const n=y(e);return void 0===n?"Run `vendure console link` to link this project and get a Registry Access Token.":j(e,n)}async function b(e,n,o,i,s){await(0,r.writeProjectLink)({api:e,interaction:T(),projectRoot:o,projectId:n.id,origins:i}),t.log.success(`Linked ${o} to ${n.name}.`);const c=await(0,r.acquireRegistryAccess)({api:e,projectId:n.id,projectRoot:s,interaction:{confirmRotate:async e=>{const n=await t.confirm({message:`Replace the Registry Access Token "${e}"? Whatever installs with the current one stops working.`,initialValue:!1});if(t.isCancel(n))throw new r.ConsoleOnboardingCancelled;return n},report:e=>t.log.info(e),warn:e=>t.log.warn(e)},defaultRegistryUrl:(0,r.registryUrlFor)(i.apiOrigin),defaultScope:l.REGISTRY_SCOPE});if("permission-denied"===c.reason)return{registryUrl:c.registryUrl,scope:c.scope,registryAccessDenied:!0};if("npm-login"===c.fallback){const e=`npm login --auth-type=web --registry=${(0,l.registryLoginUrl)(c.registryUrl)}`,n="rotation-declined"===c.reason?"You kept the existing Registry Access Token. Its secret was not written to this directory.":"The named Registry Access Token is inactive. Replace it in Vendure Console.";return t.log.warn(`${n} Log in to the registry before installing:\n ${e}`),{registryUrl:c.registryUrl,scope:c.scope,registryLogin:e}}return{registryUrl:c.registryUrl,scope:c.scope,registryToken:c.token,registryProjectId:n.id}}async function k(e,n,o){let i;try{i=await(0,r.resolveStoredConsoleToken)(e)}catch(e){if(o)throw e;return void t.log.warn(`${V(e)} Continuing without Vendure Console.`)}if(i)return(0,r.scopeStoredConsoleSession)({...e,accessToken:i,...n?{chooseCustomerAccount:O}:{}});if(!n)return;const s=await t.confirm({message:"Sign in to Vendure Console to set this project up?",initialValue:!0});if(t.isCancel(s))throw new r.ConsoleOnboardingCancelled;if(s)return P(e,n,Boolean(o));if(o)throw new Error(`--console-project ${o} needs a Vendure Console sign-in. No files were created. Run this command again and sign in.`)}async function A(e,n){try{const o=await(0,r.otherConsoleCustomerAccounts)(e);if(0===o.length)return P(e,!0,n);const i=1===o.length?o[0]:await O(o),s=await(0,r.switchConsoleCustomerAccount)(i,e);return t.log.info(`This session now uses the Vendure Console account "${i.name}".`),s}catch(e){if(n||e instanceof r.ConsoleOnboardingCancelled)throw e;return void t.log.warn(`${V(e)} ${d}`)}}async function P(e,n,o=!1){const i=t.spinner();i.start("Waiting for you to finish signing in to Vendure Console");let s=!0;const c=e=>{s&&i.stop(e),s=!1};try{const o=await(0,r.loginAndStoreConsoleToken)({...e,onDeviceAuthorization:e=>t.log.info(`Open ${e.verificationUriComplete}. Check that the browser shows the code ${e.userCode}, then approve the sign-in.`),...n?{chooseCustomerAccount:e=>(c("Signed in to Vendure Console."),O(e))}:{}});return c("Signed in to Vendure Console."),o}catch(e){if(e instanceof r.ConsoleCustomerAccountRequired||e instanceof r.ConsoleOnboardingCancelled)throw c("Signed in to Vendure Console."),e;if(c("Could not sign in to Vendure Console."),o)throw e;return void t.log.warn(`${V(e)} Continuing without it.`)}}const O=async e=>{const n=await t.select({message:"Which Vendure Console Customer Account is this project for?",options:e.map(e=>({label:e.name,value:e.customerAccountId,hint:`Account identifier ${e.customerAccountId}`}))});if(t.isCancel(n))throw new r.ConsoleOnboardingCancelled;const o=e.find(e=>e.customerAccountId===n);if(!o)throw new r.ConsoleOnboardingCancelled;return o};function T(e){return{chooseProject:async n=>{if(e){const o=n.find(n=>n.id===e);if(!o)throw new ProjectNotInSessionAccount(e);return o}const o=await t.select({message:"Which Vendure Console Project is this?",options:[...n.map(e=>({label:e.name,value:e.id,hint:e.edition?`${e.edition} edition`:"no edition yet"})),{label:"Create a new Project",value:""}]});if(t.isCancel(o))throw new r.ConsoleOnboardingCancelled;return n.find(e=>e.id===o)},newProjectName:async()=>{if(e)throw new ProjectNotInSessionAccount(e);const n=await t.text({message:"Name for the new Vendure Console Project:",validate:e=>e.trim()?void 0:"A name is required"});if(t.isCancel(n))throw new r.ConsoleOnboardingCancelled;return n},report:e=>t.log.info(e),warn:e=>t.log.warn(e)}}class ProjectNotInSessionAccount extends Error{constructor(e){super(),this.projectId=e}}async function R(e,n){const o=await(0,r.readViewerAccount)(e).catch(()=>{}),t=`--console-project ${n.projectId}`;return o?`${t} is not a Project of the account "${o.name}" that this session uses.`:`${t} is not one of your Vendure Console Projects.`}async function S(e,n){if(n instanceof ProjectNotInSessionAccount)return R(e,n);if(!(0,r.isPermissionDenied)(n))return;const o=await(0,r.readViewerAccount)(e).catch(()=>{});return o?`${V(n)} This session uses the Vendure Console account "${o.name}".`:V(n)}function V(e){return e instanceof Error?e.message:String(e)}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Print commands that the user must paste into a terminal.
3
+ *
4
+ * A `@clack/prompts` note draws a `│` bar and indentation around each line.
5
+ * A copy of the note includes them, so the shell cannot run the pasted text.
6
+ * This function writes the heading, the commands, and the notes as plain
7
+ * lines with no prefix. The bar of the surrounding prompt flow is not part
8
+ * of these lines.
9
+ *
10
+ * @param commands Lines to paste into a shell. Comment lines that start with `#` are allowed.
11
+ * @param notes Lines for the reader that are not commands, such as URLs. They follow after a blank line.
12
+ */
13
+ export declare function printNextSteps(commands: ReadonlyArray<string>, notes?: ReadonlyArray<string>): void;
@@ -0,0 +1 @@
1
+ "use strict";function t(t,e=[]){const s=["","Next steps:",...[t,e].filter(t=>t.length>0).flatMap(t=>["",...t]),""];process.stdout.write(s.join("\n")+"\n")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.printNextSteps=t;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.STOREFRONT_CAPABILITY=exports.ALWAYS_ACTIVE_KEYS=exports.INTERNAL_PACKAGES=exports.pluginRegistry=void 0,exports.getPlugin=n,exports.isCapabilityProfileName=t,exports.resolveProfilePluginKeys=s,exports.resolvePluginKeysForGrants=p,exports.grantsIncludeStorefront=r;const o=require("@vendure-platform/plugin-meta"),e={"license-guard":{optionsType:{exportName:"LicenseGuardOptions"},platformOptionsBlock:"licenseGuard: {\n token: process.env.VENDURE_PLATFORM_LICENSE_TOKEN,\n }"},"org-accounts":{optionsType:{exportName:"OrgAccountsPluginOptions"},platformOptionsBlock:""},"org-hierarchy":{optionsType:{exportName:"OrgHierarchyOptions"},platformOptionsBlock:""},"advanced-search":{optionsType:{exportName:"PortableAdvancedSearchOptions"},platformOptionsBlock:""},"search-engine-database":{platformOptionsBlock:""},"search-engine-typesense":{optionsType:{exportName:"TypesenseEngineOptions",packageName:"@vendure-platform/advanced-search"},platformOptionsBlock:""},"search-analytics-clickhouse":{optionsType:{exportName:"SearchAnalyticsPluginOptions"},platformOptionsBlock:""},"workflow-engine":{optionsType:{exportName:"WorkflowEngineOptions"},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 // Managed Postgres usually requires SSL; the local\n // docker-compose container does not speak it at all.\n // WORKFLOW_ENGINE_SSL decides, so running with\n // APP_ENV=production against a local database (migrations,\n // CI, a production-shaped smoke test) does not fail on a\n // connection the environment cannot make.\n ssl: process.env.WORKFLOW_ENGINE_SSL === 'true',\n },\n systemDatabaseSchemaName: process.env.WORKFLOW_ENGINE_SCHEMA ?? 'dbos',\n applicationVersion: 'v1',\n }"},"approval-workflows":{optionsType:{exportName:"ApprovalPluginOptions"},platformOptionsBlock:""},"approval-advanced":{platformOptionsBlock:""},"global-search":{optionsType:{exportName:"GlobalSearchPluginOptions"},platformOptionsBlock:""},"entity-access-control":{optionsType:{exportName:"EntityAccessControlPluginOptions"},platformOptionsBlock:""},"tax-id-management":{optionsType:{exportName:"TaxIdManagementPluginOptions"},platformOptionsBlock:""},"shopping-list":{optionsType:{exportName:"ShoppingListPluginInitOptions"},platformOptionsBlock:""},"shopping-list-managed":{platformOptionsBlock:""},"quick-order":{optionsType:{exportName:"QuickOrderPluginInitOptions"},platformOptionsBlock:""},"reorder-from-history":{optionsType:{exportName:"ReorderPluginInitOptions"},platformOptionsBlock:""},"store-credit":{optionsType:{exportName:"StoreCreditPluginOptions"},platformOptionsBlock:""},"gift-cards":{optionsType:{exportName:"GiftCardsPluginOptions"},platformOptionsBlock:"giftCards: {\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":{optionsType:{exportName:"QuoteRequestsPluginOptions"},platformOptionsBlock:""},"quote-negotiation":{optionsType:{exportName:"QuoteNegotiationOptions"},platformOptionsBlock:""},"shared-carts":{platformOptionsBlock:""},"price-rules":{optionsType:{exportName:"PriceRulePluginInitOptions"},platformOptionsBlock:""},"price-rules-advanced":{optionsType:{exportName:"PriceRulesAdvancedOptions"},platformOptionsBlock:""},"packaging-units":{optionsType:{exportName:"PackagingUnitsPluginInitOptions"},platformOptionsBlock:""},"product-types":{optionsType:{exportName:"ProductTypesPluginOptions"},platformOptionsBlock:""},"content-versioning":{optionsType:{exportName:"PluginInitOptions"},platformOptionsBlock:""},configurator:{optionsType:{exportName:"ConfiguratorPluginOptions"},platformOptionsBlock:""},sso:{optionsType:{exportName:"SsoPluginOptions"},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 }"},"sso-federation":{optionsType:{exportName:"SsoFederationOptions"},platformOptionsBlock:"ssoFederation: {\n providers: process.env.SAML_IDP_SSO_URL\n ? [\n {\n type: 'saml',\n id: 'saml',\n displayName: 'SAML SSO',\n // `||`, not `??`: `.env` ships the key with\n // an empty value, which `??` would accept as a\n // configured entity ID.\n spEntityId:\n process.env.SAML_SP_ENTITY_ID ||\n `${process.env.VENDURE_HOST ?? 'http://localhost:3500'}/sso/metadata/saml`,\n idpEntityId: process.env.SAML_IDP_ENTITY_ID ?? '',\n idpCertificate: process.env.SAML_IDP_CERTIFICATE ?? '',\n idpSsoUrl: process.env.SAML_IDP_SSO_URL,\n },\n ]\n : [],\n }"},"audit-trail":{optionsType:{exportName:"PluginInitOptions"},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';"]},"audit-governance":{optionsType:{exportName:"AuditGovernanceOptions"},platformOptionsBlock:"auditGovernance: {\n exportStrategy: new JsonFileExportStrategy({\n outputDir: path.join(__dirname, '../static/audit-exports'),\n }),\n }",platformImports:["import { JsonFileExportStrategy } from '@vendure-platform/audit-governance';"]},punchout:{optionsType:{exportName:"PunchoutPluginOptions"},platformOptionsBlock:"punchout: {\n storefrontUrl: process.env.PUNCHOUT_STOREFRONT_URL ?? 'http://localhost:3001',\n }"}};function n(o){return exports.pluginRegistry.find(e=>e.key===o)}function t(e){return o.EDITION_ORDER.includes(e)}function s(e){return p(o.CAPABILITY_PROFILES[e])}function p(e){var t;const s=new Set(exports.ALWAYS_ACTIVE_KEYS);for(const p of(0,o.resolveComposableModules)([...(0,o.searchCompositionGrants)(new Set(e))])){const e=null===(t=(0,o.getModuleManifest)(p))||void 0===t?void 0:t.plugin;e&&n(e)&&s.add(e)}return exports.pluginRegistry.filter(o=>s.has(o.key)).map(o=>o.key)}function r(o){return o.includes(exports.STOREFRONT_CAPABILITY)}exports.pluginRegistry=o.PLUGIN_META.map(o=>({...o,...e[o.key]})),exports.INTERNAL_PACKAGES=[{packageName:"@vendure-platform/platform"},{packageName:"@vendure-platform/integration"},{packageName:"@vendure-platform/demo-center"}],exports.ALWAYS_ACTIVE_KEYS=exports.pluginRegistry.filter(o=>"core"===o.tier||"core-requires-config"===o.tier).map(o=>o.key),exports.STOREFRONT_CAPABILITY="storefront.b2b";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.STOREFRONT_CAPABILITY=exports.ALWAYS_ACTIVE_KEYS=exports.INTERNAL_PACKAGES=exports.pluginRegistry=void 0,exports.getPlugin=n,exports.isCapabilityProfileName=t,exports.resolveProfilePluginKeys=s,exports.resolvePluginKeysForGrants=p,exports.grantsIncludeStorefront=r;const o=require("@vendure-platform/plugin-meta"),e={"license-guard":{optionsType:{exportName:"LicenseGuardOptions"},platformOptionsBlock:"licenseGuard: {\n token: process.env.VENDURE_PLATFORM_LICENSE_TOKEN,\n }"},"org-accounts":{optionsType:{exportName:"OrgAccountsPluginOptions"},platformOptionsBlock:""},"org-hierarchy":{optionsType:{exportName:"OrgHierarchyOptions"},platformOptionsBlock:""},"advanced-search":{optionsType:{exportName:"PortableAdvancedSearchOptions"},platformOptionsBlock:""},"search-engine-database":{platformOptionsBlock:""},"search-engine-typesense":{optionsType:{exportName:"TypesenseEngineOptions",packageName:"@vendure-platform/advanced-search"},platformOptionsBlock:""},"search-analytics-clickhouse":{optionsType:{exportName:"SearchAnalyticsPluginOptions"},platformOptionsBlock:""},"workflow-engine":{optionsType:{exportName:"WorkflowEngineOptions"},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 // Managed Postgres usually requires SSL; the local\n // docker-compose container does not speak it at all.\n // WORKFLOW_ENGINE_SSL decides, so running with\n // APP_ENV=production against a local database (migrations,\n // CI, a production-shaped smoke test) does not fail on a\n // connection the environment cannot make.\n ssl: process.env.WORKFLOW_ENGINE_SSL === 'true',\n },\n systemDatabaseSchemaName: process.env.WORKFLOW_ENGINE_SCHEMA ?? 'dbos',\n applicationVersion: 'v1',\n }"},"approval-workflows":{optionsType:{exportName:"ApprovalPluginOptions"},platformOptionsBlock:""},"approval-advanced":{platformOptionsBlock:""},"global-search":{optionsType:{exportName:"GlobalSearchPluginOptions"},platformOptionsBlock:""},"entity-access-control":{optionsType:{exportName:"EntityAccessControlPluginOptions"},platformOptionsBlock:""},"tax-id-management":{optionsType:{exportName:"TaxIdManagementPluginOptions"},platformOptionsBlock:""},"shopping-list":{optionsType:{exportName:"ShoppingListPluginInitOptions"},platformOptionsBlock:""},"shopping-list-managed":{platformOptionsBlock:""},"quick-order":{optionsType:{exportName:"QuickOrderPluginInitOptions"},platformOptionsBlock:""},"reorder-from-history":{optionsType:{exportName:"ReorderPluginInitOptions"},platformOptionsBlock:""},"store-credit":{optionsType:{exportName:"StoreCreditPluginOptions"},platformOptionsBlock:""},"gift-cards":{optionsType:{exportName:"GiftCardsPluginOptions"},platformOptionsBlock:"giftCards: {\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":{optionsType:{exportName:"QuoteRequestsPluginOptions"},platformOptionsBlock:""},"quote-negotiation":{optionsType:{exportName:"QuoteNegotiationOptions"},platformOptionsBlock:""},"shared-carts":{platformOptionsBlock:""},"price-rules":{optionsType:{exportName:"PriceRulePluginInitOptions"},platformOptionsBlock:""},"price-rules-advanced":{optionsType:{exportName:"PriceRulesAdvancedOptions"},platformOptionsBlock:""},"packaging-units":{optionsType:{exportName:"PackagingUnitsPluginInitOptions"},platformOptionsBlock:""},"product-types":{optionsType:{exportName:"ProductTypesPluginOptions"},platformOptionsBlock:""},"content-versioning":{optionsType:{exportName:"PluginInitOptions"},platformOptionsBlock:""},configurator:{optionsType:{exportName:"ConfiguratorPluginOptions"},platformOptionsBlock:""},sso:{optionsType:{exportName:"SsoPluginOptions"},platformOptionsBlock:"sso: {\n vendureHost: process.env.VENDURE_HOST ?? 'http://localhost:3500',\n providers: process.env.GOOGLE_CLIENT_ID && process.env.GOOGLE_CLIENT_SECRET\n ? [\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 : [],\n }"},"sso-federation":{optionsType:{exportName:"SsoFederationOptions"},platformOptionsBlock:"ssoFederation: {\n providers: process.env.SAML_IDP_SSO_URL\n ? [\n {\n type: 'saml',\n id: 'saml',\n displayName: 'SAML SSO',\n // `||`, not `??`: `.env` ships the key with\n // an empty value, which `??` would accept as a\n // configured entity ID.\n spEntityId:\n process.env.SAML_SP_ENTITY_ID ||\n `${process.env.VENDURE_HOST ?? 'http://localhost:3500'}/sso/metadata/saml`,\n idpEntityId: process.env.SAML_IDP_ENTITY_ID ?? '',\n idpCertificate: process.env.SAML_IDP_CERTIFICATE ?? '',\n idpSsoUrl: process.env.SAML_IDP_SSO_URL,\n },\n ]\n : [],\n }"},"audit-trail":{optionsType:{exportName:"PluginInitOptions"},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';"]},"audit-governance":{optionsType:{exportName:"AuditGovernanceOptions"},platformOptionsBlock:"auditGovernance: {\n exportStrategy: new JsonFileExportStrategy({\n outputDir: path.join(__dirname, '../static/audit-exports'),\n }),\n }",platformImports:["import { JsonFileExportStrategy } from '@vendure-platform/audit-governance';"]},punchout:{optionsType:{exportName:"PunchoutPluginOptions"},platformOptionsBlock:"punchout: {\n storefrontUrl: process.env.PUNCHOUT_STOREFRONT_URL ?? 'http://localhost:3001',\n }"}};function n(o){return exports.pluginRegistry.find(e=>e.key===o)}function t(e){return o.EDITION_ORDER.includes(e)}function s(e){return p(o.CAPABILITY_PROFILES[e])}function p(e){var t;const s=new Set(exports.ALWAYS_ACTIVE_KEYS);for(const p of(0,o.resolveComposableModules)([...(0,o.searchCompositionGrants)(new Set(e))])){const e=null===(t=(0,o.getModuleManifest)(p))||void 0===t?void 0:t.plugin;e&&n(e)&&s.add(e)}return exports.pluginRegistry.filter(o=>s.has(o.key)).map(o=>o.key)}function r(o){return o.includes(exports.STOREFRONT_CAPABILITY)}exports.pluginRegistry=o.PLUGIN_META.map(o=>({...o,...e[o.key]})),exports.INTERNAL_PACKAGES=[{packageName:"@vendure-platform/platform"},{packageName:"@vendure-platform/integration"},{packageName:"@vendure-platform/demo-center"}],exports.ALWAYS_ACTIVE_KEYS=exports.pluginRegistry.filter(o=>"core"===o.tier||"core-requires-config"===o.tier).map(o=>o.key),exports.STOREFRONT_CAPABILITY="storefront.b2b";
@@ -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 i=r(n),a=0;a<i.length;a++)"default"!==i[a]&&e(o,n,i[a]);return t(o,n),o}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.scaffoldStorefrontOnly=l;const n=r(require("@clack/prompts")),o=r(require("fs-extra")),i=r(require("path")),a=require("./project-dir"),s=require("./scaffold-shared"),c=require("./storefront-copier");async function l(e){const{projectName:t,apiUrl:r,scenario:l,capabilities:u,packageManager:d,skipInstall:p,skipGit:f,dryRun:y}=e,_=i.resolve(process.cwd(),t);if(await(0,a.assertProjectDirAvailable)(_),y){const e=[`Project: ${t} \u2192 ${_}`,"","Mode: storefront-only",`Scenario: ${l}`,`API URL: ${null!=r?r:"(use default localhost)"}`,`Capabilities: ${void 0===u?"not set. The storefront does not build until NEXT_PUBLIC_VENDURE_CAPABILITIES is set.":u.join(",")||"(none)"}`,`Package manager: ${d}`,"Install deps: "+(p?"no":"yes"),"Git init: "+(f?"no":"yes")].join("\n");return n.note(e,"Dry run"),void n.outro("Dry run complete \u2014 no files written.")}const v=n.spinner();v.start("Creating project directory..."),await o.ensureDir(_),v.message("Copying storefront..."),await(0,c.copyStorefront)(_,{mode:"storefront-only",scenario:l,apiUrl:r,capabilities:u,packageName:t,packageManager:d});const b=!!p||await(0,s.installDependencies)(_,d,v);f||await(0,s.initRepository)(_,!1,void 0,v),v.stop(b?`Project "${t}" created successfully!`:`Project "${t}" created, but dependency installation failed.`);const P=[`cd ${t}`,...b?[]:[`${d} install`],r?`# .env.local already points VENDURE_SHOP_API_URL at ${r}`:"# Edit .env.local and set VENDURE_SHOP_API_URL to your Vendure server",...void 0===u?["# Edit .env.local and set NEXT_PUBLIC_VENDURE_CAPABILITIES to your server's capability keys.","# The storefront does not build until it is set."]:[],"npm"===d?"npm run dev":`${d} run dev`,"","Storefront: http://localhost:${STOREFRONT_PORT:-3001}"].join("\n");n.note(P,"Next steps"),n.outro(b?"Happy building!":"Install dependencies to continue.")}
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 i=r(n),a=0;a<i.length;a++)"default"!==i[a]&&e(o,n,i[a]);return t(o,n),o}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.scaffoldStorefrontOnly=u;const n=r(require("@clack/prompts")),o=r(require("fs-extra")),i=r(require("path")),a=require("./next-steps"),s=require("./project-dir"),c=require("./scaffold-shared"),l=require("./storefront-copier");async function u(e){const{projectName:t,apiUrl:r,scenario:u,capabilities:d,packageManager:p,skipInstall:f,skipGit:y,dryRun:_}=e,v=i.resolve(process.cwd(),t);if(await(0,s.assertProjectDirAvailable)(v),_){const e=[`Project: ${t} \u2192 ${v}`,"","Mode: storefront-only",`Scenario: ${u}`,`API URL: ${null!=r?r:"(use default localhost)"}`,`Capabilities: ${void 0===d?"not set. The storefront does not build until NEXT_PUBLIC_VENDURE_CAPABILITIES is set.":d.join(",")||"(none)"}`,`Package manager: ${p}`,"Install deps: "+(f?"no":"yes"),"Git init: "+(y?"no":"yes")].join("\n");return n.note(e,"Dry run"),void n.outro("Dry run complete \u2014 no files written.")}const b=n.spinner();b.start("Creating project directory..."),await o.ensureDir(v),b.message("Copying storefront..."),await(0,l.copyStorefront)(v,{mode:"storefront-only",scenario:u,apiUrl:r,capabilities:d,packageName:t,packageManager:p});const P=!!f||await(0,c.installDependencies)(v,p,b);y||await(0,c.initRepository)(v,!1,void 0,b),b.stop(P?`Project "${t}" created successfully!`:`Project "${t}" created, but dependency installation failed.`);const g=[`cd ${t}`,...P?[]:[`${p} install`],r?`# .env.local already points VENDURE_SHOP_API_URL at ${r}`:"# Edit .env.local and set VENDURE_SHOP_API_URL to your Vendure server",...void 0===d?["# Edit .env.local and set NEXT_PUBLIC_VENDURE_CAPABILITIES to your server's capability keys.","# The storefront does not build until it is set."]:[],"npm"===p?"npm run dev":`${p} run dev`];(0,a.printNextSteps)(g,["Storefront: http://localhost:${STOREFRONT_PORT:-3001}"]),n.outro(P?"Happy building!":"Install dependencies to continue.")}
@@ -1 +1 @@
1
- "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=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(o){if(o&&o.__esModule)return o;var n={};if(null!=o)for(var s=r(o),i=0;i<s.length;i++)"default"!==s[i]&&e(n,o,s[i]);return t(n,o),n}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.SHARED_FILES=exports.TEMPLATE_FILES=void 0,exports.scaffold=j,exports.consoleLinkRoot=h;const o=r(require("@clack/prompts")),n=require("@vendure-platform/console-auth"),s=require("@vendure-platform/plugin-meta"),i=r(require("fs-extra")),a=r(require("path")),p=require("./console-onboarding"),c=require("./env-file"),l=require("./plugin-registry"),u=require("./pnpm-build-approvals"),d=require("./project-dir"),m=require("./scaffold-shared"),g=require("./storefront-copier"),f=require("./template-renderer"),v=require("./types");async function j(e){var t;const{projectName:r,companyName:j,profile:y,includeStorefront:E,includeDemoData:k=!0,createGithubRepo:_,githubOrg:A,packageManager:S=v.DEFAULT_PACKAGE_MANAGER,skipInstall:T,skipGit:$,dryRun:D,registryToken:P,licenseToken:x,consoleOnboarding:I}=e,L=a.resolve(process.cwd(),r),O=(0,l.resolveProfilePluginKeys)(y);o.log.info(`Edition: ${y}`);const R=l.ALWAYS_ACTIVE_KEYS.map(e=>(0,l.getPlugin)(e).displayName);R.length>0&&o.log.info(`Always-on core plugins: ${R.join(", ")}`);const F=[...s.CAPABILITY_PROFILES[y]],M=(0,l.grantsIncludeStorefront)(F),N=E&&M;if(E&&!M&&o.log.warn(`The ${y} profile does not grant "${l.STOREFRONT_CAPABILITY}", so no storefront was emitted. The storefront ships with Scale and Enterprise.`),await(0,d.assertProjectDirAvailable)(L),D){const e=O.map(e=>(0,l.getPlugin)(e).displayName),t=[`Project: ${r} \u2192 ${L}`,`Edition: ${y}`,"","Files to generate:",[...[...exports.TEMPLATE_FILES.map(e=>e.output),...exports.SHARED_FILES].map(e=>` ${e}`),..."pnpm"===S?[" pnpm-workspace.yaml"]:[]].join("\n"),(k?[" server/src/demo-data/products.csv"," server/src/demo-data/initial-data.json"," server/src/demo-data/images/"]:[" server/src/initial-data/products.csv"," server/src/initial-data/initial-data.json"]).join("\n")," server/src/migrations/ (empty dir)","",`Plugins (${e.length}):`,` ${e.join(", ")}`,"","Demo data: "+(k?"yes":"no"),"Storefront: "+(N?"yes":M?"no":`no (needs ${l.STOREFRONT_CAPABILITY})`),`Install deps with ${S}: ${T?"no":"yes"}`,"Git init: "+($?"no":"yes"),"GitHub repo: "+(_?"yes":"no")].join("\n");return o.note(t,"Dry run"),void o.outro("Dry run complete \u2014 no files written.")}const q="pnpm"===S||"npm"===S?(0,u.getBuildApprovals)(await i.readJson(a.join(__dirname,"..","dist","assets","build-dependencies.json")),y,k,N):[],C=o.spinner();C.start("Creating project directory..."),await i.ensureDir(L),C.stop("Created the project directory.");const G=await(0,p.finishConsoleOnboarding)(I,h(L),P),{context:B,hbs:H}=(0,f.buildTemplateContext)(r,j,N,{licenseToken:x,profile:y,includeDemoData:k,packageManager:S,buildApprovals:q});C.start("Generating server files...");const J=a.join(L,"server"),U=a.join(J,"src");await i.ensureDir(U);for(const{template:e,output:t}of exports.TEMPLATE_FILES){const r=(0,f.getTemplatePath)(e),o=(0,f.renderTemplate)(r,B,H),n=a.join(L,t);await i.ensureDir(a.dirname(n)),".env"===t?await(0,c.writeEnvFile)(n,o):await i.writeFile(n,o)}await i.writeFile(a.join(U,"platform-edition.ts"),(0,s.renderEditionConfig)(y));const Y=(0,p.resolveRegistryToken)(P,G);if(await(0,n.ensureRegistryNpmrc)(L,{registryUrl:G.registryUrl,scope:G.scope,token:Y.token,projectId:Y.projectId,hoist:"npm"!==S}),"pnpm"===S){const e=["server",...N?["storefront"]:[]];await i.writeFile(a.join(L,"pnpm-workspace.yaml"),`packages:\n${e.map(e=>` - ${e}`).join("\n")}\nallowBuilds:\n${q.map(e=>` ${JSON.stringify(e)}: true`).join("\n")}\npublicHoistPattern:\n - "@vendure-platform/*"\nminimumReleaseAgeExclude:\n - "@vendure-platform/*"\n - "@vendure/*"\noverrides:\n "@vendure/mcp-sdk": ${JSON.stringify(B.mcpSdkVersion)}\n`)}if(k?(C.message("Copying demo data..."),await b(U)):await w(U),await i.ensureDir(a.join(U,"migrations")),N){C.message("Copying storefront...");try{await(0,g.copyStorefront)(L,{mode:"full-project",scenario:"customer",packageName:`${r}-storefront`,capabilities:F,registryUrl:G.registryUrl,registryToken:Y.token,registryProjectId:Y.projectId,packageManager:S})}catch(e){C.stop("Storefront copy failed.");const t=e instanceof Error?e.message:String(e);o.log.warn(`Storefront copy failed \u2014 you can set it up manually later. (${t})`),C.start("Continuing...")}}const K=!!T||await(0,m.installDependencies)(L,S,C,{...G,accessDenied:G.registryAccessDenied&&!Y.token});$||await(0,m.initRepository)(L,_,A,C),C.stop(K?`Project "${r}" created successfully!`:`Project "${r}" created, but dependency installation failed.`);const V="npm"===S?"npm run":`${S} run`,Z=[`cd ${r}`,null!==(t=G.registryLogin)&&void 0!==t?t:"",!K||T?`${S} install`:"",await i.pathExists(a.join(h(L),".vendure","project.json"))?"":"cd server && npx vendure console link && cd ..","docker compose up -d",`${V} populate`,"cd server && npx vendure dev",N?`In a second terminal: cd storefront && ${V} dev`:"","","Dashboard: http://localhost:3500/dashboard",N?"Storefront: http://localhost:3001":""].filter(Boolean).join("\n");o.note(Z,"Next steps"),o.outro(K?"Happy building!":"Install dependencies to continue.")}function h(e){return a.join(e,"server")}function y(){const e=[a.join(__dirname,"..","..","scenario-default","assets"),a.join(__dirname,"assets","demo-data")];for(const t of e)if(i.pathExistsSync(t))return t;throw new Error("Could not find scenario-default assets. Tried:\n"+e.map(e=>` - ${e}`).join("\n"))}async function b(e){const t=y(),r=a.join(e,"demo-data");await i.ensureDir(r),await i.copy(a.join(t,"initial-data.json"),a.join(r,"initial-data.json")),await i.copy(a.join(t,"products.csv"),a.join(r,"products.csv")),await i.copy(a.join(t,"images"),a.join(r,"images"))}async function w(e){const t=y(),r=await i.readJson(a.join(t,"initial-data.json")),o=a.join(e,"initial-data");await i.ensureDir(o),await i.writeJson(a.join(o,"initial-data.json"),{defaultLanguage:r.defaultLanguage,defaultZone:r.defaultZone,countries:r.countries,taxRates:r.taxRates,shippingMethods:r.shippingMethods,paymentMethods:r.paymentMethods,collections:[]},{spaces:4});const[n]=(await i.readFile(a.join(t,"products.csv"),"utf8")).split("\n");await i.writeFile(a.join(o,"products.csv"),`${n}\n`)}exports.TEMPLATE_FILES=[{template:"vendure-config.ts.hbs",output:"server/src/vendure-config.ts"},{template:"populate.ts.hbs",output:"server/src/populate.ts"},{template:"migrate.ts.hbs",output:"server/src/migrate.ts"},{template:"custom-populate.ts.hbs",output:"server/src/custom-populate.ts"},{template:"load-env.ts.hbs",output:"server/src/load-env.ts"},{template:"index.ts.hbs",output:"server/src/index.ts"},{template:"index-worker.ts.hbs",output:"server/src/index-worker.ts"},{template:"server-package.json.hbs",output:"server/package.json"},{template:"root-package.json.hbs",output:"package.json"},{template:"env.hbs",output:".env"},{template:"docker-compose.yml.hbs",output:"docker-compose.yml"},{template:"AGENTS.md.hbs",output:"AGENTS.md"},{template:"README.md.hbs",output:"README.md"},{template:"tsconfig.root.json.hbs",output:"tsconfig.json"},{template:"tsconfig.server.json.hbs",output:"server/tsconfig.json"},{template:"vite.config.mts.hbs",output:"server/vite.config.mts"},{template:"tsconfig.dashboard.json.hbs",output:"server/tsconfig.dashboard.json"},{template:"environment.d.ts.hbs",output:"server/src/environment.d.ts"},{template:"gitignore.hbs",output:".gitignore"},{template:"dockerignore.hbs",output:".dockerignore"},{template:"Dockerfile.hbs",output:"Dockerfile"},{template:"bunfig.toml.hbs",output:"bunfig.toml"}],exports.SHARED_FILES=["server/src/platform-edition.ts",".npmrc"];
1
+ "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=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(o){if(o&&o.__esModule)return o;var n={};if(null!=o)for(var s=r(o),i=0;i<s.length;i++)"default"!==s[i]&&e(n,o,s[i]);return t(n,o),n}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.SHARED_FILES=exports.TEMPLATE_FILES=void 0,exports.scaffold=h,exports.consoleLinkRoot=y;const o=r(require("@clack/prompts")),n=require("@vendure-platform/console-auth"),s=require("@vendure-platform/plugin-meta"),i=r(require("fs-extra")),a=r(require("path")),p=require("./console-onboarding"),c=require("./env-file"),l=require("./next-steps"),u=require("./plugin-registry"),d=require("./pnpm-build-approvals"),m=require("./project-dir"),g=require("./scaffold-shared"),f=require("./storefront-copier"),v=require("./template-renderer"),j=require("./types");async function h(e){var t;const{projectName:r,companyName:h,profile:b,includeStorefront:k,includeDemoData:S=!0,createGithubRepo:_,githubOrg:A,packageManager:T=j.DEFAULT_PACKAGE_MANAGER,skipInstall:$,skipGit:D,dryRun:P,registryToken:x,licenseToken:I,consoleOnboarding:L}=e,O=a.resolve(process.cwd(),r),R=(0,u.resolveProfilePluginKeys)(b);o.log.info(`Edition: ${b}`);const F=u.ALWAYS_ACTIVE_KEYS.map(e=>(0,u.getPlugin)(e).displayName);F.length>0&&o.log.info(`Always-on core plugins: ${F.join(", ")}`);const M=[...s.CAPABILITY_PROFILES[b]],q=(0,u.grantsIncludeStorefront)(M),N=k&&q;if(k&&!q&&o.log.warn(`The ${b} profile does not grant "${u.STOREFRONT_CAPABILITY}", so no storefront was emitted. The storefront ships with Scale and Enterprise.`),await(0,m.assertProjectDirAvailable)(O),P){const e=R.map(e=>(0,u.getPlugin)(e).displayName),t=[`Project: ${r} \u2192 ${O}`,`Edition: ${b}`,"","Files to generate:",[...[...exports.TEMPLATE_FILES.map(e=>e.output),...exports.SHARED_FILES].map(e=>` ${e}`),..."pnpm"===T?[" pnpm-workspace.yaml"]:[]].join("\n"),(S?[" server/src/demo-data/products.csv"," server/src/demo-data/initial-data.json"," server/src/demo-data/images/"]:[" server/src/initial-data/products.csv"," server/src/initial-data/initial-data.json"]).join("\n")," server/src/migrations/ (empty dir)","",`Plugins (${e.length}):`,` ${e.join(", ")}`,"","Demo data: "+(S?"yes":"no"),"Storefront: "+(N?"yes":q?"no":`no (needs ${u.STOREFRONT_CAPABILITY})`),`Install deps with ${T}: ${$?"no":"yes"}`,"Git init: "+(D?"no":"yes"),"GitHub repo: "+(_?"yes":"no")].join("\n");return o.note(t,"Dry run"),void o.outro("Dry run complete \u2014 no files written.")}const C="pnpm"===T||"npm"===T?(0,d.getBuildApprovals)(await i.readJson(a.join(__dirname,"..","dist","assets","build-dependencies.json")),b,S,N):[],G=o.spinner();G.start("Creating project directory..."),await i.ensureDir(O),G.stop("Created the project directory.");const B=await(0,p.finishConsoleOnboarding)(L,y(O),x),{context:H,hbs:J}=(0,v.buildTemplateContext)(r,h,N,{licenseToken:I,profile:b,includeDemoData:S,packageManager:T,buildApprovals:C});G.start("Generating server files...");const U=a.join(O,"server"),Y=a.join(U,"src");await i.ensureDir(Y);for(const{template:e,output:t}of exports.TEMPLATE_FILES){const r=(0,v.getTemplatePath)(e),o=(0,v.renderTemplate)(r,H,J),n=a.join(O,t);await i.ensureDir(a.dirname(n)),".env"===t?await(0,c.writeEnvFile)(n,o):await i.writeFile(n,o)}await i.writeFile(a.join(Y,"platform-edition.ts"),(0,s.renderEditionConfig)(b));const K=(0,p.resolveRegistryToken)(x,B);if(await(0,n.ensureRegistryNpmrc)(O,{registryUrl:B.registryUrl,scope:B.scope,token:K.token,projectId:K.projectId,hoist:"npm"!==T}),"pnpm"===T){const e=["server",...N?["storefront"]:[]];await i.writeFile(a.join(O,"pnpm-workspace.yaml"),`packages:\n${e.map(e=>` - ${e}`).join("\n")}\nallowBuilds:\n${C.map(e=>` ${JSON.stringify(e)}: true`).join("\n")}\npublicHoistPattern:\n - "@vendure-platform/*"\nminimumReleaseAgeExclude:\n - "@vendure-platform/*"\n - "@vendure/*"\noverrides:\n "@vendure/mcp-sdk": ${JSON.stringify(H.mcpSdkVersion)}\n`)}if(S?(G.message("Copying demo data..."),await w(Y)):await E(Y),await i.ensureDir(a.join(Y,"migrations")),N){G.message("Copying storefront...");try{await(0,f.copyStorefront)(O,{mode:"full-project",scenario:"customer",packageName:`${r}-storefront`,capabilities:M,registryUrl:B.registryUrl,registryToken:K.token,registryProjectId:K.projectId,packageManager:T})}catch(e){G.stop("Storefront copy failed.");const t=e instanceof Error?e.message:String(e);o.log.warn(`Storefront copy failed \u2014 you can set it up manually later. (${t})`),G.start("Continuing...")}}const V=!!$||await(0,g.installDependencies)(O,T,G,{...B,accessDenied:B.registryAccessDenied&&!K.token});D||await(0,g.initRepository)(O,_,A,G),G.stop(V?`Project "${r}" created successfully!`:`Project "${r}" created, but dependency installation failed.`);const Z="npm"===T?"npm run":`${T} run`,W=[`cd ${r}`,null!==(t=B.registryLogin)&&void 0!==t?t:"",!V||$?`${T} install`:"",await i.pathExists(a.join(y(O),".vendure","project.json"))?"":"cd server && npx vendure console link && cd ..","docker compose up -d",`${Z} populate`,"cd server && npx vendure dev",N?`# In a second terminal: cd storefront && ${Z} dev`:""].filter(Boolean),z=["Dashboard: http://localhost:3500/dashboard",N?"Storefront: http://localhost:3001":""].filter(Boolean);(0,l.printNextSteps)(W,z),o.outro(V?"Happy building!":"Install dependencies to continue.")}function y(e){return a.join(e,"server")}function b(){const e=[a.join(__dirname,"..","..","scenario-default","assets"),a.join(__dirname,"assets","demo-data")];for(const t of e)if(i.pathExistsSync(t))return t;throw new Error("Could not find scenario-default assets. Tried:\n"+e.map(e=>` - ${e}`).join("\n"))}async function w(e){const t=b(),r=a.join(e,"demo-data");await i.ensureDir(r),await i.copy(a.join(t,"initial-data.json"),a.join(r,"initial-data.json")),await i.copy(a.join(t,"products.csv"),a.join(r,"products.csv")),await i.copy(a.join(t,"images"),a.join(r,"images"))}async function E(e){const t=b(),r=await i.readJson(a.join(t,"initial-data.json")),o=a.join(e,"initial-data");await i.ensureDir(o),await i.writeJson(a.join(o,"initial-data.json"),{defaultLanguage:r.defaultLanguage,defaultZone:r.defaultZone,countries:r.countries,taxRates:r.taxRates,shippingMethods:r.shippingMethods,paymentMethods:r.paymentMethods,collections:[]},{spaces:4});const[n]=(await i.readFile(a.join(t,"products.csv"),"utf8")).split("\n");await i.writeFile(a.join(o,"products.csv"),`${n}\n`)}exports.TEMPLATE_FILES=[{template:"vendure-config.ts.hbs",output:"server/src/vendure-config.ts"},{template:"populate.ts.hbs",output:"server/src/populate.ts"},{template:"migrate.ts.hbs",output:"server/src/migrate.ts"},{template:"custom-populate.ts.hbs",output:"server/src/custom-populate.ts"},{template:"load-env.ts.hbs",output:"server/src/load-env.ts"},{template:"index.ts.hbs",output:"server/src/index.ts"},{template:"index-worker.ts.hbs",output:"server/src/index-worker.ts"},{template:"server-package.json.hbs",output:"server/package.json"},{template:"root-package.json.hbs",output:"package.json"},{template:"env.hbs",output:".env"},{template:"docker-compose.yml.hbs",output:"docker-compose.yml"},{template:"AGENTS.md.hbs",output:"AGENTS.md"},{template:"README.md.hbs",output:"README.md"},{template:"tsconfig.root.json.hbs",output:"tsconfig.json"},{template:"tsconfig.server.json.hbs",output:"server/tsconfig.json"},{template:"vite.config.mts.hbs",output:"server/vite.config.mts"},{template:"tsconfig.dashboard.json.hbs",output:"server/tsconfig.dashboard.json"},{template:"environment.d.ts.hbs",output:"server/src/environment.d.ts"},{template:"gitignore.hbs",output:".gitignore"},{template:"dockerignore.hbs",output:".dockerignore"},{template:"Dockerfile.hbs",output:"Dockerfile"},{template:"bunfig.toml.hbs",output:"bunfig.toml"}],exports.SHARED_FILES=["server/src/platform-edition.ts",".npmrc"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure-platform/create",
3
- "version": "1.0.2-nightly.202611020955.154.1",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to scaffold a Vendure demo project with Vendure Platform plugins",
5
5
  "vendurePlugin": {
6
6
  "slug": "create",
@@ -50,8 +50,8 @@
50
50
  "dependencies": {
51
51
  "@clack/prompts": "^0.10.0",
52
52
  "@vendure/cli": "~3.8.0",
53
- "@vendure-platform/console-auth": "1.0.2-nightly.202611020955.154.1",
54
- "@vendure-platform/plugin-meta": "1.0.2-nightly.202611020955.154.1",
53
+ "@vendure-platform/console-auth": "1.0.2",
54
+ "@vendure-platform/plugin-meta": "1.0.2",
55
55
  "commander": "^13.1.0",
56
56
  "fs-extra": "^11.3.0",
57
57
  "handlebars": "^4.7.8",