@shopify/cli 3.85.3 → 3.85.4
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/hydrogen/bundle/analyzer.html +155 -148
- package/dist/assets/hydrogen/starter/CHANGELOG.md +125 -49
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +62 -29
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +8 -3
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +3 -11
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +2 -6
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +10 -2
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +5 -3
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerAddressMutations.ts +7 -4
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +1 -1
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrderQuery.ts +4 -1
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +10 -5
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +3 -2
- package/dist/assets/hydrogen/starter/app/lib/context.ts +34 -17
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +1 -0
- package/dist/assets/hydrogen/starter/app/lib/orderFilters.ts +90 -0
- package/dist/assets/hydrogen/starter/app/lib/redirect.ts +1 -1
- package/dist/assets/hydrogen/starter/app/lib/session.ts +1 -1
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +1 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +23 -18
- package/dist/assets/hydrogen/starter/app/routes/$.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +2 -3
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +12 -8
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +4 -3
- package/dist/assets/hydrogen/starter/app/routes/account._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +15 -11
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +47 -22
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +152 -23
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +11 -8
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +16 -4
- package/dist/assets/hydrogen/starter/app/routes/account_.authorize.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +5 -3
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +3 -2
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +6 -10
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +10 -7
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +13 -7
- package/dist/assets/hydrogen/starter/app/routes/cart.$lines.tsx +3 -2
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +13 -9
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +8 -11
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +6 -6
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +10 -7
- package/dist/assets/hydrogen/starter/app/routes/discount.$code.tsx +3 -2
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +8 -6
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +7 -4
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +19 -13
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +9 -6
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +14 -14
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +2 -3
- package/dist/assets/hydrogen/starter/app/routes.ts +1 -1
- package/dist/assets/hydrogen/starter/app/styles/app.css +53 -1
- package/dist/assets/hydrogen/starter/customer-accountapi.generated.d.ts +47 -13
- package/dist/assets/hydrogen/starter/env.d.ts +1 -39
- package/dist/assets/hydrogen/starter/eslint.config.js +35 -52
- package/dist/assets/hydrogen/starter/package.json +14 -15
- package/dist/assets/hydrogen/starter/react-router.config.ts +9 -3
- package/dist/assets/hydrogen/starter/server.ts +7 -7
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +1 -1
- package/dist/assets/hydrogen/starter/tsconfig.json +17 -13
- package/dist/assets/hydrogen/starter/vite.config.ts +3 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +13 -20
- package/dist/assets/hydrogen/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +37 -0
- package/dist/{chokidar-TTCYG5AA.js → chokidar-HTKREZL3.js} +482 -7
- package/dist/{chunk-I4ATBX6D.js → chunk-2C6DJIBX.js} +4 -4
- package/dist/{chunk-JAUHWNMJ.js → chunk-2H6AD4EL.js} +5 -5
- package/dist/{chunk-HTTZVPR6.js → chunk-2XTIBWBA.js} +3 -3
- package/dist/{chunk-HS2O5IHL.js → chunk-34TWZ632.js} +3 -4
- package/dist/{chunk-Y4H4HMEZ.js → chunk-3762O47V.js} +2 -2
- package/dist/{chunk-C45MKMJT.js → chunk-3JZIRVBB.js} +8 -11
- package/dist/{chunk-OQKAZQIC.js → chunk-5AUZG65U.js} +5 -5
- package/dist/{chunk-OURS5IQY.js → chunk-5JFU2PDH.js} +3 -3
- package/dist/{chunk-AMWSD3HH.js → chunk-BRYTLGQH.js} +3 -3
- package/dist/{chunk-QP2MOS2Y.js → chunk-CBUCMJTB.js} +2 -2
- package/dist/{chunk-IHXRXBUN.js → chunk-DBQFPT3U.js} +6 -6
- package/dist/{chunk-QHKSKL4E.js → chunk-DEMUK3QR.js} +4 -4
- package/dist/{chunk-EDXQ22O4.js → chunk-EPNYJUKL.js} +6 -6
- package/dist/{chunk-5RNGA7FX.js → chunk-GMOJ4MM6.js} +5 -5
- package/dist/{chunk-ZHKIKKU7.js → chunk-JDGRN7YI.js} +4 -4
- package/dist/{chunk-HBANZKAF.js → chunk-JXSJVKPK.js} +3 -3
- package/dist/{chunk-LJXXOFEJ.js → chunk-M6DL6PW7.js} +2 -2
- package/dist/{chunk-D5DJSKHK.js → chunk-NIJYJVQ7.js} +112 -113
- package/dist/{chunk-NLFRHIZY.js → chunk-ON22YJEB.js} +6 -6
- package/dist/{chunk-F7TU455C.js → chunk-OYGH5GC4.js} +2 -2
- package/dist/{chunk-VR6Z7LKU.js → chunk-P24ZSULK.js} +3 -3
- package/dist/{chunk-6RJ7HBOQ.js → chunk-QCCEM2W7.js} +3 -3
- package/dist/{chunk-CAONVM2S.js → chunk-QCVEBMJO.js} +3 -3
- package/dist/{chunk-XJBIASMX.js → chunk-QDQ64PMY.js} +3 -3
- package/dist/{chunk-3XWYM7QS.js → chunk-S5H4ZYTZ.js} +3 -3
- package/dist/{chunk-V5ONTA7N.js → chunk-SJ6XHMPR.js} +2 -2
- package/dist/{chunk-UW4ASA6Y.js → chunk-UTGZE4KZ.js} +4 -4
- package/dist/{chunk-FGEKMLLA.js → chunk-VOXGVQ4Y.js} +6 -6
- package/dist/{chunk-RPU6TIF2.js → chunk-VVHZTHIS.js} +7 -7
- package/dist/{chunk-GRVHLYQS.js → chunk-W7V5E5TL.js} +4 -4
- package/dist/{chunk-6A6GDV25.js → chunk-XEG67XNW.js} +4 -4
- package/dist/{chunk-EWEA4LRT.js → chunk-XQMRWA2D.js} +2 -2
- package/dist/{chunk-L54PNQGV.js → chunk-XXIM3XSO.js} +2 -2
- package/dist/{chunk-VVUZFYUK.js → chunk-Y2BC44O5.js} +4 -4
- package/dist/{chunk-EG6MBBEN.js → chunk-Y2JP6WFP.js} +2 -2
- package/dist/cli/commands/auth/login.js +11 -11
- package/dist/cli/commands/auth/login.test.js +12 -12
- package/dist/cli/commands/auth/logout.js +11 -11
- package/dist/cli/commands/auth/logout.test.js +12 -12
- package/dist/cli/commands/cache/clear.js +11 -11
- package/dist/cli/commands/debug/command-flags.js +11 -11
- package/dist/cli/commands/docs/generate.js +11 -11
- package/dist/cli/commands/docs/generate.test.js +11 -11
- package/dist/cli/commands/help.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.js +12 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/index.js +14 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
- package/dist/cli/commands/notifications/generate.js +12 -12
- package/dist/cli/commands/notifications/list.js +12 -12
- package/dist/cli/commands/search.js +12 -12
- package/dist/cli/commands/upgrade.js +12 -12
- package/dist/cli/commands/version.js +12 -12
- package/dist/cli/commands/version.test.js +12 -12
- package/dist/cli/services/commands/notifications.js +7 -7
- package/dist/cli/services/commands/search.js +3 -3
- package/dist/cli/services/commands/search.test.js +3 -3
- package/dist/cli/services/commands/version.js +4 -4
- package/dist/cli/services/commands/version.test.js +5 -5
- package/dist/cli/services/kitchen-sink/async.js +3 -3
- package/dist/cli/services/kitchen-sink/prompts.js +3 -3
- package/dist/cli/services/kitchen-sink/static.js +3 -3
- package/dist/cli/services/upgrade.js +4 -4
- package/dist/cli/services/upgrade.test.js +5 -5
- package/dist/{custom-oclif-loader-YDKLB47A.js → custom-oclif-loader-OFIEXBNK.js} +3 -3
- package/dist/{error-handler-BYZU2C5C.js → error-handler-FHZMF7GS.js} +9 -9
- package/dist/hooks/postrun.js +7 -7
- package/dist/hooks/prerun.js +8 -8
- package/dist/index.js +1798 -3481
- package/dist/{local-XLJD5WYP.js → local-4MIY74VR.js} +3 -3
- package/dist/{morph-5D7H6MU2.js → morph-D4BXY376.js} +9 -9
- package/dist/{node-package-manager-I7AWSWJ4.js → node-package-manager-H6KF4PH6.js} +4 -4
- package/dist/{path-GB4VIEM6.js → path-COZT77T2.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-2AJAFJYY.js → ui-R3FDFL2U.js} +3 -3
- package/dist/{workerd-4DJKRJUB.js → workerd-JVZ57YOV.js} +13 -13
- package/oclif.manifest.json +11 -56
- package/package.json +8 -8
- package/dist/chokidar-XUA2BN3J.js +0 -1120
- package/dist/chunk-F7J5CUMZ.js +0 -497
|
@@ -9,6 +9,7 @@ export type CustomerAddressUpdateMutationVariables = CustomerAccountAPI.Exact<{
|
|
|
9
9
|
defaultAddress?: CustomerAccountAPI.InputMaybe<
|
|
10
10
|
CustomerAccountAPI.Scalars['Boolean']['input']
|
|
11
11
|
>;
|
|
12
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
12
13
|
}>;
|
|
13
14
|
|
|
14
15
|
export type CustomerAddressUpdateMutation = {
|
|
@@ -27,6 +28,7 @@ export type CustomerAddressUpdateMutation = {
|
|
|
27
28
|
|
|
28
29
|
export type CustomerAddressDeleteMutationVariables = CustomerAccountAPI.Exact<{
|
|
29
30
|
addressId: CustomerAccountAPI.Scalars['ID']['input'];
|
|
31
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
30
32
|
}>;
|
|
31
33
|
|
|
32
34
|
export type CustomerAddressDeleteMutation = {
|
|
@@ -50,6 +52,7 @@ export type CustomerAddressCreateMutationVariables = CustomerAccountAPI.Exact<{
|
|
|
50
52
|
defaultAddress?: CustomerAccountAPI.InputMaybe<
|
|
51
53
|
CustomerAccountAPI.Scalars['Boolean']['input']
|
|
52
54
|
>;
|
|
55
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
53
56
|
}>;
|
|
54
57
|
|
|
55
58
|
export type CustomerAddressCreateMutation = {
|
|
@@ -125,7 +128,7 @@ export type AddressFragment = Pick<
|
|
|
125
128
|
>;
|
|
126
129
|
|
|
127
130
|
export type CustomerDetailsQueryVariables = CustomerAccountAPI.Exact<{
|
|
128
|
-
|
|
131
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
129
132
|
}>;
|
|
130
133
|
|
|
131
134
|
export type CustomerDetailsQuery = {
|
|
@@ -224,7 +227,12 @@ export type OrderLineItemFullFragment = Pick<
|
|
|
224
227
|
|
|
225
228
|
export type OrderFragment = Pick<
|
|
226
229
|
CustomerAccountAPI.Order,
|
|
227
|
-
|
|
230
|
+
| 'id'
|
|
231
|
+
| 'name'
|
|
232
|
+
| 'confirmationNumber'
|
|
233
|
+
| 'statusPageUrl'
|
|
234
|
+
| 'fulfillmentStatus'
|
|
235
|
+
| 'processedAt'
|
|
228
236
|
> & {
|
|
229
237
|
fulfillments: {nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>};
|
|
230
238
|
totalTax?: CustomerAccountAPI.Maybe<
|
|
@@ -296,13 +304,19 @@ export type OrderFragment = Pick<
|
|
|
296
304
|
|
|
297
305
|
export type OrderQueryVariables = CustomerAccountAPI.Exact<{
|
|
298
306
|
orderId: CustomerAccountAPI.Scalars['ID']['input'];
|
|
307
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
299
308
|
}>;
|
|
300
309
|
|
|
301
310
|
export type OrderQuery = {
|
|
302
311
|
order?: CustomerAccountAPI.Maybe<
|
|
303
312
|
Pick<
|
|
304
313
|
CustomerAccountAPI.Order,
|
|
305
|
-
|
|
314
|
+
| 'id'
|
|
315
|
+
| 'name'
|
|
316
|
+
| 'confirmationNumber'
|
|
317
|
+
| 'statusPageUrl'
|
|
318
|
+
| 'fulfillmentStatus'
|
|
319
|
+
| 'processedAt'
|
|
306
320
|
> & {
|
|
307
321
|
fulfillments: {
|
|
308
322
|
nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>;
|
|
@@ -378,7 +392,12 @@ export type OrderQuery = {
|
|
|
378
392
|
|
|
379
393
|
export type OrderItemFragment = Pick<
|
|
380
394
|
CustomerAccountAPI.Order,
|
|
381
|
-
|
|
395
|
+
| 'financialStatus'
|
|
396
|
+
| 'fulfillmentStatus'
|
|
397
|
+
| 'id'
|
|
398
|
+
| 'number'
|
|
399
|
+
| 'confirmationNumber'
|
|
400
|
+
| 'processedAt'
|
|
382
401
|
> & {
|
|
383
402
|
totalPrice: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
384
403
|
fulfillments: {nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>};
|
|
@@ -389,7 +408,12 @@ export type CustomerOrdersFragment = {
|
|
|
389
408
|
nodes: Array<
|
|
390
409
|
Pick<
|
|
391
410
|
CustomerAccountAPI.Order,
|
|
392
|
-
|
|
411
|
+
| 'financialStatus'
|
|
412
|
+
| 'fulfillmentStatus'
|
|
413
|
+
| 'id'
|
|
414
|
+
| 'number'
|
|
415
|
+
| 'confirmationNumber'
|
|
416
|
+
| 'processedAt'
|
|
393
417
|
> & {
|
|
394
418
|
totalPrice: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
395
419
|
fulfillments: {
|
|
@@ -417,6 +441,10 @@ export type CustomerOrdersQueryVariables = CustomerAccountAPI.Exact<{
|
|
|
417
441
|
startCursor?: CustomerAccountAPI.InputMaybe<
|
|
418
442
|
CustomerAccountAPI.Scalars['String']['input']
|
|
419
443
|
>;
|
|
444
|
+
query?: CustomerAccountAPI.InputMaybe<
|
|
445
|
+
CustomerAccountAPI.Scalars['String']['input']
|
|
446
|
+
>;
|
|
447
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
420
448
|
}>;
|
|
421
449
|
|
|
422
450
|
export type CustomerOrdersQuery = {
|
|
@@ -425,7 +453,12 @@ export type CustomerOrdersQuery = {
|
|
|
425
453
|
nodes: Array<
|
|
426
454
|
Pick<
|
|
427
455
|
CustomerAccountAPI.Order,
|
|
428
|
-
|
|
456
|
+
| 'financialStatus'
|
|
457
|
+
| 'fulfillmentStatus'
|
|
458
|
+
| 'id'
|
|
459
|
+
| 'number'
|
|
460
|
+
| 'confirmationNumber'
|
|
461
|
+
| 'processedAt'
|
|
429
462
|
> & {
|
|
430
463
|
totalPrice: Pick<
|
|
431
464
|
CustomerAccountAPI.MoneyV2,
|
|
@@ -446,6 +479,7 @@ export type CustomerOrdersQuery = {
|
|
|
446
479
|
|
|
447
480
|
export type CustomerUpdateMutationVariables = CustomerAccountAPI.Exact<{
|
|
448
481
|
customer: CustomerAccountAPI.CustomerUpdateInput;
|
|
482
|
+
language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
|
|
449
483
|
}>;
|
|
450
484
|
|
|
451
485
|
export type CustomerUpdateMutation = {
|
|
@@ -470,34 +504,34 @@ export type CustomerUpdateMutation = {
|
|
|
470
504
|
};
|
|
471
505
|
|
|
472
506
|
interface GeneratedQueryTypes {
|
|
473
|
-
'#graphql\n query CustomerDetails {\n customer {\n ...Customer\n }\n }\n #graphql\n fragment Customer on Customer {\n id\n firstName\n lastName\n defaultAddress {\n ...Address\n }\n addresses(first: 6) {\n nodes {\n ...Address\n }\n }\n }\n fragment Address on CustomerAddress {\n id\n formatted\n firstName\n lastName\n company\n address1\n address2\n territoryCode\n zoneCode\n city\n zip\n phoneNumber\n }\n\n': {
|
|
507
|
+
'#graphql\n query CustomerDetails($language: LanguageCode) @inContext(language: $language) {\n customer {\n ...Customer\n }\n }\n #graphql\n fragment Customer on Customer {\n id\n firstName\n lastName\n defaultAddress {\n ...Address\n }\n addresses(first: 6) {\n nodes {\n ...Address\n }\n }\n }\n fragment Address on CustomerAddress {\n id\n formatted\n firstName\n lastName\n company\n address1\n address2\n territoryCode\n zoneCode\n city\n zip\n phoneNumber\n }\n\n': {
|
|
474
508
|
return: CustomerDetailsQuery;
|
|
475
509
|
variables: CustomerDetailsQueryVariables;
|
|
476
510
|
};
|
|
477
|
-
'#graphql\n fragment OrderMoney on MoneyV2 {\n amount\n currencyCode\n }\n fragment DiscountApplication on DiscountApplication {\n value {\n __typename\n ... on MoneyV2 {\n ...OrderMoney\n }\n ... on PricingPercentageValue {\n percentage\n }\n }\n }\n fragment OrderLineItemFull on LineItem {\n id\n title\n quantity\n price {\n ...OrderMoney\n }\n discountAllocations {\n allocatedAmount {\n ...OrderMoney\n }\n discountApplication {\n ...DiscountApplication\n }\n }\n totalDiscount {\n ...OrderMoney\n }\n image {\n altText\n height\n url\n id\n width\n }\n variantTitle\n }\n fragment Order on Order {\n id\n name\n statusPageUrl\n processedAt\n fulfillments(first: 1) {\n nodes {\n status\n }\n }\n totalTax {\n ...OrderMoney\n }\n totalPrice {\n ...OrderMoney\n }\n subtotal {\n ...OrderMoney\n }\n shippingAddress {\n name\n formatted(withName: true)\n formattedArea\n }\n discountApplications(first: 100) {\n nodes {\n ...DiscountApplication\n }\n }\n lineItems(first: 100) {\n nodes {\n ...OrderLineItemFull\n }\n }\n }\n query Order($orderId: ID
|
|
511
|
+
'#graphql\n fragment OrderMoney on MoneyV2 {\n amount\n currencyCode\n }\n fragment DiscountApplication on DiscountApplication {\n value {\n __typename\n ... on MoneyV2 {\n ...OrderMoney\n }\n ... on PricingPercentageValue {\n percentage\n }\n }\n }\n fragment OrderLineItemFull on LineItem {\n id\n title\n quantity\n price {\n ...OrderMoney\n }\n discountAllocations {\n allocatedAmount {\n ...OrderMoney\n }\n discountApplication {\n ...DiscountApplication\n }\n }\n totalDiscount {\n ...OrderMoney\n }\n image {\n altText\n height\n url\n id\n width\n }\n variantTitle\n }\n fragment Order on Order {\n id\n name\n confirmationNumber\n statusPageUrl\n fulfillmentStatus\n processedAt\n fulfillments(first: 1) {\n nodes {\n status\n }\n }\n totalTax {\n ...OrderMoney\n }\n totalPrice {\n ...OrderMoney\n }\n subtotal {\n ...OrderMoney\n }\n shippingAddress {\n name\n formatted(withName: true)\n formattedArea\n }\n discountApplications(first: 100) {\n nodes {\n ...DiscountApplication\n }\n }\n lineItems(first: 100) {\n nodes {\n ...OrderLineItemFull\n }\n }\n }\n query Order($orderId: ID!, $language: LanguageCode)\n @inContext(language: $language) {\n order(id: $orderId) {\n ... on Order {\n ...Order\n }\n }\n }\n': {
|
|
478
512
|
return: OrderQuery;
|
|
479
513
|
variables: OrderQueryVariables;
|
|
480
514
|
};
|
|
481
|
-
'#graphql\n #graphql\n fragment CustomerOrders on Customer {\n orders(\n sortKey: PROCESSED_AT,\n reverse: true,\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor\n ) {\n nodes {\n ...OrderItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n }\n }\n #graphql\n fragment OrderItem on Order {\n totalPrice {\n amount\n currencyCode\n }\n financialStatus\n fulfillments(first: 1) {\n nodes {\n status\n }\n }\n id\n number\n processedAt\n }\n\n\n query CustomerOrders(\n $endCursor: String\n $first: Int\n $last: Int\n $startCursor: String\n ) {\n customer {\n ...CustomerOrders\n }\n }\n': {
|
|
515
|
+
'#graphql\n #graphql\n fragment CustomerOrders on Customer {\n orders(\n sortKey: PROCESSED_AT,\n reverse: true,\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor,\n query: $query\n ) {\n nodes {\n ...OrderItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n }\n }\n #graphql\n fragment OrderItem on Order {\n totalPrice {\n amount\n currencyCode\n }\n financialStatus\n fulfillmentStatus\n fulfillments(first: 1) {\n nodes {\n status\n }\n }\n id\n number\n confirmationNumber\n processedAt\n }\n\n\n query CustomerOrders(\n $endCursor: String\n $first: Int\n $last: Int\n $startCursor: String\n $query: String\n $language: LanguageCode\n ) @inContext(language: $language) {\n customer {\n ...CustomerOrders\n }\n }\n': {
|
|
482
516
|
return: CustomerOrdersQuery;
|
|
483
517
|
variables: CustomerOrdersQueryVariables;
|
|
484
518
|
};
|
|
485
519
|
}
|
|
486
520
|
|
|
487
521
|
interface GeneratedMutationTypes {
|
|
488
|
-
'#graphql\n mutation customerAddressUpdate(\n $address: CustomerAddressInput!\n $addressId: ID!\n $defaultAddress: Boolean\n ) {\n customerAddressUpdate(\n address: $address\n addressId: $addressId\n defaultAddress: $defaultAddress\n ) {\n customerAddress {\n id\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
|
|
522
|
+
'#graphql\n mutation customerAddressUpdate(\n $address: CustomerAddressInput!\n $addressId: ID!\n $defaultAddress: Boolean\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerAddressUpdate(\n address: $address\n addressId: $addressId\n defaultAddress: $defaultAddress\n ) {\n customerAddress {\n id\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
|
|
489
523
|
return: CustomerAddressUpdateMutation;
|
|
490
524
|
variables: CustomerAddressUpdateMutationVariables;
|
|
491
525
|
};
|
|
492
|
-
'#graphql\n mutation customerAddressDelete(\n $addressId: ID
|
|
526
|
+
'#graphql\n mutation customerAddressDelete(\n $addressId: ID!\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerAddressDelete(addressId: $addressId) {\n deletedAddressId\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
|
|
493
527
|
return: CustomerAddressDeleteMutation;
|
|
494
528
|
variables: CustomerAddressDeleteMutationVariables;
|
|
495
529
|
};
|
|
496
|
-
'#graphql\n mutation customerAddressCreate(\n $address: CustomerAddressInput!\n $defaultAddress: Boolean\n ) {\n customerAddressCreate(\n address: $address\n defaultAddress: $defaultAddress\n ) {\n customerAddress {\n id\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
|
|
530
|
+
'#graphql\n mutation customerAddressCreate(\n $address: CustomerAddressInput!\n $defaultAddress: Boolean\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerAddressCreate(\n address: $address\n defaultAddress: $defaultAddress\n ) {\n customerAddress {\n id\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
|
|
497
531
|
return: CustomerAddressCreateMutation;
|
|
498
532
|
variables: CustomerAddressCreateMutationVariables;
|
|
499
533
|
};
|
|
500
|
-
'#graphql\n
|
|
534
|
+
'#graphql\n mutation customerUpdate(\n $customer: CustomerUpdateInput!\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerUpdate(input: $customer) {\n customer {\n firstName\n lastName\n emailAddress {\n emailAddress\n }\n phoneNumber {\n phoneNumber\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
|
|
501
535
|
return: CustomerUpdateMutation;
|
|
502
536
|
variables: CustomerUpdateMutationVariables;
|
|
503
537
|
};
|
|
@@ -1,45 +1,7 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
/// <reference types="react-router" />
|
|
3
3
|
/// <reference types="@shopify/oxygen-workers-types" />
|
|
4
|
+
/// <reference types="@shopify/hydrogen/react-router-types" />
|
|
4
5
|
|
|
5
6
|
// Enhance TypeScript's built-in typings.
|
|
6
7
|
import '@total-typescript/ts-reset';
|
|
7
|
-
|
|
8
|
-
import type {
|
|
9
|
-
HydrogenContext,
|
|
10
|
-
HydrogenSessionData,
|
|
11
|
-
HydrogenEnv,
|
|
12
|
-
} from '@shopify/hydrogen';
|
|
13
|
-
import type {createAppLoadContext} from '~/lib/context';
|
|
14
|
-
|
|
15
|
-
declare global {
|
|
16
|
-
/**
|
|
17
|
-
* A global `process` object is only available during build to access NODE_ENV.
|
|
18
|
-
*/
|
|
19
|
-
const process: {env: {NODE_ENV: 'production' | 'development'}};
|
|
20
|
-
|
|
21
|
-
interface Env extends HydrogenEnv {
|
|
22
|
-
// declare additional Env parameter use in the fetch handler and Remix loader context here
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare module 'react-router' {
|
|
27
|
-
interface AppLoadContext
|
|
28
|
-
extends Awaited<ReturnType<typeof createAppLoadContext>> {
|
|
29
|
-
// to change context type, change the return of createAppLoadContext() instead
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// TODO: remove this once we've migrated our loaders to `Route.LoaderArgs`
|
|
33
|
-
interface LoaderFunctionArgs {
|
|
34
|
-
context: AppLoadContext;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// TODO: remove this once we've migrated our loaders to `Route.ActionArgs`
|
|
38
|
-
interface ActionFunctionArgs {
|
|
39
|
-
context: AppLoadContext;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface SessionData extends HydrogenSessionData {
|
|
43
|
-
// declare local additions to the Remix session data here
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -26,6 +26,7 @@ export default [
|
|
|
26
26
|
ignores: [
|
|
27
27
|
'**/node_modules/',
|
|
28
28
|
'**/build/',
|
|
29
|
+
'**/dist/',
|
|
29
30
|
'**/*.graphql.d.ts',
|
|
30
31
|
'**/*.graphql.ts',
|
|
31
32
|
'**/*.generated.d.ts',
|
|
@@ -152,9 +153,7 @@ export default [
|
|
|
152
153
|
languageOptions: {
|
|
153
154
|
parser: tsParser,
|
|
154
155
|
parserOptions: {
|
|
155
|
-
|
|
156
|
-
allowDefaultProject: ['.graphqlrc.ts'],
|
|
157
|
-
},
|
|
156
|
+
project: './tsconfig.json',
|
|
158
157
|
tsconfigRootDir: __dirname,
|
|
159
158
|
ecmaFeatures: {
|
|
160
159
|
jsx: true,
|
|
@@ -175,55 +174,6 @@ export default [
|
|
|
175
174
|
},
|
|
176
175
|
rules: {
|
|
177
176
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
178
|
-
'@typescript-eslint/naming-convention': 'off',
|
|
179
|
-
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
files: ['**/.eslintrc.cjs'],
|
|
184
|
-
languageOptions: {
|
|
185
|
-
globals: {
|
|
186
|
-
...globals.node,
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
...compat.extends('plugin:jest/recommended').map((config) => ({
|
|
191
|
-
...config,
|
|
192
|
-
files: ['**/*.test.*'],
|
|
193
|
-
})),
|
|
194
|
-
{
|
|
195
|
-
files: ['**/*.test.*'],
|
|
196
|
-
plugins: {
|
|
197
|
-
jest,
|
|
198
|
-
},
|
|
199
|
-
languageOptions: {
|
|
200
|
-
globals: {
|
|
201
|
-
...globals.node,
|
|
202
|
-
...globals.jest,
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
files: ['**/*.server.*'],
|
|
208
|
-
rules: {
|
|
209
|
-
'react-hooks/rules-of-hooks': 'off',
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
...fixupConfigRules(
|
|
213
|
-
compat.extends(
|
|
214
|
-
'plugin:@typescript-eslint/eslint-recommended',
|
|
215
|
-
'plugin:@typescript-eslint/recommended',
|
|
216
|
-
),
|
|
217
|
-
).map((config) => ({
|
|
218
|
-
...config,
|
|
219
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
220
|
-
})),
|
|
221
|
-
{
|
|
222
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
223
|
-
languageOptions: {
|
|
224
|
-
parser: tsParser,
|
|
225
|
-
},
|
|
226
|
-
rules: {
|
|
227
177
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
228
178
|
'@typescript-eslint/naming-convention': [
|
|
229
179
|
'error',
|
|
@@ -256,8 +206,41 @@ export default [
|
|
|
256
206
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
257
207
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
258
208
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
209
|
+
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
259
210
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
211
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
212
|
+
'@typescript-eslint/no-misused-promises': 'error',
|
|
260
213
|
'react/prop-types': 'off',
|
|
261
214
|
},
|
|
262
215
|
},
|
|
216
|
+
{
|
|
217
|
+
files: ['**/.eslintrc.cjs'],
|
|
218
|
+
languageOptions: {
|
|
219
|
+
globals: {
|
|
220
|
+
...globals.node,
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
...compat.extends('plugin:jest/recommended').map((config) => ({
|
|
225
|
+
...config,
|
|
226
|
+
files: ['**/*.test.*'],
|
|
227
|
+
})),
|
|
228
|
+
{
|
|
229
|
+
files: ['**/*.test.*'],
|
|
230
|
+
plugins: {
|
|
231
|
+
jest,
|
|
232
|
+
},
|
|
233
|
+
languageOptions: {
|
|
234
|
+
globals: {
|
|
235
|
+
...globals.node,
|
|
236
|
+
...globals.jest,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
files: ['**/*.server.*'],
|
|
242
|
+
rules: {
|
|
243
|
+
'react-hooks/rules-of-hooks': 'off',
|
|
244
|
+
},
|
|
245
|
+
},
|
|
263
246
|
];
|
|
@@ -2,38 +2,37 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "2025.
|
|
5
|
+
"version": "2025.7.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
9
9
|
"dev": "shopify hydrogen dev --codegen",
|
|
10
10
|
"preview": "shopify hydrogen preview --build",
|
|
11
11
|
"lint": "eslint --no-error-on-unmatched-pattern .",
|
|
12
|
-
"typecheck": "tsc --noEmit",
|
|
13
|
-
"codegen": "shopify hydrogen codegen"
|
|
12
|
+
"typecheck": "react-router typegen && tsc --noEmit",
|
|
13
|
+
"codegen": "shopify hydrogen codegen && react-router typegen"
|
|
14
14
|
},
|
|
15
15
|
"prettier": "@shopify/prettier-config",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@shopify/hydrogen": "2025.
|
|
18
|
-
"@shopify/remix-oxygen": "^3.0.0",
|
|
17
|
+
"@shopify/hydrogen": "2025.7.0",
|
|
19
18
|
"graphql": "^16.10.0",
|
|
20
19
|
"graphql-tag": "^2.12.6",
|
|
21
20
|
"isbot": "^5.1.22",
|
|
22
|
-
"react": "
|
|
23
|
-
"react-dom": "
|
|
24
|
-
"react-router": "7.
|
|
25
|
-
"react-router-dom": "7.
|
|
21
|
+
"react": "18.3.1",
|
|
22
|
+
"react-dom": "18.3.1",
|
|
23
|
+
"react-router": "7.9.2",
|
|
24
|
+
"react-router-dom": "7.9.2"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
27
|
"@eslint/compat": "^1.2.5",
|
|
29
28
|
"@eslint/eslintrc": "^3.2.0",
|
|
30
29
|
"@eslint/js": "^9.18.0",
|
|
31
30
|
"@graphql-codegen/cli": "5.0.2",
|
|
32
|
-
"@react-router/dev": "7.
|
|
33
|
-
"@react-router/fs-routes": "7.
|
|
34
|
-
"@shopify/cli": "
|
|
31
|
+
"@react-router/dev": "7.9.2",
|
|
32
|
+
"@react-router/fs-routes": "7.9.2",
|
|
33
|
+
"@shopify/cli": "3.84.1",
|
|
35
34
|
"@shopify/hydrogen-codegen": "^0.3.3",
|
|
36
|
-
"@shopify/mini-oxygen": "^
|
|
35
|
+
"@shopify/mini-oxygen": "^4.0.0",
|
|
37
36
|
"@shopify/oxygen-workers-types": "^4.1.6",
|
|
38
37
|
"@shopify/prettier-config": "^1.1.2",
|
|
39
38
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
@@ -53,11 +52,11 @@
|
|
|
53
52
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
54
53
|
"globals": "^15.14.0",
|
|
55
54
|
"prettier": "^3.4.2",
|
|
56
|
-
"typescript": "^5.
|
|
55
|
+
"typescript": "^5.9.2",
|
|
57
56
|
"vite": "^6.2.4",
|
|
58
57
|
"vite-tsconfig-paths": "^4.3.1"
|
|
59
58
|
},
|
|
60
59
|
"engines": {
|
|
61
60
|
"node": ">=18.0.0"
|
|
62
61
|
}
|
|
63
|
-
}
|
|
62
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type {Config} from '@react-router/dev/config';
|
|
2
|
+
import {hydrogenPreset} from '@shopify/hydrogen/react-router-preset';
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* React Router 7.9.x Configuration for Hydrogen
|
|
6
|
+
*
|
|
7
|
+
* This configuration uses the official Hydrogen preset to provide optimal
|
|
8
|
+
* React Router settings for Shopify Oxygen deployment. The preset enables
|
|
9
|
+
* validated performance optimizations while ensuring compatibility.
|
|
10
|
+
*/
|
|
3
11
|
export default {
|
|
4
|
-
|
|
5
|
-
buildDirectory: 'dist',
|
|
6
|
-
ssr: true,
|
|
12
|
+
presets: [hydrogenPreset()],
|
|
7
13
|
} satisfies Config;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Virtual entry point for the app
|
|
2
2
|
import {storefrontRedirect} from '@shopify/hydrogen';
|
|
3
|
-
import {createRequestHandler} from '@shopify/
|
|
4
|
-
import {
|
|
3
|
+
import {createRequestHandler} from '@shopify/hydrogen/oxygen';
|
|
4
|
+
import {createHydrogenRouterContext} from '~/lib/context';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Export a fetch handler in module format.
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
executionContext: ExecutionContext,
|
|
14
14
|
): Promise<Response> {
|
|
15
15
|
try {
|
|
16
|
-
const
|
|
16
|
+
const hydrogenContext = await createHydrogenRouterContext(
|
|
17
17
|
request,
|
|
18
18
|
env,
|
|
19
19
|
executionContext,
|
|
@@ -27,15 +27,15 @@ export default {
|
|
|
27
27
|
// eslint-disable-next-line import/no-unresolved
|
|
28
28
|
build: await import('virtual:react-router/server-build'),
|
|
29
29
|
mode: process.env.NODE_ENV,
|
|
30
|
-
getLoadContext: () =>
|
|
30
|
+
getLoadContext: () => hydrogenContext,
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const response = await handleRequest(request);
|
|
34
34
|
|
|
35
|
-
if (
|
|
35
|
+
if (hydrogenContext.session.isPending) {
|
|
36
36
|
response.headers.set(
|
|
37
37
|
'Set-Cookie',
|
|
38
|
-
await
|
|
38
|
+
await hydrogenContext.session.commit(),
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
return storefrontRedirect({
|
|
49
49
|
request,
|
|
50
50
|
response,
|
|
51
|
-
storefront:
|
|
51
|
+
storefront: hydrogenContext.storefront,
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -73,7 +73,7 @@ export type CartApiQueryFragment = Pick<
|
|
|
73
73
|
'updatedAt' | 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
|
|
74
74
|
> & {
|
|
75
75
|
appliedGiftCards: Array<
|
|
76
|
-
Pick<StorefrontAPI.AppliedGiftCard, 'lastCharacters'> & {
|
|
76
|
+
Pick<StorefrontAPI.AppliedGiftCard, 'id' | 'lastCharacters'> & {
|
|
77
77
|
amountUsed: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
|
|
78
78
|
}
|
|
79
79
|
>;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"include": [
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"env.d.ts",
|
|
4
|
+
"app/**/*.ts",
|
|
5
|
+
"app/**/*.tsx",
|
|
6
|
+
"app/**/*.d.ts",
|
|
7
|
+
"*.ts",
|
|
8
|
+
"*.tsx",
|
|
9
|
+
"*.d.ts",
|
|
10
|
+
".graphqlrc.ts",
|
|
6
11
|
".react-router/types/**/*"
|
|
7
12
|
],
|
|
13
|
+
"exclude": ["node_modules", "dist", "build", "packages/**/dist/**/*"],
|
|
8
14
|
"compilerOptions": {
|
|
9
|
-
"lib": [
|
|
10
|
-
"DOM",
|
|
11
|
-
"DOM.Iterable",
|
|
12
|
-
"ES2022"
|
|
13
|
-
],
|
|
15
|
+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
14
16
|
"isolatedModules": true,
|
|
15
17
|
"esModuleInterop": true,
|
|
16
18
|
"jsx": "react-jsx",
|
|
@@ -26,14 +28,16 @@
|
|
|
26
28
|
"types": [
|
|
27
29
|
"@shopify/oxygen-workers-types",
|
|
28
30
|
"react-router",
|
|
31
|
+
"@shopify/hydrogen/react-router-types",
|
|
29
32
|
"vite/client"
|
|
30
33
|
],
|
|
31
34
|
"paths": {
|
|
32
|
-
"~/*": [
|
|
33
|
-
"app/*"
|
|
34
|
-
]
|
|
35
|
+
"~/*": ["app/*"]
|
|
35
36
|
},
|
|
36
37
|
"noEmit": true,
|
|
37
|
-
"rootDirs": [".", "./.react-router/types"]
|
|
38
|
+
"rootDirs": [".", "./.react-router/types"],
|
|
39
|
+
"incremental": true,
|
|
40
|
+
"composite": false,
|
|
41
|
+
"verbatimModuleSyntax": true
|
|
38
42
|
}
|
|
39
|
-
}
|
|
43
|
+
}
|
|
@@ -137,26 +137,19 @@ function TabButtonsBar({ children }) {
|
|
|
137
137
|
setFadeClass("fadeLeft");
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
return /* @__PURE__ */ jsxs(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
children
|
|
154
|
-
}
|
|
155
|
-
),
|
|
156
|
-
/* @__PURE__ */ jsx("div", { className: `fadCover ${fadeClass}` })
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
);
|
|
140
|
+
return /* @__PURE__ */ jsxs("div", { id: "tab-buttons-wrapper", children: [
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
id: "tabButtons",
|
|
145
|
+
ref: scrollBarRef,
|
|
146
|
+
className: "flex-row gap-tiny",
|
|
147
|
+
onScroll: (event) => setFade(event.currentTarget),
|
|
148
|
+
children
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsx("div", { className: `fadCover ${fadeClass}` })
|
|
152
|
+
] });
|
|
160
153
|
}
|
|
161
154
|
function DetailsRow({
|
|
162
155
|
rowName,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
async function generateProjectUuid(root) {
|
|
2
|
+
const encoder = new TextEncoder();
|
|
3
|
+
const data = encoder.encode(root);
|
|
4
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
|
|
5
|
+
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
6
|
+
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
7
|
+
return [
|
|
8
|
+
hashHex.slice(0, 8),
|
|
9
|
+
hashHex.slice(8, 12),
|
|
10
|
+
"4" + hashHex.slice(13, 16),
|
|
11
|
+
// Version 4
|
|
12
|
+
(parseInt(hashHex.slice(16, 18), 16) & 63 | 128).toString(16) + hashHex.slice(18, 20),
|
|
13
|
+
// Variant bits
|
|
14
|
+
hashHex.slice(20, 32)
|
|
15
|
+
].join("-");
|
|
16
|
+
}
|
|
17
|
+
async function loader({ request, context }) {
|
|
18
|
+
let root = context?.env?.HYDROGEN_PROJECT_ROOT || "/workspace/hydrogen-dev";
|
|
19
|
+
root = root.replace(/\\/g, "/");
|
|
20
|
+
const uuid = await generateProjectUuid(root);
|
|
21
|
+
const responseData = {
|
|
22
|
+
workspace: {
|
|
23
|
+
root,
|
|
24
|
+
uuid
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return new Response(JSON.stringify(responseData), {
|
|
28
|
+
status: 200,
|
|
29
|
+
headers: {
|
|
30
|
+
"Content-Type": "application/json",
|
|
31
|
+
"Cache-Control": "no-cache"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
loader
|
|
37
|
+
};
|