@shopify/cli 3.61.1 → 3.61.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 (101) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +67 -5
  2. package/dist/assets/hydrogen/starter/app/lib/session.ts +5 -0
  3. package/dist/assets/hydrogen/starter/app/root.tsx +12 -19
  4. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -5
  5. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +12 -70
  6. package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +7 -14
  7. package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +1 -8
  8. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +5 -22
  9. package/dist/assets/hydrogen/starter/app/routes/account.tsx +0 -1
  10. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +0 -2
  11. package/dist/assets/hydrogen/starter/package.json +4 -4
  12. package/dist/assets/hydrogen/starter/server.ts +4 -0
  13. package/dist/{chunk-MOWOUC6B.js → chunk-3RM5SOXY.js} +1 -1
  14. package/dist/{chunk-BV7GMWB6.js → chunk-4757GPBG.js} +3 -3
  15. package/dist/{chunk-4IJQUE7S.js → chunk-4L37JOS5.js} +1 -1
  16. package/dist/{chunk-PMW2LD65.js → chunk-4TTAP7NN.js} +3 -3
  17. package/dist/{chunk-WVPWWPI5.js → chunk-5B2D56W6.js} +2 -2
  18. package/dist/{chunk-APKJSJ7J.js → chunk-5MODHNUE.js} +3 -3
  19. package/dist/{chunk-2OLSNRWX.js → chunk-7IZTLXJ5.js} +2 -2
  20. package/dist/{chunk-CZ3HSQWY.js → chunk-BUWM6JUU.js} +2 -2
  21. package/dist/{chunk-ITNVIYE3.js → chunk-BYFLATOA.js} +2 -2
  22. package/dist/{chunk-5CMD3IOB.js → chunk-CK7MF3LY.js} +1 -1
  23. package/dist/{chunk-NNUPTNLQ.js → chunk-CTETXMMM.js} +3 -3
  24. package/dist/{chunk-72B3OWJW.js → chunk-EHF6FVWH.js} +1 -1
  25. package/dist/{chunk-IWPRI3XU.js → chunk-ETSILRIY.js} +2 -2
  26. package/dist/{chunk-K7AOF3FH.js → chunk-G4EQLT5B.js} +3 -3
  27. package/dist/{chunk-IHBQYIUZ.js → chunk-JQPQJN44.js} +4 -4
  28. package/dist/{chunk-MZ2TTN37.js → chunk-KBXWK6XB.js} +1 -1
  29. package/dist/{chunk-DDSNKVSE.js → chunk-M73YMW2C.js} +2 -2
  30. package/dist/{chunk-Z5LDVTOK.js → chunk-NBIE3DNN.js} +1 -1
  31. package/dist/{chunk-4L5RRXWK.js → chunk-NJP5GFNN.js} +1 -2
  32. package/dist/{chunk-QMWGTSUE.js → chunk-NJTSDTDU.js} +4 -4
  33. package/dist/{chunk-5AOK2Y6Y.js → chunk-Q3KADKQA.js} +2 -2
  34. package/dist/{chunk-KNQWUKO7.js → chunk-QDZF6IG4.js} +1 -1
  35. package/dist/{chunk-WZTRJKOI.js → chunk-QLLSCNEC.js} +2 -2
  36. package/dist/{chunk-MVPEKELJ.js → chunk-QQP6JS5H.js} +1 -1
  37. package/dist/{chunk-K7RRB5XV.js → chunk-QSO3GQEK.js} +70 -71
  38. package/dist/{chunk-Q5FUGUDS.js → chunk-QTBH3GO6.js} +1 -1
  39. package/dist/{chunk-WLP3ZOM3.js → chunk-RPRKZ6JC.js} +9 -9
  40. package/dist/{chunk-MUSUHPY2.js → chunk-TXXQWILO.js} +2 -2
  41. package/dist/{chunk-XMZ6YUCX.js → chunk-UPM6XNBH.js} +2 -2
  42. package/dist/{chunk-KKVOR377.js → chunk-VC6CC75R.js} +2 -2
  43. package/dist/{chunk-D6WPLX6I.js → chunk-WZBNLCJ5.js} +2 -2
  44. package/dist/{chunk-EE47RXD7.js → chunk-XMJDBJPP.js} +3 -3
  45. package/dist/{chunk-IH7T5JPW.js → chunk-YP5UVIUW.js} +3 -3
  46. package/dist/{chunk-CJDUY6SJ.js → chunk-YZGLFVKK.js} +1 -1
  47. package/dist/{chunk-FAJJWN6E.js → chunk-ZE2ZPLYI.js} +4 -4
  48. package/dist/cli/commands/auth/logout.js +8 -8
  49. package/dist/cli/commands/auth/logout.test.js +9 -9
  50. package/dist/cli/commands/debug/command-flags.js +8 -8
  51. package/dist/cli/commands/demo/catalog.js +9 -9
  52. package/dist/cli/commands/demo/generate-file.js +9 -9
  53. package/dist/cli/commands/demo/index.js +8 -8
  54. package/dist/cli/commands/demo/print-ai-prompt.js +9 -9
  55. package/dist/cli/commands/docs/generate.js +8 -8
  56. package/dist/cli/commands/docs/generate.test.js +8 -8
  57. package/dist/cli/commands/help.js +8 -8
  58. package/dist/cli/commands/kitchen-sink/async.js +9 -9
  59. package/dist/cli/commands/kitchen-sink/async.test.js +9 -9
  60. package/dist/cli/commands/kitchen-sink/index.js +11 -11
  61. package/dist/cli/commands/kitchen-sink/index.test.js +11 -11
  62. package/dist/cli/commands/kitchen-sink/prompts.js +9 -9
  63. package/dist/cli/commands/kitchen-sink/prompts.test.js +9 -9
  64. package/dist/cli/commands/kitchen-sink/static.js +9 -9
  65. package/dist/cli/commands/kitchen-sink/static.test.js +9 -9
  66. package/dist/cli/commands/search.js +9 -9
  67. package/dist/cli/commands/upgrade.js +8 -8
  68. package/dist/cli/commands/version.js +9 -9
  69. package/dist/cli/commands/version.test.js +9 -9
  70. package/dist/cli/services/commands/search.js +2 -2
  71. package/dist/cli/services/commands/search.test.js +2 -2
  72. package/dist/cli/services/commands/version.js +4 -4
  73. package/dist/cli/services/commands/version.test.js +5 -5
  74. package/dist/cli/services/demo.js +2 -2
  75. package/dist/cli/services/demo.test.js +2 -2
  76. package/dist/cli/services/kitchen-sink/async.js +2 -2
  77. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  78. package/dist/cli/services/kitchen-sink/static.js +2 -2
  79. package/dist/cli/services/upgrade.js +3 -3
  80. package/dist/cli/services/upgrade.test.js +4 -4
  81. package/dist/{custom-oclif-loader-RLNBRURI-YQ7IWI5Q.js → custom-oclif-loader-4SQGUQ7D-P5C4NLSX.js} +2 -2
  82. package/dist/{custom-oclif-loader-FPNRMQLJ.js → custom-oclif-loader-OD47SFAU.js} +1 -1
  83. package/dist/{error-handler-5ZOJ546L.js → error-handler-EPMFPTYX.js} +1 -1
  84. package/dist/{error-handler-764JJPWK-SOMSJP6S.js → error-handler-WI4YVJIS-U3BMMYNJ.js} +4 -4
  85. package/dist/{error-handler-EOKEDDHC.js → error-handler-WL3Q25NI.js} +6 -6
  86. package/dist/hooks/postrun.js +5 -5
  87. package/dist/hooks/prerun.js +3 -3
  88. package/dist/index.js +971 -1006
  89. package/dist/{local-S7EXCS5E.js → local-KISH2IRF.js} +1 -1
  90. package/dist/{local-GRWHBAAP-GLATK6HY.js → local-YKOG4EUR-XRRBWLSI.js} +2 -2
  91. package/dist/{morph-XX23WEJZ.js → morph-DCIZUK2Q.js} +8 -8
  92. package/dist/{node-SSGKCHRY.js → node-3DKQAOFU.js} +4 -4
  93. package/dist/{node-package-manager-V7QQWFES.js → node-package-manager-HYTHPJBI.js} +2 -2
  94. package/dist/{node-package-manager-VZCY35QS-AGCABGK7.js → node-package-manager-S7TSAUJZ-KKDY6KSF.js} +3 -3
  95. package/dist/{system-P6PSEW7S.js → system-LIP7AECY.js} +1 -1
  96. package/dist/tsconfig.tsbuildinfo +1 -1
  97. package/dist/{ui-JSBDAFMV.js → ui-5LSDG3C5.js} +1 -1
  98. package/dist/{ui-P6NP425V-CKQLZD3E.js → ui-FUZYK6S3-PVVDPVD5.js} +2 -2
  99. package/dist/{workerd-3U2NNCIK.js → workerd-TFH7T6NI.js} +3 -3
  100. package/oclif.manifest.json +1 -1
  101. package/package.json +3 -3
