@shopify/cli 3.66.1 → 3.67.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +3 -7
- package/dist/assets/hydrogen/starter/CHANGELOG.md +105 -0
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +79 -0
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -9
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +6 -0
- package/dist/assets/hydrogen/starter/app/lib/search.ts +2 -2
- package/dist/assets/hydrogen/starter/app/root.tsx +5 -3
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +14 -0
- package/dist/assets/hydrogen/starter/package.json +5 -5
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +5 -0
- package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
- package/dist/{chunk-SVKRBSOG.js → chunk-3N2XGNSD.js} +2 -2
- package/dist/{chunk-3DZ2Z5F7.js → chunk-3N6HMQXE.js} +3 -3
- package/dist/{chunk-74LQ7ZSW.js → chunk-3SR6OJSK.js} +2 -2
- package/dist/{chunk-AV2DDU5Q.js → chunk-4SSP6H2B.js} +2 -2
- package/dist/{chunk-E5YZHXRF.js → chunk-AGVZ7LKV.js} +4 -4
- package/dist/{chunk-P2HC3CUV.js → chunk-BDRKGBQM.js} +4 -4
- package/dist/{chunk-6DU4BL5F.js → chunk-BFQFJ7IZ.js} +28 -17
- package/dist/{chunk-PP4BSPLO.js → chunk-CGTFVNVW.js} +9 -4
- package/dist/{chunk-AUKMJHJ7.js → chunk-CLB5CEKJ.js} +3 -3
- package/dist/{chunk-BPHTUL36.js → chunk-CQXLJ74Q.js} +2 -2
- package/dist/{chunk-O5XKA735.js → chunk-CQXTRP7V.js} +2 -2
- package/dist/{chunk-VZ6ZDQBM.js → chunk-D3PVKA4S.js} +3 -3
- package/dist/{chunk-ECD63UWY.js → chunk-DOGPMXVD.js} +4 -4
- package/dist/{chunk-JRECCYJM.js → chunk-DZ3IUP66.js} +75 -75
- package/dist/{chunk-47L545SZ.js → chunk-ET3FXEGV.js} +5 -5
- package/dist/{chunk-44VQQ5IT.js → chunk-FFJ5GS2L.js} +3 -3
- package/dist/{chunk-ICYU4JKU.js → chunk-GBNYQAYW.js} +3 -3
- package/dist/{chunk-GO4OU2FC.js → chunk-IKY4YZKM.js} +4 -4
- package/dist/{chunk-N766LDXO.js → chunk-JNCUUFQ2.js} +29 -5
- package/dist/{chunk-MQCE7QDZ.js → chunk-L7BARKPN.js} +148 -39
- package/dist/{chunk-SCWJ5DTS.js → chunk-LE2SHHVG.js} +3 -3
- package/dist/{chunk-ZTHIONMB.js → chunk-N4C6AXY7.js} +3 -3
- package/dist/{chunk-GXXQT43J.js → chunk-NKKQGCMU.js} +2 -2
- package/dist/{chunk-F6BSBHJJ.js → chunk-NZDBLGNM.js} +4 -3
- package/dist/{chunk-3ZYNGWAE.js → chunk-OPHICISR.js} +2 -2
- package/dist/{chunk-NLZ5VWA3.js → chunk-PRP4S22K.js} +25 -8
- package/dist/{chunk-2J35X4IR.js → chunk-RRJXIWCI.js} +2 -2
- package/dist/{chunk-ONFQ5XTX.js → chunk-RX32UG2K.js} +7 -7
- package/dist/{chunk-EARW2CGK.js → chunk-SG2SU3OS.js} +5 -5
- package/dist/{chunk-63OWMCSM.js → chunk-TSKLJ4DZ.js} +4 -4
- package/dist/{chunk-SQPCZKX5.js → chunk-TVHQ7O3U.js} +4 -4
- package/dist/{chunk-V7KJMBZN.js → chunk-UK3DVACO.js} +3 -3
- package/dist/{chunk-YK3ZIR2O.js → chunk-W4K3OTNK.js} +30 -90
- package/dist/{chunk-QPYUGCEP.js → chunk-WOL7YMUX.js} +24 -11
- package/dist/{chunk-OGVAYZHB.js → chunk-WWCONB45.js} +5 -5
- package/dist/{chunk-HJEKQ36N.js → chunk-XHUGASG2.js} +3 -3
- package/dist/{chunk-PCGPDW4N.js → chunk-XLTHVJPQ.js} +3 -3
- package/dist/cli/commands/auth/logout.js +13 -12
- package/dist/cli/commands/auth/logout.test.js +14 -13
- package/dist/cli/commands/debug/command-flags.js +12 -11
- package/dist/cli/commands/demo/catalog.js +13 -12
- package/dist/cli/commands/demo/generate-file.js +13 -12
- package/dist/cli/commands/demo/index.js +13 -12
- package/dist/cli/commands/demo/print-ai-prompt.js +13 -12
- package/dist/cli/commands/docs/generate.js +12 -11
- package/dist/cli/commands/docs/generate.test.js +12 -11
- package/dist/cli/commands/help.js +12 -11
- package/dist/cli/commands/kitchen-sink/async.js +13 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +13 -12
- package/dist/cli/commands/kitchen-sink/index.js +15 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +15 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +13 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +13 -12
- package/dist/cli/commands/kitchen-sink/static.js +13 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +13 -12
- package/dist/cli/commands/search.js +13 -12
- package/dist/cli/commands/upgrade.js +13 -12
- package/dist/cli/commands/version.js +13 -12
- package/dist/cli/commands/version.test.js +13 -12
- package/dist/cli/services/commands/search.js +5 -4
- package/dist/cli/services/commands/search.test.js +5 -4
- package/dist/cli/services/commands/version.js +6 -5
- package/dist/cli/services/commands/version.test.js +7 -6
- package/dist/cli/services/demo.js +5 -4
- package/dist/cli/services/demo.test.js +5 -4
- package/dist/cli/services/kitchen-sink/async.js +5 -4
- package/dist/cli/services/kitchen-sink/prompts.js +5 -4
- package/dist/cli/services/kitchen-sink/static.js +5 -4
- package/dist/cli/services/upgrade.js +6 -5
- package/dist/cli/services/upgrade.test.js +8 -7
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/{constants-C6OOAW2P.js → constants-TR6ABVLJ.js} +4 -2
- package/dist/{custom-oclif-loader-DXBW5MGT.js → custom-oclif-loader-EPKORNJY.js} +5 -4
- package/dist/data/default_setting_values.json +56 -0
- package/dist/data/filters.json +34 -2
- package/dist/data/latest.json +1 -1
- package/dist/data/objects.json +1644 -6
- package/dist/data/section.json +23 -1
- package/dist/data/setting.json +411 -2
- package/dist/data/shopify_system_translations.json +17 -4
- package/dist/data/tags.json +37 -0
- package/dist/{error-handler-5G7W7NBW.js → error-handler-ZY662MJL.js} +11 -10
- package/dist/hooks/postrun.js +9 -8
- package/dist/hooks/prerun.js +9 -8
- package/dist/index.js +4326 -1911
- package/dist/{lib-6LEA5PZ7.js → lib-4WCTNKJK.js} +2 -2
- package/dist/lib-PPXZBVZX.js +6 -0
- package/dist/{local-IRPCVBNP.js → local-V2PIQZT7.js} +5 -4
- package/dist/{morph-M726AOW6.js → morph-WDFBUXWF.js} +9 -9
- package/dist/{node-QK7Q2TRB.js → node-I67G4HEQ.js} +16 -15
- package/dist/{node-package-manager-3WV6USI6.js → node-package-manager-FXUBXHFJ.js} +6 -5
- package/dist/{system-N2OPVMOD.js → system-DGKNYSEI.js} +7 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-GHKHPRP2.js → ui-TPFQMYT2.js} +5 -4
- package/dist/{workerd-KAYMO4VM.js → workerd-WCFQKTR2.js} +15 -14
- package/oclif.manifest.json +86 -88
- 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?(
|
|
206
|
-
|
|
207
|
-
|
|
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
|
+
|
|
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
|
+
|
|
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={
|
|
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={
|
|
81
|
+
onClick={close}
|
|
88
82
|
prefetch="intent"
|
|
89
83
|
style={activeLinkStyle}
|
|
90
84
|
to={url}
|
|
@@ -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
|
|
51
|
+
* used internally by Shopify to enhance search results and admin dashboards.
|
|
52
52
|
* @example
|
|
53
53
|
* ```ts
|
|
54
|
-
* const
|
|
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.
|
|
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.
|
|
20
|
-
"@shopify/remix-oxygen": "^2.0.
|
|
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.
|
|
31
|
+
"@shopify/cli": "~3.66.1",
|
|
32
32
|
"@shopify/hydrogen-codegen": "^0.3.1",
|
|
33
|
-
"@shopify/mini-oxygen": "^3.0.
|
|
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'
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
renderSuccess,
|
|
8
8
|
renderTable,
|
|
9
9
|
renderWarning
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W4K3OTNK.js";
|
|
11
11
|
import {
|
|
12
12
|
init_cjs_shims
|
|
13
13
|
} from "./chunk-POZ5MGPT.js";
|
|
@@ -185,4 +185,4 @@ async function staticService() {
|
|
|
185
185
|
export {
|
|
186
186
|
staticService
|
|
187
187
|
};
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
188
|
+
//# sourceMappingURL=chunk-3N2XGNSD.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
staticService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3N2XGNSD.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RX32UG2K.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-POZ5MGPT.js";
|
|
@@ -25,4 +25,4 @@ var KitchenSinkStatic = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
KitchenSinkStatic
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-3N6HMQXE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openURL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4K3OTNK.js";
|
|
4
4
|
import {
|
|
5
5
|
init_cjs_shims
|
|
6
6
|
} from "./chunk-POZ5MGPT.js";
|
|
@@ -15,4 +15,4 @@ async function searchService(query) {
|
|
|
15
15
|
export {
|
|
16
16
|
searchService
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-3SR6OJSK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderConcurrent,
|
|
3
3
|
renderTasks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W4K3OTNK.js";
|
|
5
5
|
import {
|
|
6
6
|
init_cjs_shims
|
|
7
7
|
} from "./chunk-POZ5MGPT.js";
|
|
@@ -43,4 +43,4 @@ async function asyncTasks() {
|
|
|
43
43
|
export {
|
|
44
44
|
asyncTasks
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-4SSP6H2B.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
demo
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OPHICISR.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RX32UG2K.js";
|
|
7
7
|
import {
|
|
8
8
|
outputInfo,
|
|
9
9
|
readFile,
|
|
10
10
|
renderAutocompletePrompt
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-W4K3OTNK.js";
|
|
12
12
|
import {
|
|
13
13
|
joinPath
|
|
14
14
|
} from "./chunk-T2GATXSP.js";
|
|
@@ -42,4 +42,4 @@ var Catalog = class extends base_command_default {
|
|
|
42
42
|
export {
|
|
43
43
|
Catalog
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-AGVZ7LKV.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3SR6OJSK.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RX32UG2K.js";
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BFQFJ7IZ.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM,
|
|
12
12
|
init_cjs_shims
|
|
@@ -45,4 +45,4 @@ var import_core = __toESM(require_lib(), 1), Search = class _Search extends base
|
|
|
45
45
|
export {
|
|
46
46
|
Search
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-BDRKGBQM.js.map
|
|
@@ -148256,15 +148256,15 @@ var require_hyperlinker = __commonJS({
|
|
|
148256
148256
|
}
|
|
148257
148257
|
});
|
|
148258
148258
|
|
|
148259
|
-
// ../../node_modules/.pnpm/supports-hyperlinks@
|
|
148259
|
+
// ../../node_modules/.pnpm/supports-hyperlinks@3.1.0/node_modules/supports-hyperlinks/index.js
|
|
148260
148260
|
var require_supports_hyperlinks = __commonJS({
|
|
148261
|
-
"../../node_modules/.pnpm/supports-hyperlinks@
|
|
148261
|
+
"../../node_modules/.pnpm/supports-hyperlinks@3.1.0/node_modules/supports-hyperlinks/index.js"(exports, module) {
|
|
148262
148262
|
"use strict";
|
|
148263
148263
|
init_cjs_shims();
|
|
148264
148264
|
var supportsColor = require_supports_color2(), hasFlag = require_has_flag();
|
|
148265
148265
|
function parseVersion(versionString) {
|
|
148266
148266
|
if (/^\d{3,4}$/.test(versionString)) {
|
|
148267
|
-
let m = /(\d{1,2})(\d{2})/.exec(versionString);
|
|
148267
|
+
let m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
|
|
148268
148268
|
return {
|
|
148269
148269
|
major: 0,
|
|
148270
148270
|
minor: parseInt(m[1], 10),
|
|
@@ -148279,18 +148279,30 @@ var require_supports_hyperlinks = __commonJS({
|
|
|
148279
148279
|
};
|
|
148280
148280
|
}
|
|
148281
148281
|
function supportsHyperlink(stream) {
|
|
148282
|
-
let {
|
|
148283
|
-
|
|
148284
|
-
|
|
148282
|
+
let {
|
|
148283
|
+
CI,
|
|
148284
|
+
FORCE_HYPERLINK,
|
|
148285
|
+
NETLIFY,
|
|
148286
|
+
TEAMCITY_VERSION,
|
|
148287
|
+
TERM_PROGRAM,
|
|
148288
|
+
TERM_PROGRAM_VERSION,
|
|
148289
|
+
VTE_VERSION
|
|
148290
|
+
} = process.env;
|
|
148291
|
+
if (FORCE_HYPERLINK)
|
|
148292
|
+
return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
|
|
148285
148293
|
if (hasFlag("no-hyperlink") || hasFlag("no-hyperlinks") || hasFlag("hyperlink=false") || hasFlag("hyperlink=never"))
|
|
148286
148294
|
return !1;
|
|
148287
|
-
if (hasFlag("hyperlink=true") || hasFlag("hyperlink=always") ||
|
|
148295
|
+
if (hasFlag("hyperlink=true") || hasFlag("hyperlink=always") || NETLIFY)
|
|
148288
148296
|
return !0;
|
|
148289
|
-
if (!supportsColor.supportsColor(stream) || stream && !stream.isTTY
|
|
148297
|
+
if (!supportsColor.supportsColor(stream) || stream && !stream.isTTY)
|
|
148290
148298
|
return !1;
|
|
148291
|
-
if ("
|
|
148292
|
-
|
|
148293
|
-
|
|
148299
|
+
if ("WT_SESSION" in process.env)
|
|
148300
|
+
return !0;
|
|
148301
|
+
if (process.platform === "win32" || CI || TEAMCITY_VERSION)
|
|
148302
|
+
return !1;
|
|
148303
|
+
if (TERM_PROGRAM) {
|
|
148304
|
+
let version = parseVersion(TERM_PROGRAM_VERSION || "");
|
|
148305
|
+
switch (TERM_PROGRAM) {
|
|
148294
148306
|
case "iTerm.app":
|
|
148295
148307
|
return version.major === 3 ? version.minor >= 1 : version.major > 3;
|
|
148296
148308
|
case "WezTerm":
|
|
@@ -148299,10 +148311,10 @@ var require_supports_hyperlinks = __commonJS({
|
|
|
148299
148311
|
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
|
148300
148312
|
}
|
|
148301
148313
|
}
|
|
148302
|
-
if (
|
|
148303
|
-
if (
|
|
148314
|
+
if (VTE_VERSION) {
|
|
148315
|
+
if (VTE_VERSION === "0.50.0")
|
|
148304
148316
|
return !1;
|
|
148305
|
-
let version = parseVersion(
|
|
148317
|
+
let version = parseVersion(VTE_VERSION);
|
|
148306
148318
|
return version.major > 0 || version.minor >= 50;
|
|
148307
148319
|
}
|
|
148308
148320
|
return !1;
|
|
@@ -156383,10 +156395,9 @@ var require_lib2 = __commonJS({
|
|
|
156383
156395
|
});
|
|
156384
156396
|
|
|
156385
156397
|
export {
|
|
156386
|
-
|
|
156398
|
+
require_supports_hyperlinks,
|
|
156387
156399
|
require_source,
|
|
156388
156400
|
require_cross_spawn,
|
|
156389
|
-
require_supports_hyperlinks,
|
|
156390
156401
|
require_lib2 as require_lib
|
|
156391
156402
|
};
|
|
156392
156403
|
/*! Bundled license information:
|
|
@@ -156416,4 +156427,4 @@ ejs/lib/ejs.js:
|
|
|
156416
156427
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
156417
156428
|
*)
|
|
156418
156429
|
*/
|
|
156419
|
-
//# sourceMappingURL=chunk-
|
|
156430
|
+
//# sourceMappingURL=chunk-BFQFJ7IZ.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
platformAndArch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CQXLJ74Q.js";
|
|
4
4
|
import {
|
|
5
5
|
getPackageManager,
|
|
6
6
|
packageManagerFromUserAgent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JNCUUFQ2.js";
|
|
8
8
|
import {
|
|
9
9
|
addPublicMetadata,
|
|
10
10
|
addSensitiveMetadata,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
cloudEnvironment,
|
|
13
13
|
currentProcessIsGlobal,
|
|
14
14
|
macAddress
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-W4K3OTNK.js";
|
|
16
16
|
import {
|
|
17
17
|
cwd
|
|
18
18
|
} from "./chunk-T2GATXSP.js";
|
|
@@ -47,6 +47,10 @@ function randomBytes(size) {
|
|
|
47
47
|
function randomUUID() {
|
|
48
48
|
return crypto.randomUUID();
|
|
49
49
|
}
|
|
50
|
+
function nonRandomUUID(subject) {
|
|
51
|
+
let namespace = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
52
|
+
return crypto.createHash("sha1").update(Buffer.from(namespace.replace(/-/g, ""), "hex")).update(subject).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/, "$1-$2-$3-$4-$5");
|
|
53
|
+
}
|
|
50
54
|
|
|
51
55
|
// ../cli-kit/dist/private/node/analytics.js
|
|
52
56
|
async function startAnalytics({ commandContent, args, currentTime = (/* @__PURE__ */ new Date()).getTime(), commandClass }) {
|
|
@@ -106,8 +110,9 @@ export {
|
|
|
106
110
|
fileHash,
|
|
107
111
|
randomBytes,
|
|
108
112
|
randomUUID,
|
|
113
|
+
nonRandomUUID,
|
|
109
114
|
startAnalytics,
|
|
110
115
|
getEnvironmentData,
|
|
111
116
|
getSensitiveEnvironmentData
|
|
112
117
|
};
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-CGTFVNVW.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
init_cjs_shims
|
|
3
3
|
} from "./chunk-POZ5MGPT.js";
|
|
4
4
|
|
|
5
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@8.4.
|
|
5
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@8.4.4_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
|
|
6
6
|
init_cjs_shims();
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js
|
|
@@ -94,7 +94,7 @@ function portNumbers(from, to) {
|
|
|
94
94
|
}(from, to);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@8.4.
|
|
97
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@8.4.4_@graphql-codegen+cli@5.0.2_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
|
|
98
98
|
function findPort(portPreference, range = 100) {
|
|
99
99
|
return getPorts({
|
|
100
100
|
port: portNumbers(portPreference, portPreference + range)
|
|
@@ -104,4 +104,4 @@ function findPort(portPreference, range = 100) {
|
|
|
104
104
|
export {
|
|
105
105
|
findPort
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-CLB5CEKJ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
execa,
|
|
3
3
|
outputContent,
|
|
4
4
|
outputDebug
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-W4K3OTNK.js";
|
|
6
6
|
import {
|
|
7
7
|
init_cjs_shims
|
|
8
8
|
} from "./chunk-POZ5MGPT.js";
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
username,
|
|
61
61
|
platformAndArch
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-CQXLJ74Q.js.map
|