@shopify/cli 3.66.1 → 3.67.0

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 (109) hide show
  1. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +3 -7
  2. package/dist/assets/hydrogen/starter/CHANGELOG.md +105 -0
  3. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +79 -0
  4. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -9
  5. package/dist/assets/hydrogen/starter/app/lib/fragments.ts +6 -0
  6. package/dist/assets/hydrogen/starter/app/lib/search.ts +2 -2
  7. package/dist/assets/hydrogen/starter/app/root.tsx +5 -3
  8. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +14 -0
  9. package/dist/assets/hydrogen/starter/package.json +5 -5
  10. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +5 -0
  11. package/dist/{chunk-NLZ5VWA3.js → chunk-2A4NZDBL.js} +25 -8
  12. package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
  13. package/dist/{chunk-MQCE7QDZ.js → chunk-33B37WAX.js} +148 -39
  14. package/dist/{chunk-N766LDXO.js → chunk-56GJOU7U.js} +29 -5
  15. package/dist/{chunk-V7KJMBZN.js → chunk-66CAOMYB.js} +3 -3
  16. package/dist/{chunk-HJEKQ36N.js → chunk-6JA2FWML.js} +3 -3
  17. package/dist/{chunk-SVKRBSOG.js → chunk-6RGB2VE4.js} +2 -2
  18. package/dist/{chunk-YK3ZIR2O.js → chunk-7QTS6ZWN.js} +30 -90
  19. package/dist/{chunk-2J35X4IR.js → chunk-7TTWOW5T.js} +2 -2
  20. package/dist/{chunk-E5YZHXRF.js → chunk-7VVKCVPD.js} +4 -4
  21. package/dist/{chunk-GO4OU2FC.js → chunk-A3ZREYWQ.js} +4 -4
  22. package/dist/{chunk-SQPCZKX5.js → chunk-ALNQ5ENK.js} +4 -4
  23. package/dist/{chunk-6DU4BL5F.js → chunk-BFQFJ7IZ.js} +28 -17
  24. package/dist/{chunk-BPHTUL36.js → chunk-BLVJTR72.js} +2 -2
  25. package/dist/{chunk-PP4BSPLO.js → chunk-BPTBCC7K.js} +9 -4
  26. package/dist/{chunk-AUKMJHJ7.js → chunk-CLB5CEKJ.js} +3 -3
  27. package/dist/{chunk-ICYU4JKU.js → chunk-DFWU3T6T.js} +3 -3
  28. package/dist/{chunk-SCWJ5DTS.js → chunk-DQX6APZ7.js} +3 -3
  29. package/dist/{chunk-JRECCYJM.js → chunk-DZU2Z54P.js} +75 -75
  30. package/dist/{chunk-63OWMCSM.js → chunk-ETEUMLXG.js} +4 -4
  31. package/dist/{chunk-EARW2CGK.js → chunk-FCZFZS5D.js} +5 -5
  32. package/dist/{chunk-47L545SZ.js → chunk-HDUCYBDJ.js} +5 -5
  33. package/dist/{chunk-ECD63UWY.js → chunk-HH6CL4YY.js} +4 -4
  34. package/dist/{chunk-3DZ2Z5F7.js → chunk-NTY5IMTJ.js} +3 -3
  35. package/dist/{chunk-F6BSBHJJ.js → chunk-NZDBLGNM.js} +4 -3
  36. package/dist/{chunk-AV2DDU5Q.js → chunk-RG3ZCNYG.js} +2 -2
  37. package/dist/{chunk-VZ6ZDQBM.js → chunk-ROVTA24T.js} +3 -3
  38. package/dist/{chunk-ZTHIONMB.js → chunk-RZAH6V72.js} +3 -3
  39. package/dist/{chunk-74LQ7ZSW.js → chunk-SMD4PKJ4.js} +2 -2
  40. package/dist/{chunk-ONFQ5XTX.js → chunk-T5OZRID5.js} +7 -7
  41. package/dist/{chunk-44VQQ5IT.js → chunk-TLEQTJSL.js} +3 -3
  42. package/dist/{chunk-GXXQT43J.js → chunk-UNEY6YDL.js} +2 -2
  43. package/dist/{chunk-P2HC3CUV.js → chunk-UYB6BQ5X.js} +4 -4
  44. package/dist/{chunk-O5XKA735.js → chunk-V4VZ6RSC.js} +2 -2
  45. package/dist/{chunk-QPYUGCEP.js → chunk-V7FFSXYT.js} +24 -11
  46. package/dist/{chunk-3ZYNGWAE.js → chunk-W44P3FXC.js} +2 -2
  47. package/dist/{chunk-PCGPDW4N.js → chunk-X5O6SBDL.js} +3 -3
  48. package/dist/{chunk-OGVAYZHB.js → chunk-ZEKYC6RR.js} +5 -5
  49. package/dist/cli/commands/auth/logout.js +13 -12
  50. package/dist/cli/commands/auth/logout.test.js +14 -13
  51. package/dist/cli/commands/debug/command-flags.js +12 -11
  52. package/dist/cli/commands/demo/catalog.js +13 -12
  53. package/dist/cli/commands/demo/generate-file.js +13 -12
  54. package/dist/cli/commands/demo/index.js +13 -12
  55. package/dist/cli/commands/demo/print-ai-prompt.js +13 -12
  56. package/dist/cli/commands/docs/generate.js +12 -11
  57. package/dist/cli/commands/docs/generate.test.js +12 -11
  58. package/dist/cli/commands/help.js +12 -11
  59. package/dist/cli/commands/kitchen-sink/async.js +13 -12
  60. package/dist/cli/commands/kitchen-sink/async.test.js +13 -12
  61. package/dist/cli/commands/kitchen-sink/index.js +15 -14
  62. package/dist/cli/commands/kitchen-sink/index.test.js +15 -14
  63. package/dist/cli/commands/kitchen-sink/prompts.js +13 -12
  64. package/dist/cli/commands/kitchen-sink/prompts.test.js +13 -12
  65. package/dist/cli/commands/kitchen-sink/static.js +13 -12
  66. package/dist/cli/commands/kitchen-sink/static.test.js +13 -12
  67. package/dist/cli/commands/search.js +13 -12
  68. package/dist/cli/commands/upgrade.js +13 -12
  69. package/dist/cli/commands/version.js +13 -12
  70. package/dist/cli/commands/version.test.js +13 -12
  71. package/dist/cli/services/commands/search.js +5 -4
  72. package/dist/cli/services/commands/search.test.js +5 -4
  73. package/dist/cli/services/commands/version.js +6 -5
  74. package/dist/cli/services/commands/version.test.js +7 -6
  75. package/dist/cli/services/demo.js +5 -4
  76. package/dist/cli/services/demo.test.js +5 -4
  77. package/dist/cli/services/kitchen-sink/async.js +5 -4
  78. package/dist/cli/services/kitchen-sink/prompts.js +5 -4
  79. package/dist/cli/services/kitchen-sink/static.js +5 -4
  80. package/dist/cli/services/upgrade.js +6 -5
  81. package/dist/cli/services/upgrade.test.js +8 -7
  82. package/dist/configs/all.yml +3 -0
  83. package/dist/configs/recommended.yml +3 -0
  84. package/dist/{constants-C6OOAW2P.js → constants-TR6ABVLJ.js} +4 -2
  85. package/dist/{custom-oclif-loader-DXBW5MGT.js → custom-oclif-loader-GZT2PBX4.js} +5 -4
  86. package/dist/data/default_setting_values.json +56 -0
  87. package/dist/data/filters.json +34 -2
  88. package/dist/data/latest.json +1 -1
  89. package/dist/data/objects.json +1644 -6
  90. package/dist/data/section.json +23 -1
  91. package/dist/data/setting.json +411 -2
  92. package/dist/data/shopify_system_translations.json +17 -4
  93. package/dist/data/tags.json +37 -0
  94. package/dist/{error-handler-5G7W7NBW.js → error-handler-H2JO5MGI.js} +11 -10
  95. package/dist/hooks/postrun.js +9 -8
  96. package/dist/hooks/prerun.js +9 -8
  97. package/dist/index.js +4314 -1904
  98. package/dist/{lib-6LEA5PZ7.js → lib-4WCTNKJK.js} +2 -2
  99. package/dist/lib-PPXZBVZX.js +6 -0
  100. package/dist/{local-IRPCVBNP.js → local-PNRP6M3C.js} +5 -4
  101. package/dist/{morph-M726AOW6.js → morph-WDFBUXWF.js} +9 -9
  102. package/dist/{node-QK7Q2TRB.js → node-FRKV7HYW.js} +16 -15
  103. package/dist/{node-package-manager-3WV6USI6.js → node-package-manager-XKAH57SF.js} +6 -5
  104. package/dist/{system-N2OPVMOD.js → system-5YQPPSYJ.js} +7 -6
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/dist/{ui-GHKHPRP2.js → ui-TWN6LBOI.js} +5 -4
  107. package/dist/{workerd-KAYMO4VM.js → workerd-EK4JHLXE.js} +15 -14
  108. package/oclif.manifest.json +86 -88
  109. package/package.json +7 -7