@@ -1,15 +1,77 @@
1
1
  # skeleton
2
2
 
3
- ## 0.0.0-next-a8b9c6c-20240606114114
3
+ ## 0.0.0-next-9eb60d7-20240607102913
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Remove manual setting of session in headers and recommend setting it in server after response is created. ([#2137](https://github.com/Shopify/hydrogen/pull/2137)) by [@michenly](https://github.com/michenly)
8
+
9
+ Step 1: Add `isPending` implementation in session
10
+
11
+ ```diff
12
+ // in app/lib/session.ts
13
+ export class AppSession implements HydrogenSession {
14
+ + public isPending = false;
15
+
16
+ get unset() {
17
+ + this.isPending = true;
18
+ return this.#session.unset;
19
+ }
20
+
21
+ get set() {
22
+ + this.isPending = true;
23
+ return this.#session.set;
24
+ }
25
+
26
+ commit() {
27
+ + this.isPending = false;
28
+ return this.#sessionStorage.commitSession(this.#session);
29
+ }
30
+ }
31
+ ```
32
+
33
+ Step 2: update response header if `session.isPending` is true
34
+
35
+ ```diff
36
+ // in server.ts
37
+ export default {
38
+ async fetch(request: Request): Promise<Response> {
39
+ try {
40
+ const response = await handleRequest(request);
41
+
42
+ + if (session.isPending) {
43
+ + response.headers.set('Set-Cookie', await session.commit());
44
+ + }
45
+
46
+ return response;
47
+ } catch (error) {
48
+ ...
49
+ }
50
+ },
51
+ };
52
+ ```
53
+
54
+ Step 3: remove setting cookie with session.commit() in routes
55
+
56
+ ```diff
57
+ // in route files
58
+ export async function loader({context}: LoaderFunctionArgs) {
59
+ return json({},
60
+ - {
61
+ - headers: {
62
+ - 'Set-Cookie': await context.session.commit(),
63
+ - },
64
+ },
65
+ );
66
+ }
67
+ ```
68
+
7
69
  - Trigger changeset for all packages for next release
8
70
 
9
- - Updated dependencies []:
10
- - @shopify/hydrogen@0.0.0-next-a8b9c6c-20240606114114
11
- - @shopify/cli-hydrogen@0.0.0-next-a8b9c6c-20240606114114
12
- - @shopify/remix-oxygen@0.0.0-next-a8b9c6c-20240606114114
71
+ - Updated dependencies [[`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`10a419bf`](https://github.com/Shopify/hydrogen/commit/10a419bf1db79cdfd8c41c0223ce695959f60da9), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`9eb60d73`](https://github.com/Shopify/hydrogen/commit/9eb60d73e552c3d22b9325ecbcd5878810893ad3)]:
72
+ - @shopify/hydrogen@0.0.0-next-9eb60d7-20240607102913
73
+ - @shopify/cli-hydrogen@0.0.0-next-9eb60d7-20240607102913
74
+ - @shopify/remix-oxygen@0.0.0-next-9eb60d7-20240607102913
13
75
 
14
76
  ## 2024.4.5
15
77
 
@@ -11,6 +11,8 @@ import {
11
11
  * swap out the cookie-based implementation with something else!
12
12
  */
13
13
  export class AppSession implements HydrogenSession {
14
+ public isPending = false;
15
+
14
16
  #sessionStorage;
15
17
  #session;
16
18
 
@@ -50,10 +52,12 @@ export class AppSession implements HydrogenSession {
50
52
  }
51
53
 
52
54
  get unset() {
55
+ this.isPending = true;
53
56
  return this.#session.unset;
54
57
  }
55
58
 
56
59
  get set() {
60
+ this.isPending = true;
57
61
  return this.#session.set;
58
62
  }
59
63
 
@@ -62,6 +66,7 @@ export class AppSession implements HydrogenSession {
62
66
  }
63
67
 
64
68
  commit() {
69
+ this.isPending = false;
65
70
  return this.#sessionStorage.commitSession(this.#session);
66
71
  }
67
72
  }
@@ -65,26 +65,19 @@ export async function loader(args: LoaderFunctionArgs) {
65
65
 
66
66
  const {storefront, env} = args.context;
67
67
 
68
- return defer(
69
- {
70
- ...deferredData,
71
- ...criticalData,
72
- publicStoreDomain: env.PUBLIC_STORE_DOMAIN,
73
- shop: getShopAnalytics({
74
- storefront,
75
- publicStorefrontId: env.PUBLIC_STOREFRONT_ID,
76
- }),
77
- consent: {
78
- checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN,
79
- storefrontAccessToken: env.PUBLIC_STOREFRONT_API_TOKEN,
80
- },
81
- },
82
- {
83
- headers: {
84
- 'Set-Cookie': await args.context.session.commit(),
85
- },
68
+ return defer({
69
+ ...deferredData,
70
+ ...criticalData,
71
+ publicStoreDomain: env.PUBLIC_STORE_DOMAIN,
72
+ shop: getShopAnalytics({
73
+ storefront,
74
+ publicStorefrontId: env.PUBLIC_STOREFRONT_ID,
75
+ }),
76
+ consent: {
77
+ checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN,
78
+ storefrontAccessToken: env.PUBLIC_STOREFRONT_API_TOKEN,
86
79
  },
87
- );
80
+ });
88
81
  }
89
82
 
90
83
  /**
@@ -4,9 +4,5 @@ import {redirect, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
4
4
  export async function loader({context}: LoaderFunctionArgs) {
5
5
  await context.customerAccount.handleAuthStatus();
6
6
 
7
- return redirect('/account', {
8
- headers: {
9
- 'Set-Cookie': await context.session.commit(),
10
- },
11
- });
7
+ return redirect('/account');
12
8
  }
@@ -37,14 +37,7 @@ export const meta: MetaFunction = () => {
37
37
  export async function loader({context}: LoaderFunctionArgs) {
38
38
  await context.customerAccount.handleAuthStatus();
39
39
 
40
- return json(
41
- {},
42
- {
43
- headers: {
44
- 'Set-Cookie': await context.session.commit(),
45
- },
46
- },
47
- );
40
+ return json({});
48
41
  }
49
42
 
50
43
  export async function action({request, context}: ActionFunctionArgs) {
@@ -67,9 +60,6 @@ export async function action({request, context}: ActionFunctionArgs) {
67
60
  {error: {[addressId]: 'Unauthorized'}},
68
61
  {
69
62
  status: 401,
70
- headers: {
71
- 'Set-Cookie': await context.session.commit(),
72
- },
73
63
  },
74
64
  );
75
65
  }
@@ -121,27 +111,17 @@ export async function action({request, context}: ActionFunctionArgs) {
121
111
  throw new Error('Customer address create failed.');
122
112
  }
123
113
 
124
- return json(
125
- {
126
- error: null,
127
- createdAddress: data?.customerAddressCreate?.customerAddress,
128
- defaultAddress,
129
- },
130
- {
131
- headers: {
132
- 'Set-Cookie': await context.session.commit(),
133
- },
134
- },
135
- );
114
+ return json({
115
+ error: null,
116
+ createdAddress: data?.customerAddressCreate?.customerAddress,
117
+ defaultAddress,
118
+ });
136
119
  } catch (error: unknown) {
137
120
  if (error instanceof Error) {
138
121
  return json(
139
122
  {error: {[addressId]: error.message}},
140
123
  {
141
124
  status: 400,
142
- headers: {
143
- 'Set-Cookie': await context.session.commit(),
144
- },
145
125
  },
146
126
  );
147
127
  }
@@ -149,9 +129,6 @@ export async function action({request, context}: ActionFunctionArgs) {
149
129
  {error: {[addressId]: error}},
150
130
  {
151
131
  status: 400,
152
- headers: {
153
- 'Set-Cookie': await context.session.commit(),
154
- },
155
132
  },
156
133
  );
157
134
  }
@@ -183,27 +160,17 @@ export async function action({request, context}: ActionFunctionArgs) {
183
160
  throw new Error('Customer address update failed.');
184
161
  }
185
162
 
186
- return json(
187
- {
188
- error: null,
189
- updatedAddress: address,
190
- defaultAddress,
191
- },
192
- {
193
- headers: {
194
- 'Set-Cookie': await context.session.commit(),
195
- },
196
- },
197
- );
163
+ return json({
164
+ error: null,
165
+ updatedAddress: address,
166
+ defaultAddress,
167
+ });
198
168
  } catch (error: unknown) {
199
169
  if (error instanceof Error) {
200
170
  return json(
201
171
  {error: {[addressId]: error.message}},
202
172
  {
203
173
  status: 400,
204
- headers: {
205
- 'Set-Cookie': await context.session.commit(),
206
- },
207
174
  },
208
175
  );
209
176
  }
@@ -211,9 +178,6 @@ export async function action({request, context}: ActionFunctionArgs) {
211
178
  {error: {[addressId]: error}},
212
179
  {
213
180
  status: 400,
214
- headers: {
215
- 'Set-Cookie': await context.session.commit(),
216
- },
217
181
  },
218
182
  );
219
183
  }
@@ -241,23 +205,13 @@ export async function action({request, context}: ActionFunctionArgs) {
241
205
  throw new Error('Customer address delete failed.');
242
206
  }
243
207
 
244
- return json(
245
- {error: null, deletedAddress: addressId},
246
- {
247
- headers: {
248
- 'Set-Cookie': await context.session.commit(),
249
- },
250
- },
251
- );
208
+ return json({error: null, deletedAddress: addressId});
252
209
  } catch (error: unknown) {
253
210
  if (error instanceof Error) {
254
211
  return json(
255
212
  {error: {[addressId]: error.message}},
256
213
  {
257
214
  status: 400,
258
- headers: {
259
- 'Set-Cookie': await context.session.commit(),
260
- },
261
215
  },
262
216
  );
263
217
  }
@@ -265,9 +219,6 @@ export async function action({request, context}: ActionFunctionArgs) {
265
219
  {error: {[addressId]: error}},
266
220
  {
267
221
  status: 400,
268
- headers: {
269
- 'Set-Cookie': await context.session.commit(),
270
- },
271
222
  },
272
223
  );
273
224
  }
@@ -278,9 +229,6 @@ export async function action({request, context}: ActionFunctionArgs) {
278
229
  {error: {[addressId]: 'Method not allowed'}},
279
230
  {
280
231
  status: 405,
281
- headers: {
282
- 'Set-Cookie': await context.session.commit(),
283
- },
284
232
  },
285
233
  );
286
234
  }
@@ -291,9 +239,6 @@ export async function action({request, context}: ActionFunctionArgs) {
291
239
  {error: error.message},
292
240
  {
293
241
  status: 400,
294
- headers: {
295
- 'Set-Cookie': await context.session.commit(),
296
- },
297
242
  },
298
243
  );
299
244
  }
@@ -301,9 +246,6 @@ export async function action({request, context}: ActionFunctionArgs) {
301
246
  {error},
302
247
  {
303
248
  status: 400,
304
- headers: {
305
- 'Set-Cookie': await context.session.commit(),
306
- },
307
249
  },
308
250
  );
309
251
  }
@@ -40,20 +40,13 @@ export async function loader({params, context}: LoaderFunctionArgs) {
40
40
  firstDiscount?.__typename === 'PricingPercentageValue' &&
41
41
  firstDiscount?.percentage;
42
42
 
43
- return json(
44
- {
45
- order,
46
- lineItems,
47
- discountValue,
48
- discountPercentage,
49
- fulfillmentStatus,
50
- },
51
- {
52
- headers: {
53
- 'Set-Cookie': await context.session.commit(),
54
- },
55
- },
56
- );
43
+ return json({
44
+ order,
45
+ lineItems,
46
+ discountValue,
47
+ discountPercentage,
48
+ fulfillmentStatus,
49
+ });
57
50
  }
58
51
 
59
52
  export default function OrderRoute() {
@@ -34,14 +34,7 @@ export async function loader({request, context}: LoaderFunctionArgs) {
34
34
  throw Error('Customer orders not found');
35
35
  }
36
36
 
37
- return json(
38
- {customer: data.customer},
39
- {
40
- headers: {
41
- 'Set-Cookie': await context.session.commit(),
42
- },
43
- },
44
- );
37
+ return json({customer: data.customer});
45
38
  }
46
39
 
47
40
  export default function Orders() {
@@ -26,14 +26,7 @@ export const meta: MetaFunction = () => {
26
26
  export async function loader({context}: LoaderFunctionArgs) {
27
27
  await context.customerAccount.handleAuthStatus();
28
28
 
29
- return json(
30
- {},
31
- {
32
- headers: {
33
- 'Set-Cookie': await context.session.commit(),
34
- },
35
- },
36
- );
29
+ return json({});
37
30
  }
38
31
 
39
32
  export async function action({request, context}: ActionFunctionArgs) {
@@ -75,25 +68,15 @@ export async function action({request, context}: ActionFunctionArgs) {
75
68
  throw new Error('Customer profile update failed.');
76
69
  }
77
70
 
78
- return json(
79
- {
80
- error: null,
81
- customer: data?.customerUpdate?.customer,
82
- },
83
- {
84
- headers: {
85
- 'Set-Cookie': await context.session.commit(),
86
- },
87
- },
88
- );
71
+ return json({
72
+ error: null,
73
+ customer: data?.customerUpdate?.customer,
74
+ });
89
75
  } catch (error: any) {
90
76
  return json(
91
77
  {error: error.message, customer: null},
92
78
  {
93
79
  status: 400,
94
- headers: {
95
- 'Set-Cookie': await context.session.commit(),
96
- },
97
80
  },
98
81
  );
99
82
  }
@@ -20,7 +20,6 @@ export async function loader({context}: LoaderFunctionArgs) {
20
20
  {
21
21
  headers: {
22
22
  'Cache-Control': 'no-cache, no-store, must-revalidate',
23
- 'Set-Cookie': await context.session.commit(),
24
23
  },
25
24
  },
26
25
  );
@@ -68,8 +68,6 @@ export async function action({request, context}: ActionFunctionArgs) {
68
68
  headers.set('Location', redirectTo);
69
69
  }
70
70
 
71
- headers.append('Set-Cookie', await context.session.commit());
72
-
73
71
  return json(
74
72
  {
75
73
  cart: cartResult,
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "0.0.0-next-a8b9c6c-20240606114114",
5
+ "version": "0.0.0-next-9eb60d7-20240607102913",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -17,8 +17,8 @@
17
17
  "@remix-run/react": "^2.9.2",
18
18
  "@remix-run/server-runtime": "^2.9.2",
19
19
  "@shopify/cli": "3.61.0",
20
- "@shopify/hydrogen": "0.0.0-next-a8b9c6c-20240606114114",
21
- "@shopify/remix-oxygen": "0.0.0-next-a8b9c6c-20240606114114",
20
+ "@shopify/hydrogen": "0.0.0-next-9eb60d7-20240607102913",
21
+ "@shopify/remix-oxygen": "0.0.0-next-9eb60d7-20240607102913",
22
22
  "graphql": "^16.6.0",
23
23
  "graphql-tag": "^2.12.6",
24
24
  "isbot": "^3.8.0",
@@ -29,7 +29,7 @@
29
29
  "@graphql-codegen/cli": "5.0.2",
30
30
  "@remix-run/dev": "^2.9.2",
31
31
  "@remix-run/eslint-config": "^2.9.2",
32
- "@shopify/hydrogen-codegen": "0.0.0-next-a8b9c6c-20240606114114",
32
+ "@shopify/hydrogen-codegen": "0.0.0-next-9eb60d7-20240607102913",
33
33
  "@shopify/mini-oxygen": "^3.0.3",
34
34
  "@shopify/oxygen-workers-types": "^4.0.0",
35
35
  "@shopify/prettier-config": "^1.1.2",
@@ -96,6 +96,10 @@ export default {
96
96
 
97
97
  const response = await handleRequest(request);
98
98
 
99
+ if (session.isPending) {
100
+ response.headers.set('Set-Cookie', await session.commit());
101
+ }
102
+
99
103
  if (response.status === 404) {
100
104
  /**
101
105
  * Check for redirects only when there's a 404 from the app.
@@ -17,7 +17,7 @@ import {
17
17
  renderTextPrompt,
18
18
  renderWarning,
19
19
  sleep
20
- } from "./chunk-5CMD3IOB.js";
20
+ } from "./chunk-CK7MF3LY.js";
21
21
  import {
22
22
  init_cjs_shims
23
23
  } from "./chunk-M63RTPGR.js";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-IUHH3PST.js";
4
4
  import {
5
5
  demoStepsSchema
6
- } from "./chunk-MOWOUC6B.js";
6
+ } from "./chunk-3RM5SOXY.js";
7
7
  import {
8
8
  base_command_default
9
- } from "./chunk-K7AOF3FH.js";
9
+ } from "./chunk-G4EQLT5B.js";
10
10
  import {
11
11
  outputInfo,
12
12
  renderInfo
13
- } from "./chunk-5CMD3IOB.js";
13
+ } from "./chunk-CK7MF3LY.js";
14
14
  import {
15
15
  __toESM,
16
16
  init_cjs_shims
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearCollectedLogs,
3
3
  collectedLogs
4
- } from "./chunk-5CMD3IOB.js";
4
+ } from "./chunk-CK7MF3LY.js";
5
5
  import {
6
6
  init_cjs_shims
7
7
  } from "./chunk-M63RTPGR.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  demo
3
- } from "./chunk-MOWOUC6B.js";
3
+ } from "./chunk-3RM5SOXY.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-K7AOF3FH.js";
6
+ } from "./chunk-G4EQLT5B.js";
7
7
  import {
8
8
  outputInfo,
9
9
  readFile,
10
10
  renderAutocompletePrompt
11
- } from "./chunk-5CMD3IOB.js";
11
+ } from "./chunk-CK7MF3LY.js";
12
12
  import {
13
13
  joinPath
14
14
  } from "./chunk-MHMFNQE3.js";
@@ -2,7 +2,7 @@ import {
2
2
  init_cjs_shims
3
3
  } from "./chunk-M63RTPGR.js";
4
4
 
5
- // ../../node_modules/.pnpm/@shopify+cli-hydrogen@0.0.0-next-a8b9c6c-20240606114114_react-dom@17.0.2_react@18.3.1/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
5
+ // ../../node_modules/.pnpm/@shopify+cli-hydrogen@0.0.0-next-9eb60d7-20240607102913_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
@@ -141,7 +141,7 @@ function portNumbers(from, to) {
141
141
  return generator(from, to);
142
142
  }
143
143
 
144
- // ../../node_modules/.pnpm/@shopify+cli-hydrogen@0.0.0-next-a8b9c6c-20240606114114_react-dom@17.0.2_react@18.3.1/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
144
+ // ../../node_modules/.pnpm/@shopify+cli-hydrogen@0.0.0-next-9eb60d7-20240607102913_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
145
145
  function findPort(portPreference, range = 100) {
146
146
  return getPorts({
147
147
  port: portNumbers(portPreference, portPreference + range)
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-K7AOF3FH.js";
3
+ } from "./chunk-G4EQLT5B.js";
4
4
  import {
5
5
  packageManagerFromUserAgent
6
- } from "./chunk-KNQWUKO7.js";
6
+ } from "./chunk-QDZF6IG4.js";
7
7
  import {
8
8
  currentProcessIsGlobal,
9
9
  inferPackageManagerForGlobalCLI,
10
10
  renderInfo
11
- } from "./chunk-5CMD3IOB.js";
11
+ } from "./chunk-CK7MF3LY.js";
12
12
  import {
13
13
  init_cjs_shims
14
14
  } from "./chunk-M63RTPGR.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  versionService
3
- } from "./chunk-IH7T5JPW.js";
3
+ } from "./chunk-YP5UVIUW.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-K7AOF3FH.js";
6
+ } from "./chunk-G4EQLT5B.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-M63RTPGR.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-K7AOF3FH.js";
3
+ } from "./chunk-G4EQLT5B.js";
4
4
  import {
5
5
  mkdir,
6
6
  outputInfo,
7
7
  rmdir,
8
8
  writeFile
9
- } from "./chunk-5CMD3IOB.js";
9
+ } from "./chunk-CK7MF3LY.js";
10
10
  import {
11
11
  cwd,
12
12
  joinPath
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-K7AOF3FH.js";
3
+ } from "./chunk-G4EQLT5B.js";
4
4
  import {
5
5
  renderTable,
6
6
  renderText
7
- } from "./chunk-5CMD3IOB.js";
7
+ } from "./chunk-CK7MF3LY.js";
8
8
  import {
9
9
  require_lib
10
10
  } from "./chunk-I434ZJQI.js";
@@ -26732,7 +26732,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
26732
26732
  try {
26733
26733
  await getAndSet();
26734
26734
  } catch (error) {
26735
- const { sendErrorToBugsnag } = await import("./error-handler-EOKEDDHC.js");
26735
+ const { sendErrorToBugsnag } = await import("./error-handler-WL3Q25NI.js");
26736
26736
  await sendErrorToBugsnag(error, "unexpected_error");
26737
26737
  }
26738
26738
  }
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-IUHH3PST.js";
4
4
  import {
5
5
  demoStepsSchema
6
- } from "./chunk-MOWOUC6B.js";
6
+ } from "./chunk-3RM5SOXY.js";
7
7
  import {
8
8
  base_command_default
9
- } from "./chunk-K7AOF3FH.js";
9
+ } from "./chunk-G4EQLT5B.js";
10
10
  import {
11
11
  AbortError,
12
12
  fileExists,
@@ -17,7 +17,7 @@ import {
17
17
  readFile,
18
18
  renderAutocompletePrompt,
19
19
  writeFile
20
- } from "./chunk-5CMD3IOB.js";
20
+ } from "./chunk-CK7MF3LY.js";
21
21
  import {
22
22
  require_lib
23
23
  } from "./chunk-I434ZJQI.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renderConcurrent,
3
3
  renderTasks
4
- } from "./chunk-5CMD3IOB.js";
4
+ } from "./chunk-CK7MF3LY.js";
5
5
  import {
6
6
  init_cjs_shims
7
7
  } from "./chunk-M63RTPGR.js";