@shopify/cli-hydrogen 9.0.2 → 9.0.3
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/starter/CHANGELOG.md +814 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +3 -4
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +113 -44
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +8 -3
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +6 -5
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +3 -3
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +9 -16
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -10
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +1 -10
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +50 -119
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +42 -38
- package/dist/assets/hydrogen/starter/app/styles/app.css +25 -1
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +23 -20
- package/dist/assets/hydrogen/starter/guides/search/search.md +27 -25
- package/dist/assets/hydrogen/starter/package.json +3 -3
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +177 -194
- package/dist/assets/hydrogen/tailwind/tailwind.css +1 -1
- package/dist/commands/hydrogen/deploy.js +14 -3
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
|
@@ -494,13 +494,6 @@ export type ProductItemFragment = Pick<
|
|
|
494
494
|
minVariantPrice: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
495
495
|
maxVariantPrice: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
496
496
|
};
|
|
497
|
-
variants: {
|
|
498
|
-
nodes: Array<{
|
|
499
|
-
selectedOptions: Array<
|
|
500
|
-
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
501
|
-
>;
|
|
502
|
-
}>;
|
|
503
|
-
};
|
|
504
497
|
};
|
|
505
498
|
|
|
506
499
|
export type CollectionQueryVariables = StorefrontAPI.Exact<{
|
|
@@ -542,13 +535,6 @@ export type CollectionQuery = {
|
|
|
542
535
|
'amount' | 'currencyCode'
|
|
543
536
|
>;
|
|
544
537
|
};
|
|
545
|
-
variants: {
|
|
546
|
-
nodes: Array<{
|
|
547
|
-
selectedOptions: Array<
|
|
548
|
-
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
549
|
-
>;
|
|
550
|
-
}>;
|
|
551
|
-
};
|
|
552
538
|
}
|
|
553
539
|
>;
|
|
554
540
|
pageInfo: Pick<
|
|
@@ -634,13 +620,6 @@ export type CatalogQuery = {
|
|
|
634
620
|
'amount' | 'currencyCode'
|
|
635
621
|
>;
|
|
636
622
|
};
|
|
637
|
-
variants: {
|
|
638
|
-
nodes: Array<{
|
|
639
|
-
selectedOptions: Array<
|
|
640
|
-
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
641
|
-
>;
|
|
642
|
-
}>;
|
|
643
|
-
};
|
|
644
623
|
}
|
|
645
624
|
>;
|
|
646
625
|
pageInfo: Pick<
|
|
@@ -750,14 +729,81 @@ export type ProductVariantFragment = Pick<
|
|
|
750
729
|
|
|
751
730
|
export type ProductFragment = Pick<
|
|
752
731
|
StorefrontAPI.Product,
|
|
753
|
-
|
|
732
|
+
| 'id'
|
|
733
|
+
| 'title'
|
|
734
|
+
| 'vendor'
|
|
735
|
+
| 'handle'
|
|
736
|
+
| 'descriptionHtml'
|
|
737
|
+
| 'description'
|
|
738
|
+
| 'encodedVariantExistence'
|
|
739
|
+
| 'encodedVariantAvailability'
|
|
754
740
|
> & {
|
|
755
741
|
options: Array<
|
|
756
742
|
Pick<StorefrontAPI.ProductOption, 'name'> & {
|
|
757
|
-
optionValues: Array<
|
|
743
|
+
optionValues: Array<
|
|
744
|
+
Pick<StorefrontAPI.ProductOptionValue, 'name'> & {
|
|
745
|
+
firstSelectableVariant?: StorefrontAPI.Maybe<
|
|
746
|
+
Pick<
|
|
747
|
+
StorefrontAPI.ProductVariant,
|
|
748
|
+
'availableForSale' | 'id' | 'sku' | 'title'
|
|
749
|
+
> & {
|
|
750
|
+
compareAtPrice?: StorefrontAPI.Maybe<
|
|
751
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
752
|
+
>;
|
|
753
|
+
image?: StorefrontAPI.Maybe<
|
|
754
|
+
{__typename: 'Image'} & Pick<
|
|
755
|
+
StorefrontAPI.Image,
|
|
756
|
+
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
757
|
+
>
|
|
758
|
+
>;
|
|
759
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
760
|
+
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
|
|
761
|
+
selectedOptions: Array<
|
|
762
|
+
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
763
|
+
>;
|
|
764
|
+
unitPrice?: StorefrontAPI.Maybe<
|
|
765
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
766
|
+
>;
|
|
767
|
+
}
|
|
768
|
+
>;
|
|
769
|
+
swatch?: StorefrontAPI.Maybe<
|
|
770
|
+
Pick<StorefrontAPI.ProductOptionValueSwatch, 'color'> & {
|
|
771
|
+
image?: StorefrontAPI.Maybe<{
|
|
772
|
+
previewImage?: StorefrontAPI.Maybe<
|
|
773
|
+
Pick<StorefrontAPI.Image, 'url'>
|
|
774
|
+
>;
|
|
775
|
+
}>;
|
|
776
|
+
}
|
|
777
|
+
>;
|
|
778
|
+
}
|
|
779
|
+
>;
|
|
758
780
|
}
|
|
759
781
|
>;
|
|
760
|
-
|
|
782
|
+
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
|
|
783
|
+
Pick<
|
|
784
|
+
StorefrontAPI.ProductVariant,
|
|
785
|
+
'availableForSale' | 'id' | 'sku' | 'title'
|
|
786
|
+
> & {
|
|
787
|
+
compareAtPrice?: StorefrontAPI.Maybe<
|
|
788
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
789
|
+
>;
|
|
790
|
+
image?: StorefrontAPI.Maybe<
|
|
791
|
+
{__typename: 'Image'} & Pick<
|
|
792
|
+
StorefrontAPI.Image,
|
|
793
|
+
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
794
|
+
>
|
|
795
|
+
>;
|
|
796
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
797
|
+
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
|
|
798
|
+
selectedOptions: Array<
|
|
799
|
+
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
800
|
+
>;
|
|
801
|
+
unitPrice?: StorefrontAPI.Maybe<
|
|
802
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
803
|
+
>;
|
|
804
|
+
}
|
|
805
|
+
>;
|
|
806
|
+
adjacentVariants: Array<
|
|
761
807
|
Pick<
|
|
762
808
|
StorefrontAPI.ProductVariant,
|
|
763
809
|
'availableForSale' | 'id' | 'sku' | 'title'
|
|
@@ -781,32 +827,6 @@ export type ProductFragment = Pick<
|
|
|
781
827
|
>;
|
|
782
828
|
}
|
|
783
829
|
>;
|
|
784
|
-
variants: {
|
|
785
|
-
nodes: Array<
|
|
786
|
-
Pick<
|
|
787
|
-
StorefrontAPI.ProductVariant,
|
|
788
|
-
'availableForSale' | 'id' | 'sku' | 'title'
|
|
789
|
-
> & {
|
|
790
|
-
compareAtPrice?: StorefrontAPI.Maybe<
|
|
791
|
-
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
792
|
-
>;
|
|
793
|
-
image?: StorefrontAPI.Maybe<
|
|
794
|
-
{__typename: 'Image'} & Pick<
|
|
795
|
-
StorefrontAPI.Image,
|
|
796
|
-
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
797
|
-
>
|
|
798
|
-
>;
|
|
799
|
-
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
800
|
-
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
|
|
801
|
-
selectedOptions: Array<
|
|
802
|
-
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
803
|
-
>;
|
|
804
|
-
unitPrice?: StorefrontAPI.Maybe<
|
|
805
|
-
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
806
|
-
>;
|
|
807
|
-
}
|
|
808
|
-
>;
|
|
809
|
-
};
|
|
810
830
|
seo: Pick<StorefrontAPI.Seo, 'description' | 'title'>;
|
|
811
831
|
};
|
|
812
832
|
|
|
@@ -823,14 +843,57 @@ export type ProductQuery = {
|
|
|
823
843
|
product?: StorefrontAPI.Maybe<
|
|
824
844
|
Pick<
|
|
825
845
|
StorefrontAPI.Product,
|
|
826
|
-
|
|
846
|
+
| 'id'
|
|
847
|
+
| 'title'
|
|
848
|
+
| 'vendor'
|
|
849
|
+
| 'handle'
|
|
850
|
+
| 'descriptionHtml'
|
|
851
|
+
| 'description'
|
|
852
|
+
| 'encodedVariantExistence'
|
|
853
|
+
| 'encodedVariantAvailability'
|
|
827
854
|
> & {
|
|
828
855
|
options: Array<
|
|
829
856
|
Pick<StorefrontAPI.ProductOption, 'name'> & {
|
|
830
|
-
optionValues: Array<
|
|
857
|
+
optionValues: Array<
|
|
858
|
+
Pick<StorefrontAPI.ProductOptionValue, 'name'> & {
|
|
859
|
+
firstSelectableVariant?: StorefrontAPI.Maybe<
|
|
860
|
+
Pick<
|
|
861
|
+
StorefrontAPI.ProductVariant,
|
|
862
|
+
'availableForSale' | 'id' | 'sku' | 'title'
|
|
863
|
+
> & {
|
|
864
|
+
compareAtPrice?: StorefrontAPI.Maybe<
|
|
865
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
866
|
+
>;
|
|
867
|
+
image?: StorefrontAPI.Maybe<
|
|
868
|
+
{__typename: 'Image'} & Pick<
|
|
869
|
+
StorefrontAPI.Image,
|
|
870
|
+
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
871
|
+
>
|
|
872
|
+
>;
|
|
873
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
874
|
+
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
|
|
875
|
+
selectedOptions: Array<
|
|
876
|
+
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
877
|
+
>;
|
|
878
|
+
unitPrice?: StorefrontAPI.Maybe<
|
|
879
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
880
|
+
>;
|
|
881
|
+
}
|
|
882
|
+
>;
|
|
883
|
+
swatch?: StorefrontAPI.Maybe<
|
|
884
|
+
Pick<StorefrontAPI.ProductOptionValueSwatch, 'color'> & {
|
|
885
|
+
image?: StorefrontAPI.Maybe<{
|
|
886
|
+
previewImage?: StorefrontAPI.Maybe<
|
|
887
|
+
Pick<StorefrontAPI.Image, 'url'>
|
|
888
|
+
>;
|
|
889
|
+
}>;
|
|
890
|
+
}
|
|
891
|
+
>;
|
|
892
|
+
}
|
|
893
|
+
>;
|
|
831
894
|
}
|
|
832
895
|
>;
|
|
833
|
-
|
|
896
|
+
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
|
|
834
897
|
Pick<
|
|
835
898
|
StorefrontAPI.ProductVariant,
|
|
836
899
|
'availableForSale' | 'id' | 'sku' | 'title'
|
|
@@ -854,76 +917,7 @@ export type ProductQuery = {
|
|
|
854
917
|
>;
|
|
855
918
|
}
|
|
856
919
|
>;
|
|
857
|
-
|
|
858
|
-
nodes: Array<
|
|
859
|
-
Pick<
|
|
860
|
-
StorefrontAPI.ProductVariant,
|
|
861
|
-
'availableForSale' | 'id' | 'sku' | 'title'
|
|
862
|
-
> & {
|
|
863
|
-
compareAtPrice?: StorefrontAPI.Maybe<
|
|
864
|
-
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
865
|
-
>;
|
|
866
|
-
image?: StorefrontAPI.Maybe<
|
|
867
|
-
{__typename: 'Image'} & Pick<
|
|
868
|
-
StorefrontAPI.Image,
|
|
869
|
-
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
870
|
-
>
|
|
871
|
-
>;
|
|
872
|
-
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
873
|
-
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
|
|
874
|
-
selectedOptions: Array<
|
|
875
|
-
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
876
|
-
>;
|
|
877
|
-
unitPrice?: StorefrontAPI.Maybe<
|
|
878
|
-
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
879
|
-
>;
|
|
880
|
-
}
|
|
881
|
-
>;
|
|
882
|
-
};
|
|
883
|
-
seo: Pick<StorefrontAPI.Seo, 'description' | 'title'>;
|
|
884
|
-
}
|
|
885
|
-
>;
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
export type ProductVariantsFragment = {
|
|
889
|
-
variants: {
|
|
890
|
-
nodes: Array<
|
|
891
|
-
Pick<
|
|
892
|
-
StorefrontAPI.ProductVariant,
|
|
893
|
-
'availableForSale' | 'id' | 'sku' | 'title'
|
|
894
|
-
> & {
|
|
895
|
-
compareAtPrice?: StorefrontAPI.Maybe<
|
|
896
|
-
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
897
|
-
>;
|
|
898
|
-
image?: StorefrontAPI.Maybe<
|
|
899
|
-
{__typename: 'Image'} & Pick<
|
|
900
|
-
StorefrontAPI.Image,
|
|
901
|
-
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
902
|
-
>
|
|
903
|
-
>;
|
|
904
|
-
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
905
|
-
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
|
|
906
|
-
selectedOptions: Array<
|
|
907
|
-
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
908
|
-
>;
|
|
909
|
-
unitPrice?: StorefrontAPI.Maybe<
|
|
910
|
-
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
911
|
-
>;
|
|
912
|
-
}
|
|
913
|
-
>;
|
|
914
|
-
};
|
|
915
|
-
};
|
|
916
|
-
|
|
917
|
-
export type ProductVariantsQueryVariables = StorefrontAPI.Exact<{
|
|
918
|
-
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
|
|
919
|
-
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
|
|
920
|
-
handle: StorefrontAPI.Scalars['String']['input'];
|
|
921
|
-
}>;
|
|
922
|
-
|
|
923
|
-
export type ProductVariantsQuery = {
|
|
924
|
-
product?: StorefrontAPI.Maybe<{
|
|
925
|
-
variants: {
|
|
926
|
-
nodes: Array<
|
|
920
|
+
adjacentVariants: Array<
|
|
927
921
|
Pick<
|
|
928
922
|
StorefrontAPI.ProductVariant,
|
|
929
923
|
'availableForSale' | 'id' | 'sku' | 'title'
|
|
@@ -947,31 +941,30 @@ export type ProductVariantsQuery = {
|
|
|
947
941
|
>;
|
|
948
942
|
}
|
|
949
943
|
>;
|
|
950
|
-
|
|
951
|
-
|
|
944
|
+
seo: Pick<StorefrontAPI.Seo, 'description' | 'title'>;
|
|
945
|
+
}
|
|
946
|
+
>;
|
|
952
947
|
};
|
|
953
948
|
|
|
954
949
|
export type SearchProductFragment = {__typename: 'Product'} & Pick<
|
|
955
950
|
StorefrontAPI.Product,
|
|
956
951
|
'handle' | 'id' | 'publishedAt' | 'title' | 'trackingParameters' | 'vendor'
|
|
957
952
|
> & {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
>;
|
|
974
|
-
};
|
|
953
|
+
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
|
|
954
|
+
Pick<StorefrontAPI.ProductVariant, 'id'> & {
|
|
955
|
+
image?: StorefrontAPI.Maybe<
|
|
956
|
+
Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
|
|
957
|
+
>;
|
|
958
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
959
|
+
compareAtPrice?: StorefrontAPI.Maybe<
|
|
960
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
961
|
+
>;
|
|
962
|
+
selectedOptions: Array<
|
|
963
|
+
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
964
|
+
>;
|
|
965
|
+
product: Pick<StorefrontAPI.Product, 'handle' | 'title'>;
|
|
966
|
+
}
|
|
967
|
+
>;
|
|
975
968
|
};
|
|
976
969
|
|
|
977
970
|
export type SearchPageFragment = {__typename: 'Page'} & Pick<
|
|
@@ -1031,26 +1024,24 @@ export type RegularSearchQuery = {
|
|
|
1031
1024
|
| 'trackingParameters'
|
|
1032
1025
|
| 'vendor'
|
|
1033
1026
|
> & {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
>;
|
|
1053
|
-
};
|
|
1027
|
+
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
|
|
1028
|
+
Pick<StorefrontAPI.ProductVariant, 'id'> & {
|
|
1029
|
+
image?: StorefrontAPI.Maybe<
|
|
1030
|
+
Pick<
|
|
1031
|
+
StorefrontAPI.Image,
|
|
1032
|
+
'url' | 'altText' | 'width' | 'height'
|
|
1033
|
+
>
|
|
1034
|
+
>;
|
|
1035
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
1036
|
+
compareAtPrice?: StorefrontAPI.Maybe<
|
|
1037
|
+
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
|
|
1038
|
+
>;
|
|
1039
|
+
selectedOptions: Array<
|
|
1040
|
+
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
|
|
1041
|
+
>;
|
|
1042
|
+
product: Pick<StorefrontAPI.Product, 'handle' | 'title'>;
|
|
1043
|
+
}
|
|
1044
|
+
>;
|
|
1054
1045
|
}
|
|
1055
1046
|
>;
|
|
1056
1047
|
pageInfo: Pick<
|
|
@@ -1088,16 +1079,14 @@ export type PredictiveProductFragment = {__typename: 'Product'} & Pick<
|
|
|
1088
1079
|
StorefrontAPI.Product,
|
|
1089
1080
|
'id' | 'title' | 'handle' | 'trackingParameters'
|
|
1090
1081
|
> & {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
>;
|
|
1100
|
-
};
|
|
1082
|
+
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
|
|
1083
|
+
Pick<StorefrontAPI.ProductVariant, 'id'> & {
|
|
1084
|
+
image?: StorefrontAPI.Maybe<
|
|
1085
|
+
Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
|
|
1086
|
+
>;
|
|
1087
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
1088
|
+
}
|
|
1089
|
+
>;
|
|
1101
1090
|
};
|
|
1102
1091
|
|
|
1103
1092
|
export type PredictiveQueryFragment = {
|
|
@@ -1153,19 +1142,17 @@ export type PredictiveSearchQuery = {
|
|
|
1153
1142
|
StorefrontAPI.Product,
|
|
1154
1143
|
'id' | 'title' | 'handle' | 'trackingParameters'
|
|
1155
1144
|
> & {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
>;
|
|
1168
|
-
};
|
|
1145
|
+
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
|
|
1146
|
+
Pick<StorefrontAPI.ProductVariant, 'id'> & {
|
|
1147
|
+
image?: StorefrontAPI.Maybe<
|
|
1148
|
+
Pick<
|
|
1149
|
+
StorefrontAPI.Image,
|
|
1150
|
+
'url' | 'altText' | 'width' | 'height'
|
|
1151
|
+
>
|
|
1152
|
+
>;
|
|
1153
|
+
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
1154
|
+
}
|
|
1155
|
+
>;
|
|
1169
1156
|
}
|
|
1170
1157
|
>;
|
|
1171
1158
|
queries: Array<
|
|
@@ -1210,7 +1197,7 @@ interface GeneratedQueryTypes {
|
|
|
1210
1197
|
return: BlogsQuery;
|
|
1211
1198
|
variables: BlogsQueryVariables;
|
|
1212
1199
|
};
|
|
1213
|
-
'#graphql\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n
|
|
1200
|
+
'#graphql\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n }\n\n query Collection(\n $handle: String!\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n collection(handle: $handle) {\n id\n handle\n title\n description\n products(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor\n ) {\n nodes {\n ...ProductItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n }\n }\n }\n': {
|
|
1214
1201
|
return: CollectionQuery;
|
|
1215
1202
|
variables: CollectionQueryVariables;
|
|
1216
1203
|
};
|
|
@@ -1218,7 +1205,7 @@ interface GeneratedQueryTypes {
|
|
|
1218
1205
|
return: StoreCollectionsQuery;
|
|
1219
1206
|
variables: StoreCollectionsQueryVariables;
|
|
1220
1207
|
};
|
|
1221
|
-
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n
|
|
1208
|
+
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n }\n\n': {
|
|
1222
1209
|
return: CatalogQuery;
|
|
1223
1210
|
variables: CatalogQueryVariables;
|
|
1224
1211
|
};
|
|
@@ -1234,19 +1221,15 @@ interface GeneratedQueryTypes {
|
|
|
1234
1221
|
return: PoliciesQuery;
|
|
1235
1222
|
variables: PoliciesQueryVariables;
|
|
1236
1223
|
};
|
|
1237
|
-
'#graphql\n query Product(\n $country: CountryCode\n $handle: String!\n $language: LanguageCode\n $selectedOptions: [SelectedOptionInput!]!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...Product\n }\n }\n #graphql\n fragment Product on Product {\n id\n title\n vendor\n handle\n descriptionHtml\n description\n options {\n name\n optionValues {\n name\n }\n }\n
|
|
1224
|
+
'#graphql\n query Product(\n $country: CountryCode\n $handle: String!\n $language: LanguageCode\n $selectedOptions: [SelectedOptionInput!]!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...Product\n }\n }\n #graphql\n fragment Product on Product {\n id\n title\n vendor\n handle\n descriptionHtml\n description\n encodedVariantExistence\n encodedVariantAvailability\n options {\n name\n optionValues {\n name\n firstSelectableVariant {\n ...ProductVariant\n }\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n }\n }\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions, ignoreUnknownOptions: true, caseInsensitiveMatch: true) {\n ...ProductVariant\n }\n adjacentVariants (selectedOptions: $selectedOptions) {\n ...ProductVariant\n }\n seo {\n description\n title\n }\n }\n #graphql\n fragment ProductVariant on ProductVariant {\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n id\n image {\n __typename\n id\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n product {\n title\n handle\n }\n selectedOptions {\n name\n value\n }\n sku\n title\n unitPrice {\n amount\n currencyCode\n }\n }\n\n\n': {
|
|
1238
1225
|
return: ProductQuery;
|
|
1239
1226
|
variables: ProductQueryVariables;
|
|
1240
1227
|
};
|
|
1241
|
-
'#graphql\n
|
|
1242
|
-
return: ProductVariantsQuery;
|
|
1243
|
-
variables: ProductVariantsQueryVariables;
|
|
1244
|
-
};
|
|
1245
|
-
'#graphql\n query RegularSearch(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $term: String!\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n articles: search(\n query: $term,\n types: [ARTICLE],\n first: $first,\n ) {\n nodes {\n ...on Article {\n ...SearchArticle\n }\n }\n }\n pages: search(\n query: $term,\n types: [PAGE],\n first: $first,\n ) {\n nodes {\n ...on Page {\n ...SearchPage\n }\n }\n }\n products: search(\n after: $endCursor,\n before: $startCursor,\n first: $first,\n last: $last,\n query: $term,\n sortKey: RELEVANCE,\n types: [PRODUCT],\n unavailableProducts: HIDE,\n ) {\n nodes {\n ...on Product {\n ...SearchProduct\n }\n }\n pageInfo {\n ...PageInfoFragment\n }\n }\n }\n #graphql\n fragment SearchProduct on Product {\n __typename\n handle\n id\n publishedAt\n title\n trackingParameters\n vendor\n variants(first: 1) {\n nodes {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n #graphql\n fragment SearchPage on Page {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment SearchArticle on Article {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment PageInfoFragment on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n': {
|
|
1228
|
+
'#graphql\n query RegularSearch(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $term: String!\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n articles: search(\n query: $term,\n types: [ARTICLE],\n first: $first,\n ) {\n nodes {\n ...on Article {\n ...SearchArticle\n }\n }\n }\n pages: search(\n query: $term,\n types: [PAGE],\n first: $first,\n ) {\n nodes {\n ...on Page {\n ...SearchPage\n }\n }\n }\n products: search(\n after: $endCursor,\n before: $startCursor,\n first: $first,\n last: $last,\n query: $term,\n sortKey: RELEVANCE,\n types: [PRODUCT],\n unavailableProducts: HIDE,\n ) {\n nodes {\n ...on Product {\n ...SearchProduct\n }\n }\n pageInfo {\n ...PageInfoFragment\n }\n }\n }\n #graphql\n fragment SearchProduct on Product {\n __typename\n handle\n id\n publishedAt\n title\n trackingParameters\n vendor\n selectedOrFirstAvailableVariant(\n selectedOptions: []\n ignoreUnknownOptions: true\n caseInsensitiveMatch: true\n ) {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n\n #graphql\n fragment SearchPage on Page {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment SearchArticle on Article {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment PageInfoFragment on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n': {
|
|
1246
1229
|
return: RegularSearchQuery;
|
|
1247
1230
|
variables: RegularSearchQueryVariables;
|
|
1248
1231
|
};
|
|
1249
|
-
'#graphql\n query PredictiveSearch(\n $country: CountryCode\n $language: LanguageCode\n $limit: Int!\n $limitScope: PredictiveSearchLimitScope!\n $term: String!\n $types: [PredictiveSearchType!]\n ) @inContext(country: $country, language: $language) {\n predictiveSearch(\n limit: $limit,\n limitScope: $limitScope,\n query: $term,\n types: $types,\n ) {\n articles {\n ...PredictiveArticle\n }\n collections {\n ...PredictiveCollection\n }\n pages {\n ...PredictivePage\n }\n products {\n ...PredictiveProduct\n }\n queries {\n ...PredictiveQuery\n }\n }\n }\n #graphql\n fragment PredictiveArticle on Article {\n __typename\n id\n title\n handle\n blog {\n handle\n }\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n\n #graphql\n fragment PredictiveCollection on Collection {\n __typename\n id\n title\n handle\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n\n #graphql\n fragment PredictivePage on Page {\n __typename\n id\n title\n handle\n trackingParameters\n }\n\n #graphql\n fragment PredictiveProduct on Product {\n __typename\n id\n title\n handle\n trackingParameters\n
|
|
1232
|
+
'#graphql\n query PredictiveSearch(\n $country: CountryCode\n $language: LanguageCode\n $limit: Int!\n $limitScope: PredictiveSearchLimitScope!\n $term: String!\n $types: [PredictiveSearchType!]\n ) @inContext(country: $country, language: $language) {\n predictiveSearch(\n limit: $limit,\n limitScope: $limitScope,\n query: $term,\n types: $types,\n ) {\n articles {\n ...PredictiveArticle\n }\n collections {\n ...PredictiveCollection\n }\n pages {\n ...PredictivePage\n }\n products {\n ...PredictiveProduct\n }\n queries {\n ...PredictiveQuery\n }\n }\n }\n #graphql\n fragment PredictiveArticle on Article {\n __typename\n id\n title\n handle\n blog {\n handle\n }\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n\n #graphql\n fragment PredictiveCollection on Collection {\n __typename\n id\n title\n handle\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n\n #graphql\n fragment PredictivePage on Page {\n __typename\n id\n title\n handle\n trackingParameters\n }\n\n #graphql\n fragment PredictiveProduct on Product {\n __typename\n id\n title\n handle\n trackingParameters\n selectedOrFirstAvailableVariant(\n selectedOptions: []\n ignoreUnknownOptions: true\n caseInsensitiveMatch: true\n ) {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n }\n }\n\n #graphql\n fragment PredictiveQuery on SearchQuerySuggestion {\n __typename\n text\n styledText\n trackingParameters\n }\n\n': {
|
|
1250
1233
|
return: PredictiveSearchQuery;
|
|
1251
1234
|
variables: PredictiveSearchQueryVariables;
|
|
1252
1235
|
};
|
|
@@ -10,6 +10,7 @@ import { resolvePath, relativePath } from '@shopify/cli-kit/node/path';
|
|
|
10
10
|
import { renderWarning, renderSelectPrompt, renderConfirmationPrompt, renderSuccess, renderTasks } from '@shopify/cli-kit/node/ui';
|
|
11
11
|
import { ciPlatform } from '@shopify/cli-kit/node/context/local';
|
|
12
12
|
import { parseToken, createDeploy } from '@shopify/oxygen-cli/deploy';
|
|
13
|
+
import { createRequire } from 'node:module';
|
|
13
14
|
import { findEnvironmentOrThrow, findEnvironmentByBranchOrThrow, orderEnvironmentsBySafety, createEnvironmentCliChoiceLabel } from '../../lib/common.js';
|
|
14
15
|
import { execAsync } from '../../lib/process.js';
|
|
15
16
|
import { commonFlags, overrideFlag, flagsToCamelObject } from '../../lib/flags.js';
|
|
@@ -18,7 +19,7 @@ import { runClassicCompilerBuild } from '../../lib/classic-compiler/build.js';
|
|
|
18
19
|
import { runBuild } from './build.js';
|
|
19
20
|
import { getViteConfig } from '../../lib/vite-config.js';
|
|
20
21
|
import { prepareDiffDirectory } from '../../lib/template-diff.js';
|
|
21
|
-
import { isClassicProject } from '../../lib/remix-config.js';
|
|
22
|
+
import { isClassicProject, getProjectPaths } from '../../lib/remix-config.js';
|
|
22
23
|
import { packageManagers } from '../../lib/package-managers.js';
|
|
23
24
|
import { setupResourceCleanup } from '../../lib/resource-cleanup.js';
|
|
24
25
|
|
|
@@ -341,6 +342,7 @@ ${changedFiles.trimEnd()}`;
|
|
|
341
342
|
workerDir = "dist/server";
|
|
342
343
|
}
|
|
343
344
|
}
|
|
345
|
+
const metadataHydrogenVersion = await getHydrogenVersion({ appPath: root });
|
|
344
346
|
const config = {
|
|
345
347
|
assetsDir,
|
|
346
348
|
bugsnag: true,
|
|
@@ -355,7 +357,8 @@ ${changedFiles.trimEnd()}`;
|
|
|
355
357
|
...metadataDescription ? { description: metadataDescription } : {},
|
|
356
358
|
...metadataUrl ? { url: metadataUrl } : {},
|
|
357
359
|
...metadataUser ? { user: metadataUser } : {},
|
|
358
|
-
...metadataVersion ? { version: metadataVersion } : {}
|
|
360
|
+
...metadataVersion ? { version: metadataVersion } : {},
|
|
361
|
+
...metadataHydrogenVersion ? { hydrogenVersion: metadataHydrogenVersion } : {}
|
|
359
362
|
},
|
|
360
363
|
skipVerification: noVerify,
|
|
361
364
|
rootPath: root,
|
|
@@ -512,5 +515,13 @@ Continue?`.value
|
|
|
512
515
|
});
|
|
513
516
|
return deployPromise;
|
|
514
517
|
}
|
|
518
|
+
async function getHydrogenVersion({ appPath }) {
|
|
519
|
+
const { root } = getProjectPaths(appPath);
|
|
520
|
+
const require2 = createRequire(import.meta.url);
|
|
521
|
+
const { version } = require2(require2.resolve("@shopify/hydrogen/package.json", {
|
|
522
|
+
paths: [root]
|
|
523
|
+
}));
|
|
524
|
+
return version;
|
|
525
|
+
}
|
|
515
526
|
|
|
516
|
-
export { Deploy as default, deploymentLogger, runDeploy };
|
|
527
|
+
export { Deploy as default, deploymentLogger, getHydrogenVersion, runDeploy };
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"@shopify:registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
7
|
-
"version": "9.0.
|
|
7
|
+
"version": "9.0.3",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"scripts": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ast-grep/napi": "0.11.0",
|
|
36
36
|
"@oclif/core": "3.26.5",
|
|
37
|
-
"@shopify/cli-kit": "3.
|
|
38
|
-
"@shopify/oxygen-cli": "4.
|
|
39
|
-
"@shopify/plugin-cloudflare": "3.
|
|
37
|
+
"@shopify/cli-kit": "^3.72.0",
|
|
38
|
+
"@shopify/oxygen-cli": "4.6.0",
|
|
39
|
+
"@shopify/plugin-cloudflare": "3.72.0",
|
|
40
40
|
"ansi-escapes": "^6.2.0",
|
|
41
41
|
"chokidar": "3.5.3",
|
|
42
42
|
"cli-truncate": "^4.0.0",
|