@@ -202,13 +202,9 @@ module ShopifyCLI
202
202
 
203
203
  expected_session_cookie = "#{SESSION_COOKIE_NAME}=#{secure_session_id};"
204
204
 
205
- unless cookie_header.include?(expected_session_cookie)
206
- if cookie_header.include?(SESSION_COOKIE_NAME)
207
- cookie_header.sub!(SESSION_COOKIE_REGEXP, expected_session_cookie)
208
- else
209
- cookie_header << "; " unless cookie_header.empty?
210
- cookie_header << expected_session_cookie
211
- end
205
+ unless cookie_header.include?(SESSION_COOKIE_NAME)
206
+ cookie_header << "; " unless cookie_header.empty?
207
+ cookie_header << expected_session_cookie
212
208
  end
213
209
 
214
210
  cookie_header
@@ -1,5 +1,110 @@
1
1
  # skeleton
2
2
 
3
+ ## 2024.7.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`39f8f8fd`](https://github.com/Shopify/hydrogen/commit/39f8f8fd42766d02c6e98f8090608e641db9f002)]:
8
+ - @shopify/hydrogen@2024.7.7
9
+
10
+ ## 2024.7.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`d0ff37a9`](https://github.com/Shopify/hydrogen/commit/d0ff37a995bb64598930f8aa53f2612f3b1ea476)]:
15
+ - @shopify/hydrogen@2024.7.6
16
+
17
+ ## 2024.7.6
18
+
19
+ ### Patch Changes
20
+
21
+ - Update Shopify CLI and cli-kit dependencies to 3.66.1 ([#2512](https://github.com/Shopify/hydrogen/pull/2512)) by [@frandiox](https://github.com/frandiox)
22
+
23
+ - createCartHandler supplies updateGiftCardCodes method ([#2298](https://github.com/Shopify/hydrogen/pull/2298)) by [@wizardlyhel](https://github.com/wizardlyhel)
24
+
25
+ - Fix menu links in side panel not working on mobile devices ([#2450](https://github.com/Shopify/hydrogen/pull/2450)) by [@wizardlyhel](https://github.com/wizardlyhel)
26
+
27
+ ```diff
28
+ // /app/components/Header.tsx
29
+
30
+ export function HeaderMenu({
31
+ menu,
32
+ primaryDomainUrl,
33
+ viewport,
34
+ publicStoreDomain,
35
+ }: {
36
+ menu: HeaderProps['header']['menu'];
37
+ primaryDomainUrl: HeaderProps['header']['shop']['primaryDomain']['url'];
38
+ viewport: Viewport;
39
+ publicStoreDomain: HeaderProps['publicStoreDomain'];
40
+ }) {
41
+ const className = `header-menu-${viewport}`;
42
+ + const {close} = useAside();
43
+
44
+ - function closeAside(event: React.MouseEvent<HTMLAnchorElement>) {
45
+ - if (viewport === 'mobile') {
46
+ - event.preventDefault();
47
+ - window.location.href = event.currentTarget.href;
48
+ - }
49
+ - }
50
+
51
+ return (
52
+ <nav className={className} role="navigation">
53
+ {viewport === 'mobile' && (
54
+ <NavLink
55
+ end
56
+ - onClick={closeAside}
57
+ + onClick={close}
58
+ prefetch="intent"
59
+ style={activeLinkStyle}
60
+ to="/"
61
+ >
62
+ Home
63
+ </NavLink>
64
+ )}
65
+ {(menu || FALLBACK_HEADER_MENU).items.map((item) => {
66
+ if (!item.url) return null;
67
+
68
+ // if the url is internal, we strip the domain
69
+ const url =
70
+ item.url.includes('myshopify.com') ||
71
+ item.url.includes(publicStoreDomain) ||
72
+ item.url.includes(primaryDomainUrl)
73
+ ? new URL(item.url).pathname
74
+ : item.url;
75
+ return (
76
+ <NavLink
77
+ className="header-menu-item"
78
+ end
79
+ key={item.id}
80
+ - onClick={closeAside}
81
+ + onClick={close}
82
+ prefetch="intent"
83
+ style={activeLinkStyle}
84
+ to={url}
85
+ >
86
+ {item.title}
87
+ </NavLink>
88
+ );
89
+ })}
90
+ </nav>
91
+ );
92
+ }
93
+ ```
94
+
95
+ - Add localization support to consent privacy banner ([#2457](https://github.com/Shopify/hydrogen/pull/2457)) by [@juanpprieto](https://github.com/juanpprieto)
96
+
97
+ - Updated dependencies [[`d633e49a`](https://github.com/Shopify/hydrogen/commit/d633e49aff244a985c58ec77fc2796c9c1cd5df4), [`1b217cd6`](https://github.com/Shopify/hydrogen/commit/1b217cd68ffd5362d201d4bd225ec72e99713461), [`d929b561`](https://github.com/Shopify/hydrogen/commit/d929b5612ec28e53ec216844add33682f131aba7), [`664a09d5`](https://github.com/Shopify/hydrogen/commit/664a09d57ef5d3c67da947a4e8546527c01e37c4), [`0c1e511d`](https://github.com/Shopify/hydrogen/commit/0c1e511df72e9605534bb9c960e86d5c9a4bf2ea), [`eefa8203`](https://github.com/Shopify/hydrogen/commit/eefa820383fa93657ca214991f6099ce9268a4ee)]:
98
+ - @shopify/hydrogen@2024.7.5
99
+ - @shopify/remix-oxygen@2.0.7
100
+
101
+ ## 2024.7.5
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies [[`b0d3bc06`](https://github.com/Shopify/hydrogen/commit/b0d3bc0696d266fcfc4eb93d0a4adb9ccb56ade6)]:
106
+ - @shopify/hydrogen@2024.7.4
107
+
3
108
  ## 2024.7.4
4
109
 
5
110
  ### Patch Changes
@@ -1,6 +1,8 @@
1
1
  import type {CartApiQueryFragment} from 'storefrontapi.generated';
2
2
  import type {CartLayout} from '~/components/CartMain';
3
3
  import {CartForm, Money, type OptimisticCart} from '@shopify/hydrogen';
4
+ import { useRef } from 'react';
5
+ import { FetcherWithComponents } from '@remix-run/react';
4
6
 
5
7
  type CartSummaryProps = {
6
8
  cart: OptimisticCart<CartApiQueryFragment | null>;
@@ -25,6 +27,7 @@ export function CartSummary({cart, layout}: CartSummaryProps) {
25
27
  </dd>
26
28
  </dl>
27
29
  <CartDiscounts discountCodes={cart.discountCodes} />
30
+ <CartGiftCard giftCardCodes={cart.appliedGiftCards} />
28
31
  <CartCheckoutActions checkoutUrl={cart.checkoutUrl} />
29
32
  </div>
30
33
  );
@@ -99,3 +102,79 @@ function UpdateDiscountForm({
99
102
  </CartForm>
100
103
  );
101
104
  }
105
+
106
+ function CartGiftCard({
107
+ giftCardCodes,
108
+ }: {
109
+ giftCardCodes: CartApiQueryFragment['appliedGiftCards'] | undefined;
110
+ }) {
111
+ const appliedGiftCardCodes = useRef<string[]>([]);
112
+ const giftCardCodeInput = useRef<HTMLInputElement>(null);
113
+ const codes: string[] = giftCardCodes?.map(({lastCharacters}) => `***${lastCharacters}`) || [];
114
+
115
+ function saveAppliedCode(code: string) {
116
+ const formattedCode = code.replace(/\s/g, ''); // Remove spaces
117
+ if (!appliedGiftCardCodes.current.includes(formattedCode)) {
118
+ appliedGiftCardCodes.current.push(formattedCode);
119
+ }
120
+ giftCardCodeInput.current!.value = '';
121
+ }
122
+
123
+ function removeAppliedCode() {
124
+ appliedGiftCardCodes.current = [];
125
+ }
126
+
127
+ return (
128
+ <div>
129
+ {/* Have existing gift card applied, display it with a remove option */}
130
+ <dl hidden={!codes.length}>
131
+ <div>
132
+ <dt>Applied Gift Card(s)</dt>
133
+ <UpdateGiftCardForm>
134
+ <div className="cart-discount">
135
+ <code>{codes?.join(', ')}</code>
136
+ &nbsp;
137
+ <button onSubmit={() => removeAppliedCode}>Remove</button>
138
+ </div>
139
+ </UpdateGiftCardForm>
140
+ </div>
141
+ </dl>
142
+
143
+ {/* Show an input to apply a discount */}
144
+ <UpdateGiftCardForm giftCardCodes={appliedGiftCardCodes.current} saveAppliedCode={saveAppliedCode}>
145
+ <div>
146
+ <input type="text" name="giftCardCode" placeholder="Gift card code" ref={giftCardCodeInput} />
147
+ &nbsp;
148
+ <button type="submit">Apply</button>
149
+ </div>
150
+ </UpdateGiftCardForm>
151
+ </div>
152
+ );
153
+ }
154
+
155
+ function UpdateGiftCardForm({
156
+ giftCardCodes,
157
+ saveAppliedCode,
158
+ children,
159
+ }: {
160
+ giftCardCodes?: string[];
161
+ saveAppliedCode?: (code: string) => void;
162
+ removeAppliedCode?: () => void;
163
+ children: React.ReactNode;
164
+ }) {
165
+ return (
166
+ <CartForm
167
+ route="/cart"
168
+ action={CartForm.ACTIONS.GiftCardCodesUpdate}
169
+ inputs={{
170
+ giftCardCodes: giftCardCodes || [],
171
+ }}
172
+ >
173
+ {(fetcher: FetcherWithComponents<any>) => {
174
+ const code = fetcher.formData?.get('giftCardCode');
175
+ if (code) saveAppliedCode && saveAppliedCode(code as string);
176
+ return children;
177
+ }}
178
+ </CartForm>
179
+ );
180
+ }
@@ -48,20 +48,14 @@ export function HeaderMenu({
48
48
  publicStoreDomain: HeaderProps['publicStoreDomain'];
49
49
  }) {
50
50
  const className = `header-menu-${viewport}`;
51
-
52
- function closeAside(event: React.MouseEvent<HTMLAnchorElement>) {
53
- if (viewport === 'mobile') {
54
- event.preventDefault();
55
- window.location.href = event.currentTarget.href;
56
- }
57
- }
51
+ const {close} = useAside();
58
52
 
59
53
  return (
60
54
  <nav className={className} role="navigation">
61
55
  {viewport === 'mobile' && (
62
56
  <NavLink
63
57
  end
64
- onClick={closeAside}
58
+ onClick={close}
65
59
  prefetch="intent"
66
60
  style={activeLinkStyle}
67
61
  to="/"
@@ -84,7 +78,7 @@ export function HeaderMenu({
84
78
  className="header-menu-item"
85
79
  end
86
80
  key={item.id}
87
- onClick={closeAside}
81
+ onClick={close}
88
82
  prefetch="intent"
89
83
  style={activeLinkStyle}
90
84
  to={url}
@@ -108,6 +108,12 @@ export const CART_QUERY_FRAGMENT = `#graphql
108
108
  fragment CartApiQuery on Cart {
109
109
  updatedAt
110
110
  id
111
+ appliedGiftCards {
112
+ lastCharacters
113
+ amountUsed {
114
+ ...Money
115
+ }
116
+ }
111
117
  checkoutUrl
112
118
  totalQuantity
113
119
  buyerIdentity {
@@ -48,10 +48,10 @@ interface UrlWithTrackingParams {
48
48
 
49
49
  /**
50
50
  * A utility function that appends tracking parameters to a URL. Tracking parameters are
51
- * used internally by shopify to enhance search results and admin dashboards.
51
+ * used internally by Shopify to enhance search results and admin dashboards.
52
52
  * @example
53
53
  * ```ts
54
- * const url = 'www.example.com';
54
+ * const baseUrl = 'www.example.com';
55
55
  * const trackingParams = 'utm_source=shopify&utm_medium=shopify_app&utm_campaign=storefront';
56
56
  * const params = { foo: 'bar' };
57
57
  * const term = 'search term';
@@ -73,6 +73,10 @@ export async function loader(args: LoaderFunctionArgs) {
73
73
  consent: {
74
74
  checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN,
75
75
  storefrontAccessToken: env.PUBLIC_STOREFRONT_API_TOKEN,
76
+ withPrivacyBanner: true,
77
+ // localize the privacy banner
78
+ country: args.context.storefront.i18n.country,
79
+ language: args.context.storefront.i18n.language,
76
80
  },
77
81
  });
78
82
  }
@@ -94,9 +98,7 @@ async function loadCriticalData({context}: LoaderFunctionArgs) {
94
98
  // Add other queries here, so that they are loaded in parallel
95
99
  ]);
96
100
 
97
- return {
98
- header,
99
- };
101
+ return {header};
100
102
  }
101
103
 
102
104
  /**
@@ -48,6 +48,20 @@ export async function action({request, context}: ActionFunctionArgs) {
48
48
  result = await cart.updateDiscountCodes(discountCodes);
49
49
  break;
50
50
  }
51
+ case CartForm.ACTIONS.GiftCardCodesUpdate: {
52
+ const formGiftCardCode = inputs.giftCardCode;
53
+
54
+ // User inputted gift card code
55
+ const giftCardCodes = (
56
+ formGiftCardCode ? [formGiftCardCode] : []
57
+ ) as string[];
58
+
59
+ // Combine gift card codes already applied on cart
60
+ giftCardCodes.push(...inputs.giftCardCodes);
61
+
62
+ result = await cart.updateGiftCardCodes(giftCardCodes);
63
+ break;
64
+ }
51
65
  case CartForm.ACTIONS.BuyerIdentityUpdate: {
52
66
  result = await cart.updateBuyerIdentity({
53
67
  ...inputs.buyerIdentity,
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "2024.7.4",
5
+ "version": "2024.7.8",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -16,8 +16,8 @@
16
16
  "dependencies": {
17
17
  "@remix-run/react": "^2.10.1",
18
18
  "@remix-run/server-runtime": "^2.10.1",
19
- "@shopify/hydrogen": "2024.7.3",
20
- "@shopify/remix-oxygen": "^2.0.6",
19
+ "@shopify/hydrogen": "2024.7.7",
20
+ "@shopify/remix-oxygen": "^2.0.7",
21
21
  "graphql": "^16.6.0",
22
22
  "graphql-tag": "^2.12.6",
23
23
  "isbot": "^3.8.0",
@@ -28,9 +28,9 @@
28
28
  "@graphql-codegen/cli": "5.0.2",
29
29
  "@remix-run/dev": "^2.10.1",
30
30
  "@remix-run/eslint-config": "^2.10.1",
31
- "@shopify/cli": "3.65.1",
31
+ "@shopify/cli": "~3.66.1",
32
32
  "@shopify/hydrogen-codegen": "^0.3.1",
33
- "@shopify/mini-oxygen": "^3.0.4",
33
+ "@shopify/mini-oxygen": "^3.0.5",
34
34
  "@shopify/oxygen-workers-types": "^4.1.2",
35
35
  "@shopify/prettier-config": "^1.1.2",
36
36
  "@total-typescript/ts-reset": "^0.4.2",
@@ -72,6 +72,11 @@ export type CartApiQueryFragment = Pick<
72
72
  StorefrontAPI.Cart,
73
73
  'updatedAt' | 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
74
74
  > & {
75
+ appliedGiftCards: Array<
76
+ Pick<StorefrontAPI.AppliedGiftCard, 'lastCharacters'> & {
77
+ amountUsed: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
78
+ }
79
+ >;
75
80
  buyerIdentity: Pick<
76
81
  StorefrontAPI.CartBuyerIdentity,
77
82
  'countryCode' | 'email' | 'phone'
@@ -5,17 +5,21 @@ import {
5
5
  } from "./chunk-VSLR7ET4.js";
6
6
  import {
7
7
  getEnvironmentData,
8
- getSensitiveEnvironmentData
9
- } from "./chunk-PP4BSPLO.js";
8
+ getSensitiveEnvironmentData,
9
+ nonRandomUUID
10
+ } from "./chunk-BPTBCC7K.js";
10
11
  import {
11
12
  platformAndArch
12
- } from "./chunk-BPHTUL36.js";
13
+ } from "./chunk-BLVJTR72.js";
14
+ import {
15
+ runWithRateLimit
16
+ } from "./chunk-56GJOU7U.js";
13
17
  import {
14
18
  require_semver
15
19
  } from "./chunk-BYPQXSAL.js";
16
20
  import {
17
21
  CLI_KIT_VERSION
18
- } from "./chunk-2J35X4IR.js";
22
+ } from "./chunk-7TTWOW5T.js";
19
23
  import {
20
24
  AbortError,
21
25
  AbortSilentError,
@@ -49,13 +53,14 @@ import {
49
53
  spinFqdn,
50
54
  touchFile,
51
55
  useEmbeddedThemeCLI
52
- } from "./chunk-YK3ZIR2O.js";
56
+ } from "./chunk-7QTS6ZWN.js";
53
57
  import {
54
58
  envPaths,
55
59
  environmentVariables,
56
60
  pathConstants,
61
+ reportingRateLimit,
57
62
  systemEnvironmentVariables
58
- } from "./chunk-F6BSBHJJ.js";
63
+ } from "./chunk-NZDBLGNM.js";
59
64
  import {
60
65
  cwd,
61
66
  dirname,
@@ -42182,7 +42187,8 @@ function getIdentityTokenInformation() {
42182
42187
  if (!(!identityToken || !refreshToken))
42183
42188
  return {
42184
42189
  accessToken: identityToken,
42185
- refreshToken
42190
+ refreshToken,
42191
+ userId: nonRandomUUID(identityToken)
42186
42192
  };
42187
42193
  }
42188
42194
 
@@ -44097,6 +44103,17 @@ async function reportAnalyticsEvent(options) {
44097
44103
  let payload = await buildPayload(options);
44098
44104
  if (payload === void 0)
44099
44105
  return;
44106
+ let withinRateLimit = !1;
44107
+ if (await runWithRateLimit({
44108
+ key: "report-analytics-event",
44109
+ ...reportingRateLimit,
44110
+ task: async () => {
44111
+ withinRateLimit = !0;
44112
+ }
44113
+ }), !withinRateLimit) {
44114
+ outputDebug(outputContent`Skipping command analytics due to rate limiting, payload: ${outputToken.json(payload)}`);
44115
+ return;
44116
+ }
44100
44117
  let skipMonorailAnalytics = !alwaysLogAnalytics() && analyticsDisabled(), skipMetricAnalytics = !alwaysLogMetrics() && analyticsDisabled();
44101
44118
  (skipMonorailAnalytics || skipMetricAnalytics) && outputDebug(outputContent`Skipping command analytics, payload: ${outputToken.json(payload)}`);
44102
44119
  let doMonorail = async () => {
@@ -44223,4 +44240,4 @@ mime-types/index.js:
44223
44240
  * MIT Licensed
44224
44241
  *)
44225
44242
  */
44226
- //# sourceMappingURL=chunk-NLZ5VWA3.js.map
44243
+ //# sourceMappingURL=chunk-2A4NZDBL.js.map
@@ -205,5 +205,8 @@ var require_lib = __commonJS({
205
205
  which.sync = whichSync;
206
206
  }
207
207
  });
208
- export default require_lib();
209
- //# sourceMappingURL=lib-CPSRXLFM.js.map
208
+
209
+ export {
210
+ require_lib
211
+ };
212
+ //# sourceMappingURL=chunk-2HGYYNE5.js.map