@shopify/hydrogen 1.6.4 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{node/framework → build}/graphiql.js +21 -10
- package/dist/build/index.cjs +133 -0
- package/dist/build/index.cjs.map +1 -0
- package/dist/build/index.d.ts +6 -0
- package/dist/build/index.js +131 -0
- package/dist/build/index.js.map +1 -0
- package/dist/development/index.cjs +632 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +619 -0
- package/dist/development/index.js.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/production/index.cjs +32 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.d.ts +215 -0
- package/dist/production/index.js +19 -0
- package/dist/production/index.js.map +1 -0
- package/dist/templates/[route-manifest.json].jsx +41 -0
- package/dist/templates/admin.jsx +16 -0
- package/package.json +42 -145
- package/src/templates/routes/[route-manifest.json].tsx +54 -0
- package/src/templates/routes/admin.tsx +15 -0
- package/README.md +0 -29
- package/dist/esnext/FileSessionStorage.d.ts +0 -1
- package/dist/esnext/FileSessionStorage.js +0 -1
- package/dist/esnext/client.d.ts +0 -16
- package/dist/esnext/client.js +0 -16
- package/dist/esnext/components/AddToCartButton/AddToCartButton.client.d.ts +0 -23
- package/dist/esnext/components/AddToCartButton/AddToCartButton.client.js +0 -49
- package/dist/esnext/components/AddToCartButton/index.d.ts +0 -1
- package/dist/esnext/components/AddToCartButton/index.js +0 -1
- package/dist/esnext/components/BaseButton/BaseButton.client.d.ts +0 -16
- package/dist/esnext/components/BaseButton/BaseButton.client.js +0 -16
- package/dist/esnext/components/BaseButton/index.d.ts +0 -1
- package/dist/esnext/components/BaseButton/index.js +0 -1
- package/dist/esnext/components/BuyNowButton/BuyNowButton.client.d.ts +0 -16
- package/dist/esnext/components/BuyNowButton/BuyNowButton.client.js +0 -27
- package/dist/esnext/components/BuyNowButton/index.d.ts +0 -1
- package/dist/esnext/components/BuyNowButton/index.js +0 -1
- package/dist/esnext/components/CartCheckoutButton/CartCheckoutButton.client.d.ts +0 -11
- package/dist/esnext/components/CartCheckoutButton/CartCheckoutButton.client.js +0 -17
- package/dist/esnext/components/CartCheckoutButton/index.d.ts +0 -1
- package/dist/esnext/components/CartCheckoutButton/index.js +0 -1
- package/dist/esnext/components/CartCost/CartCost.client.d.ts +0 -14
- package/dist/esnext/components/CartCost/CartCost.client.js +0 -29
- package/dist/esnext/components/CartCost/index.d.ts +0 -1
- package/dist/esnext/components/CartCost/index.js +0 -1
- package/dist/esnext/components/CartLineImage/CartLineImage.client.d.ts +0 -9
- package/dist/esnext/components/CartLineImage/CartLineImage.client.js +0 -11
- package/dist/esnext/components/CartLineImage/index.d.ts +0 -1
- package/dist/esnext/components/CartLineImage/index.js +0 -1
- package/dist/esnext/components/CartLinePrice/CartLinePrice.client.d.ts +0 -12
- package/dist/esnext/components/CartLinePrice/CartLinePrice.client.js +0 -18
- package/dist/esnext/components/CartLinePrice/index.d.ts +0 -1
- package/dist/esnext/components/CartLinePrice/index.js +0 -1
- package/dist/esnext/components/CartLineProductTitle/CartLineProductTitle.client.d.ts +0 -8
- package/dist/esnext/components/CartLineProductTitle/CartLineProductTitle.client.js +0 -12
- package/dist/esnext/components/CartLineProductTitle/index.d.ts +0 -1
- package/dist/esnext/components/CartLineProductTitle/index.js +0 -1
- package/dist/esnext/components/CartLineProvider/CartLineProvider.client.d.ts +0 -11
- package/dist/esnext/components/CartLineProvider/CartLineProvider.client.js +0 -8
- package/dist/esnext/components/CartLineProvider/context.d.ts +0 -36
- package/dist/esnext/components/CartLineProvider/context.js +0 -2
- package/dist/esnext/components/CartLineProvider/index.d.ts +0 -2
- package/dist/esnext/components/CartLineProvider/index.js +0 -2
- package/dist/esnext/components/CartLineProvider/tests/fixtures.d.ts +0 -86
- package/dist/esnext/components/CartLineProvider/tests/fixtures.js +0 -34
- package/dist/esnext/components/CartLineQuantity/CartLineQuantity.client.d.ts +0 -8
- package/dist/esnext/components/CartLineQuantity/CartLineQuantity.client.js +0 -12
- package/dist/esnext/components/CartLineQuantity/index.d.ts +0 -1
- package/dist/esnext/components/CartLineQuantity/index.js +0 -1
- package/dist/esnext/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.d.ts +0 -12
- package/dist/esnext/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.js +0 -26
- package/dist/esnext/components/CartLineQuantityAdjustButton/index.d.ts +0 -1
- package/dist/esnext/components/CartLineQuantityAdjustButton/index.js +0 -1
- package/dist/esnext/components/CartLines/CartLines.client.d.ts +0 -15
- package/dist/esnext/components/CartLines/CartLines.client.js +0 -17
- package/dist/esnext/components/CartLines/index.d.ts +0 -1
- package/dist/esnext/components/CartLines/index.js +0 -1
- package/dist/esnext/components/CartProvider/CartActions.client.d.ts +0 -61
- package/dist/esnext/components/CartProvider/CartActions.client.js +0 -132
- package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +0 -49
- package/dist/esnext/components/CartProvider/CartProvider.client.js +0 -435
- package/dist/esnext/components/CartProvider/cart-queries.d.ts +0 -10
- package/dist/esnext/components/CartProvider/cart-queries.js +0 -206
- package/dist/esnext/components/CartProvider/constants.d.ts +0 -2
- package/dist/esnext/components/CartProvider/constants.js +0 -2
- package/dist/esnext/components/CartProvider/context.d.ts +0 -2
- package/dist/esnext/components/CartProvider/context.js +0 -2
- package/dist/esnext/components/CartProvider/graphql/CartAttributesUpdateMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartAttributesUpdateMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartCreateMutation.d.ts +0 -95
- package/dist/esnext/components/CartProvider/graphql/CartCreateMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartFragment.d.ts +0 -82
- package/dist/esnext/components/CartProvider/graphql/CartFragment.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartLineAddMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartLineAddMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartLineRemoveMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartLineRemoveMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartLineUpdateMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartLineUpdateMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartNoteUpdateMutation.d.ts +0 -96
- package/dist/esnext/components/CartProvider/graphql/CartNoteUpdateMutation.js +0 -1
- package/dist/esnext/components/CartProvider/graphql/CartQuery.d.ts +0 -91
- package/dist/esnext/components/CartProvider/graphql/CartQuery.js +0 -1
- package/dist/esnext/components/CartProvider/hooks.client.d.ts +0 -15
- package/dist/esnext/components/CartProvider/hooks.client.js +0 -71
- package/dist/esnext/components/CartProvider/index.d.ts +0 -4
- package/dist/esnext/components/CartProvider/index.js +0 -3
- package/dist/esnext/components/CartProvider/tests/fixtures.d.ts +0 -254
- package/dist/esnext/components/CartProvider/tests/fixtures.js +0 -53
- package/dist/esnext/components/CartProvider/types.d.ts +0 -275
- package/dist/esnext/components/CartProvider/types.js +0 -1
- package/dist/esnext/components/CartProvider/useCartAPIStateMachine.client.d.ts +0 -21
- package/dist/esnext/components/CartProvider/useCartAPIStateMachine.client.js +0 -266
- package/dist/esnext/components/CartShopPayButton/CartShopPayButton.client.d.ts +0 -7
- package/dist/esnext/components/CartShopPayButton/CartShopPayButton.client.js +0 -17
- package/dist/esnext/components/CartShopPayButton/index.d.ts +0 -1
- package/dist/esnext/components/CartShopPayButton/index.js +0 -1
- package/dist/esnext/components/ExternalVideo/ExternalVideo.d.ts +0 -21
- package/dist/esnext/components/ExternalVideo/ExternalVideo.js +0 -14
- package/dist/esnext/components/ExternalVideo/index.d.ts +0 -1
- package/dist/esnext/components/ExternalVideo/index.js +0 -1
- package/dist/esnext/components/Image/Image.d.ts +0 -105
- package/dist/esnext/components/Image/Image.js +0 -145
- package/dist/esnext/components/Image/index.d.ts +0 -2
- package/dist/esnext/components/Image/index.js +0 -1
- package/dist/esnext/components/Link/Link.client.d.ts +0 -27
- package/dist/esnext/components/Link/Link.client.js +0 -145
- package/dist/esnext/components/Link/index.d.ts +0 -1
- package/dist/esnext/components/Link/index.js +0 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.d.ts +0 -6
- package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.js +0 -5
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.d.ts +0 -22
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.js +0 -23
- package/dist/esnext/components/LocalizationProvider/index.d.ts +0 -1
- package/dist/esnext/components/LocalizationProvider/index.js +0 -1
- package/dist/esnext/components/MediaFile/MediaFile.d.ts +0 -19
- package/dist/esnext/components/MediaFile/MediaFile.js +0 -32
- package/dist/esnext/components/MediaFile/index.d.ts +0 -1
- package/dist/esnext/components/MediaFile/index.js +0 -1
- package/dist/esnext/components/Metafield/Metafield.client.d.ts +0 -17
- package/dist/esnext/components/Metafield/Metafield.client.js +0 -102
- package/dist/esnext/components/Metafield/components/StarRating/StarRating.d.ts +0 -12
- package/dist/esnext/components/Metafield/components/StarRating/StarRating.js +0 -48
- package/dist/esnext/components/Metafield/components/StarRating/index.d.ts +0 -1
- package/dist/esnext/components/Metafield/components/StarRating/index.js +0 -1
- package/dist/esnext/components/Metafield/components/index.d.ts +0 -1
- package/dist/esnext/components/Metafield/components/index.js +0 -1
- package/dist/esnext/components/Metafield/index.d.ts +0 -2
- package/dist/esnext/components/Metafield/index.js +0 -1
- package/dist/esnext/components/Metafield/types.d.ts +0 -4
- package/dist/esnext/components/Metafield/types.js +0 -1
- package/dist/esnext/components/ModelViewer/ModelViewer.client.d.ts +0 -128
- package/dist/esnext/components/ModelViewer/ModelViewer.client.js +0 -104
- package/dist/esnext/components/ModelViewer/index.d.ts +0 -1
- package/dist/esnext/components/ModelViewer/index.js +0 -1
- package/dist/esnext/components/Money/Money.client.d.ts +0 -25
- package/dist/esnext/components/Money/Money.client.js +0 -39
- package/dist/esnext/components/Money/index.d.ts +0 -1
- package/dist/esnext/components/Money/index.js +0 -1
- package/dist/esnext/components/ProductOptionsProvider/ProductOptionsProvider.client.d.ts +0 -21
- package/dist/esnext/components/ProductOptionsProvider/ProductOptionsProvider.client.js +0 -133
- package/dist/esnext/components/ProductOptionsProvider/context.d.ts +0 -2
- package/dist/esnext/components/ProductOptionsProvider/context.js +0 -2
- package/dist/esnext/components/ProductOptionsProvider/index.d.ts +0 -1
- package/dist/esnext/components/ProductOptionsProvider/index.js +0 -1
- package/dist/esnext/components/ProductPrice/ProductPrice.client.d.ts +0 -18
- package/dist/esnext/components/ProductPrice/ProductPrice.client.js +0 -54
- package/dist/esnext/components/ProductPrice/index.d.ts +0 -1
- package/dist/esnext/components/ProductPrice/index.js +0 -1
- package/dist/esnext/components/Seo/CollectionSeo.client.d.ts +0 -3
- package/dist/esnext/components/Seo/CollectionSeo.client.js +0 -14
- package/dist/esnext/components/Seo/DefaultPageSeo.client.d.ts +0 -3
- package/dist/esnext/components/Seo/DefaultPageSeo.client.js +0 -18
- package/dist/esnext/components/Seo/DescriptionSeo.client.d.ts +0 -4
- package/dist/esnext/components/Seo/DescriptionSeo.client.js +0 -10
- package/dist/esnext/components/Seo/HomePageSeo.client.d.ts +0 -2
- package/dist/esnext/components/Seo/HomePageSeo.client.js +0 -25
- package/dist/esnext/components/Seo/ImageSeo.client.d.ts +0 -3
- package/dist/esnext/components/Seo/ImageSeo.client.js +0 -10
- package/dist/esnext/components/Seo/NoIndexSeo.client.d.ts +0 -3
- package/dist/esnext/components/Seo/NoIndexSeo.client.js +0 -10
- package/dist/esnext/components/Seo/PageSeo.client.d.ts +0 -3
- package/dist/esnext/components/Seo/PageSeo.client.js +0 -12
- package/dist/esnext/components/Seo/ProductSeo.client.d.ts +0 -5
- package/dist/esnext/components/Seo/ProductSeo.client.js +0 -62
- package/dist/esnext/components/Seo/Seo.client.d.ts +0 -30
- package/dist/esnext/components/Seo/Seo.client.js +0 -31
- package/dist/esnext/components/Seo/TitleSeo.client.d.ts +0 -3
- package/dist/esnext/components/Seo/TitleSeo.client.js +0 -10
- package/dist/esnext/components/Seo/TwitterSeo.client.d.ts +0 -2
- package/dist/esnext/components/Seo/TwitterSeo.client.js +0 -9
- package/dist/esnext/components/Seo/index.d.ts +0 -1
- package/dist/esnext/components/Seo/index.js +0 -1
- package/dist/esnext/components/Seo/seo-types.d.ts +0 -18
- package/dist/esnext/components/Seo/seo-types.js +0 -1
- package/dist/esnext/components/ShopPayButton/ShopPayButton.client.d.ts +0 -40
- package/dist/esnext/components/ShopPayButton/ShopPayButton.client.js +0 -56
- package/dist/esnext/components/ShopPayButton/index.d.ts +0 -1
- package/dist/esnext/components/ShopPayButton/index.js +0 -1
- package/dist/esnext/components/Video/Video.d.ts +0 -19
- package/dist/esnext/components/Video/Video.js +0 -23
- package/dist/esnext/components/Video/index.d.ts +0 -1
- package/dist/esnext/components/Video/index.js +0 -1
- package/dist/esnext/components/index.d.ts +0 -27
- package/dist/esnext/components/index.js +0 -25
- package/dist/esnext/components/types.d.ts +0 -71
- package/dist/esnext/components/types.js +0 -10
- package/dist/esnext/config.d.ts +0 -7
- package/dist/esnext/config.js +0 -5
- package/dist/esnext/constants.d.ts +0 -14
- package/dist/esnext/constants.js +0 -14
- package/dist/esnext/entry-client.d.ts +0 -3
- package/dist/esnext/entry-client.js +0 -197
- package/dist/esnext/entry-server.d.ts +0 -6
- package/dist/esnext/entry-server.js +0 -642
- package/dist/esnext/experimental.d.ts +0 -2
- package/dist/esnext/experimental.js +0 -2
- package/dist/esnext/foundation/Analytics/Analytics.client.d.ts +0 -3
- package/dist/esnext/foundation/Analytics/Analytics.client.js +0 -30
- package/dist/esnext/foundation/Analytics/Analytics.server.d.ts +0 -1
- package/dist/esnext/foundation/Analytics/Analytics.server.js +0 -47
- package/dist/esnext/foundation/Analytics/ClientAnalytics.d.ts +0 -27
- package/dist/esnext/foundation/Analytics/ClientAnalytics.js +0 -99
- package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.d.ts +0 -4
- package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.js +0 -51
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.d.ts +0 -7
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.js +0 -83
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetricsDebug.client.d.ts +0 -1
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetricsDebug.client.js +0 -23
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/ServerAnalyticsConnector.d.ts +0 -3
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/ServerAnalyticsConnector.js +0 -7
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ServerAnalyticsConnector.d.ts +0 -3
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ServerAnalyticsConnector.js +0 -7
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.client.d.ts +0 -3
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.client.js +0 -191
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.server.d.ts +0 -3
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.server.js +0 -49
- package/dist/esnext/foundation/Analytics/connectors/Shopify/const.d.ts +0 -31
- package/dist/esnext/foundation/Analytics/connectors/Shopify/const.js +0 -54
- package/dist/esnext/foundation/Analytics/connectors/Shopify/customer-events.client.d.ts +0 -2
- package/dist/esnext/foundation/Analytics/connectors/Shopify/customer-events.client.js +0 -182
- package/dist/esnext/foundation/Analytics/connectors/Shopify/utils.d.ts +0 -6
- package/dist/esnext/foundation/Analytics/connectors/Shopify/utils.js +0 -125
- package/dist/esnext/foundation/Analytics/const.d.ts +0 -9
- package/dist/esnext/foundation/Analytics/const.js +0 -9
- package/dist/esnext/foundation/Analytics/hook.d.ts +0 -1
- package/dist/esnext/foundation/Analytics/hook.js +0 -9
- package/dist/esnext/foundation/Analytics/index.d.ts +0 -1
- package/dist/esnext/foundation/Analytics/index.js +0 -1
- package/dist/esnext/foundation/Analytics/types.d.ts +0 -5
- package/dist/esnext/foundation/Analytics/types.js +0 -1
- package/dist/esnext/foundation/Analytics/utils.d.ts +0 -3
- package/dist/esnext/foundation/Analytics/utils.js +0 -29
- package/dist/esnext/foundation/AnalyticsErrorBoundary.client.d.ts +0 -4
- package/dist/esnext/foundation/AnalyticsErrorBoundary.client.js +0 -8
- package/dist/esnext/foundation/BuiltInRoutes/BuiltInRoutes.d.ts +0 -2
- package/dist/esnext/foundation/BuiltInRoutes/BuiltInRoutes.js +0 -23
- package/dist/esnext/foundation/BuiltInRoutes/healthCheck.d.ts +0 -1
- package/dist/esnext/foundation/BuiltInRoutes/healthCheck.js +0 -3
- package/dist/esnext/foundation/Cache/cache-sub-request.d.ts +0 -17
- package/dist/esnext/foundation/Cache/cache-sub-request.js +0 -64
- package/dist/esnext/foundation/Cache/cache.d.ts +0 -17
- package/dist/esnext/foundation/Cache/cache.js +0 -126
- package/dist/esnext/foundation/Cache/strategies/index.d.ts +0 -7
- package/dist/esnext/foundation/Cache/strategies/index.js +0 -54
- package/dist/esnext/foundation/Cookie/Cookie.d.ts +0 -48
- package/dist/esnext/foundation/Cookie/Cookie.js +0 -72
- package/dist/esnext/foundation/CookieSessionStorage/CookieSessionStorage.d.ts +0 -5
- package/dist/esnext/foundation/CookieSessionStorage/CookieSessionStorage.js +0 -32
- package/dist/esnext/foundation/DevTools/DevTools.client.d.ts +0 -3
- package/dist/esnext/foundation/DevTools/DevTools.client.js +0 -17
- package/dist/esnext/foundation/DevTools/DevTools.server.d.ts +0 -1
- package/dist/esnext/foundation/DevTools/DevTools.server.js +0 -15
- package/dist/esnext/foundation/DevTools/components/GraphQL.client.d.ts +0 -1
- package/dist/esnext/foundation/DevTools/components/GraphQL.client.js +0 -25
- package/dist/esnext/foundation/DevTools/components/Heading.d.ts +0 -5
- package/dist/esnext/foundation/DevTools/components/Heading.js +0 -12
- package/dist/esnext/foundation/DevTools/components/Interface.client.d.ts +0 -11
- package/dist/esnext/foundation/DevTools/components/Interface.client.js +0 -47
- package/dist/esnext/foundation/DevTools/components/Panels.d.ts +0 -8
- package/dist/esnext/foundation/DevTools/components/Panels.js +0 -66
- package/dist/esnext/foundation/DevTools/components/Performance.client.d.ts +0 -14
- package/dist/esnext/foundation/DevTools/components/Performance.client.js +0 -25
- package/dist/esnext/foundation/DevTools/components/Settings.client.d.ts +0 -8
- package/dist/esnext/foundation/DevTools/components/Settings.client.js +0 -17
- package/dist/esnext/foundation/DevTools/components/Table.d.ts +0 -9
- package/dist/esnext/foundation/DevTools/components/Table.js +0 -7
- package/dist/esnext/foundation/DevTools/components/icons.d.ts +0 -2
- package/dist/esnext/foundation/DevTools/components/icons.js +0 -13
- package/dist/esnext/foundation/DevTools/components/index.d.ts +0 -2
- package/dist/esnext/foundation/DevTools/components/index.js +0 -2
- package/dist/esnext/foundation/FileRoutes/FileRoutes.server.d.ts +0 -22
- package/dist/esnext/foundation/FileRoutes/FileRoutes.server.js +0 -69
- package/dist/esnext/foundation/FileSessionStorage/FileSessionStorage.d.ts +0 -6
- package/dist/esnext/foundation/FileSessionStorage/FileSessionStorage.js +0 -149
- package/dist/esnext/foundation/Form/Form.client.d.ts +0 -14
- package/dist/esnext/foundation/Form/Form.client.js +0 -51
- package/dist/esnext/foundation/Head/Head.client.d.ts +0 -5
- package/dist/esnext/foundation/Head/Head.client.js +0 -10
- package/dist/esnext/foundation/Head/index.d.ts +0 -1
- package/dist/esnext/foundation/Head/index.js +0 -1
- package/dist/esnext/foundation/Html/Html.d.ts +0 -13
- package/dist/esnext/foundation/Html/Html.js +0 -96
- package/dist/esnext/foundation/HydrogenRequest/HydrogenRequest.server.d.ts +0 -78
- package/dist/esnext/foundation/HydrogenRequest/HydrogenRequest.server.js +0 -206
- package/dist/esnext/foundation/HydrogenResponse/HydrogenResponse.server.d.ts +0 -23
- package/dist/esnext/foundation/HydrogenResponse/HydrogenResponse.server.js +0 -49
- package/dist/esnext/foundation/MemorySessionStorage/MemorySessionStorage.d.ts +0 -5
- package/dist/esnext/foundation/MemorySessionStorage/MemorySessionStorage.js +0 -53
- package/dist/esnext/foundation/Redirect/Redirect.client.d.ts +0 -5
- package/dist/esnext/foundation/Redirect/Redirect.client.js +0 -15
- package/dist/esnext/foundation/Route/Route.server.d.ts +0 -14
- package/dist/esnext/foundation/Route/Route.server.js +0 -28
- package/dist/esnext/foundation/Router/BrowserRouter.client.d.ts +0 -14
- package/dist/esnext/foundation/Router/BrowserRouter.client.js +0 -144
- package/dist/esnext/foundation/Router/Router.server.d.ts +0 -10
- package/dist/esnext/foundation/Router/Router.server.js +0 -8
- package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.d.ts +0 -43
- package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.js +0 -65
- package/dist/esnext/foundation/ServerPropsProvider/index.d.ts +0 -1
- package/dist/esnext/foundation/ServerPropsProvider/index.js +0 -1
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.d.ts +0 -23
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.js +0 -125
- package/dist/esnext/foundation/ServerRequestProvider/index.d.ts +0 -1
- package/dist/esnext/foundation/ServerRequestProvider/index.js +0 -1
- package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.d.ts +0 -30
- package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.js +0 -59
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.client.d.ts +0 -9
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.client.js +0 -10
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.d.ts +0 -19
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +0 -94
- package/dist/esnext/foundation/ShopifyProvider/index.d.ts +0 -1
- package/dist/esnext/foundation/ShopifyProvider/index.js +0 -1
- package/dist/esnext/foundation/ShopifyProvider/types.d.ts +0 -35
- package/dist/esnext/foundation/ShopifyProvider/types.js +0 -1
- package/dist/esnext/foundation/constants.d.ts +0 -2
- package/dist/esnext/foundation/constants.js +0 -4
- package/dist/esnext/foundation/fetchSync/ResponseSync.d.ts +0 -15
- package/dist/esnext/foundation/fetchSync/ResponseSync.js +0 -50
- package/dist/esnext/foundation/fetchSync/client/fetchSync.d.ts +0 -10
- package/dist/esnext/foundation/fetchSync/client/fetchSync.js +0 -23
- package/dist/esnext/foundation/fetchSync/server/fetchSync.d.ts +0 -8
- package/dist/esnext/foundation/fetchSync/server/fetchSync.js +0 -39
- package/dist/esnext/foundation/index.d.ts +0 -3
- package/dist/esnext/foundation/index.js +0 -3
- package/dist/esnext/foundation/runtime.d.ts +0 -2
- package/dist/esnext/foundation/runtime.js +0 -6
- package/dist/esnext/foundation/session/session-types.d.ts +0 -15
- package/dist/esnext/foundation/session/session-types.js +0 -1
- package/dist/esnext/foundation/session/session.d.ts +0 -18
- package/dist/esnext/foundation/session/session.js +0 -53
- package/dist/esnext/foundation/ssr-interop.d.ts +0 -29
- package/dist/esnext/foundation/ssr-interop.js +0 -35
- package/dist/esnext/foundation/useNavigate/useNavigate.d.ts +0 -17
- package/dist/esnext/foundation/useNavigate/useNavigate.js +0 -39
- package/dist/esnext/foundation/useQuery/hooks.d.ts +0 -41
- package/dist/esnext/foundation/useQuery/hooks.js +0 -105
- package/dist/esnext/foundation/useQuery/index.d.ts +0 -1
- package/dist/esnext/foundation/useQuery/index.js +0 -1
- package/dist/esnext/foundation/useRequestContext/index.d.ts +0 -15
- package/dist/esnext/foundation/useRequestContext/index.js +0 -23
- package/dist/esnext/foundation/useRouteParams/RouteParamsProvider.client.d.ts +0 -13
- package/dist/esnext/foundation/useRouteParams/RouteParamsProvider.client.js +0 -12
- package/dist/esnext/foundation/useRouteParams/useRouteParams.d.ts +0 -4
- package/dist/esnext/foundation/useRouteParams/useRouteParams.js +0 -9
- package/dist/esnext/foundation/useServerProps/index.d.ts +0 -1
- package/dist/esnext/foundation/useServerProps/index.js +0 -1
- package/dist/esnext/foundation/useServerProps/use-server-props.d.ts +0 -21
- package/dist/esnext/foundation/useServerProps/use-server-props.js +0 -35
- package/dist/esnext/foundation/useSession/useSession.d.ts +0 -3
- package/dist/esnext/foundation/useSession/useSession.js +0 -20
- package/dist/esnext/foundation/useShop/index.d.ts +0 -1
- package/dist/esnext/foundation/useShop/index.js +0 -1
- package/dist/esnext/foundation/useShop/use-shop.d.ts +0 -6
- package/dist/esnext/foundation/useShop/use-shop.js +0 -14
- package/dist/esnext/foundation/useUrl/index.d.ts +0 -1
- package/dist/esnext/foundation/useUrl/index.js +0 -1
- package/dist/esnext/foundation/useUrl/useUrl.d.ts +0 -4
- package/dist/esnext/foundation/useUrl/useUrl.js +0 -29
- package/dist/esnext/framework/cache/in-memory.d.ts +0 -17
- package/dist/esnext/framework/cache/in-memory.js +0 -80
- package/dist/esnext/framework/graphiql.d.ts +0 -1
- package/dist/esnext/framework/graphiql.js +0 -34
- package/dist/esnext/framework/load-config.d.ts +0 -5
- package/dist/esnext/framework/load-config.js +0 -7
- package/dist/esnext/framework/middleware.d.ts +0 -21
- package/dist/esnext/framework/middleware.js +0 -97
- package/dist/esnext/framework/plugin.d.ts +0 -8
- package/dist/esnext/framework/plugin.js +0 -35
- package/dist/esnext/framework/plugins/vite-plugin-assets-version.d.ts +0 -2
- package/dist/esnext/framework/plugins/vite-plugin-assets-version.js +0 -12
- package/dist/esnext/framework/plugins/vite-plugin-client-imports.d.ts +0 -2
- package/dist/esnext/framework/plugins/vite-plugin-client-imports.js +0 -28
- package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.d.ts +0 -2
- package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.js +0 -101
- package/dist/esnext/framework/plugins/vite-plugin-css-rsc.d.ts +0 -2
- package/dist/esnext/framework/plugins/vite-plugin-css-rsc.js +0 -213
- package/dist/esnext/framework/plugins/vite-plugin-hydration-auto-import.d.ts +0 -3
- package/dist/esnext/framework/plugins/vite-plugin-hydration-auto-import.js +0 -41
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-client-components-cache.d.ts +0 -3
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-client-components-cache.js +0 -36
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.d.ts +0 -4
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +0 -113
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +0 -11
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +0 -60
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +0 -2
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.js +0 -23
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-suppress-warnings.d.ts +0 -3
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-suppress-warnings.js +0 -24
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +0 -7
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.js +0 -149
- package/dist/esnext/framework/plugins/vite-plugin-platform-entry.d.ts +0 -3
- package/dist/esnext/framework/plugins/vite-plugin-platform-entry.js +0 -112
- package/dist/esnext/framework/plugins/vite-plugin-ssr-interop.d.ts +0 -3
- package/dist/esnext/framework/plugins/vite-plugin-ssr-interop.js +0 -20
- package/dist/esnext/framework/types.d.ts +0 -20
- package/dist/esnext/framework/types.js +0 -1
- package/dist/esnext/framework/viteception.d.ts +0 -5
- package/dist/esnext/framework/viteception.js +0 -22
- package/dist/esnext/hooks/index.d.ts +0 -6
- package/dist/esnext/hooks/index.js +0 -6
- package/dist/esnext/hooks/useCart/index.d.ts +0 -1
- package/dist/esnext/hooks/useCart/index.js +0 -1
- package/dist/esnext/hooks/useCart/useCart.d.ts +0 -4
- package/dist/esnext/hooks/useCart/useCart.js +0 -12
- package/dist/esnext/hooks/useCartLine/index.d.ts +0 -1
- package/dist/esnext/hooks/useCartLine/index.js +0 -1
- package/dist/esnext/hooks/useCartLine/useCartLine.d.ts +0 -39
- package/dist/esnext/hooks/useCartLine/useCartLine.js +0 -12
- package/dist/esnext/hooks/useDelay/useDelay.d.ts +0 -1
- package/dist/esnext/hooks/useDelay/useDelay.js +0 -17
- package/dist/esnext/hooks/useLoadScript/index.d.ts +0 -1
- package/dist/esnext/hooks/useLoadScript/index.js +0 -1
- package/dist/esnext/hooks/useLoadScript/useLoadScript.client.d.ts +0 -8
- package/dist/esnext/hooks/useLoadScript/useLoadScript.client.js +0 -23
- package/dist/esnext/hooks/useLocalization/useLocalization.d.ts +0 -4
- package/dist/esnext/hooks/useLocalization/useLocalization.js +0 -9
- package/dist/esnext/hooks/useMeasurement/hooks.d.ts +0 -9
- package/dist/esnext/hooks/useMeasurement/hooks.js +0 -13
- package/dist/esnext/hooks/useMeasurement/index.d.ts +0 -1
- package/dist/esnext/hooks/useMeasurement/index.js +0 -1
- package/dist/esnext/hooks/useMoney/hooks.d.ts +0 -54
- package/dist/esnext/hooks/useMoney/hooks.js +0 -80
- package/dist/esnext/hooks/useMoney/index.d.ts +0 -1
- package/dist/esnext/hooks/useMoney/index.js +0 -1
- package/dist/esnext/hooks/useProductOptions/helpers.d.ts +0 -6
- package/dist/esnext/hooks/useProductOptions/helpers.js +0 -36
- package/dist/esnext/hooks/useProductOptions/index.d.ts +0 -2
- package/dist/esnext/hooks/useProductOptions/index.js +0 -2
- package/dist/esnext/hooks/useProductOptions/types.d.ts +0 -44
- package/dist/esnext/hooks/useProductOptions/types.js +0 -1
- package/dist/esnext/hooks/useProductOptions/useProductOptions.client.d.ts +0 -1
- package/dist/esnext/hooks/useProductOptions/useProductOptions.client.js +0 -9
- package/dist/esnext/hooks/useShopQuery/hooks.d.ts +0 -28
- package/dist/esnext/hooks/useShopQuery/hooks.js +0 -176
- package/dist/esnext/hooks/useShopQuery/index.d.ts +0 -1
- package/dist/esnext/hooks/useShopQuery/index.js +0 -1
- package/dist/esnext/index.d.ts +0 -45
- package/dist/esnext/index.js +0 -41
- package/dist/esnext/node.d.ts +0 -1
- package/dist/esnext/node.js +0 -1
- package/dist/esnext/platforms/index.d.ts +0 -1
- package/dist/esnext/platforms/index.js +0 -1
- package/dist/esnext/platforms/node.d.ts +0 -9
- package/dist/esnext/platforms/node.js +0 -35
- package/dist/esnext/platforms/virtual.d.ts +0 -8
- package/dist/esnext/platforms/virtual.js +0 -12
- package/dist/esnext/platforms/worker-event.d.ts +0 -1
- package/dist/esnext/platforms/worker-event.js +0 -3
- package/dist/esnext/platforms/worker.d.ts +0 -14
- package/dist/esnext/platforms/worker.js +0 -25
- package/dist/esnext/shared-types.d.ts +0 -31
- package/dist/esnext/shared-types.js +0 -4
- package/dist/esnext/storefront-api-types.d.ts +0 -6326
- package/dist/esnext/storefront-api-types.js +0 -1775
- package/dist/esnext/streaming.server.d.ts +0 -16
- package/dist/esnext/streaming.server.js +0 -24
- package/dist/esnext/testing.d.ts +0 -2
- package/dist/esnext/testing.js +0 -2
- package/dist/esnext/types.d.ts +0 -117
- package/dist/esnext/types.js +0 -1
- package/dist/esnext/utilities/apiRoutes.d.ts +0 -44
- package/dist/esnext/utilities/apiRoutes.js +0 -200
- package/dist/esnext/utilities/bot-ua.d.ts +0 -4
- package/dist/esnext/utilities/bot-ua.js +0 -65
- package/dist/esnext/utilities/defer.d.ts +0 -6
- package/dist/esnext/utilities/defer.js +0 -14
- package/dist/esnext/utilities/devtools.d.ts +0 -11
- package/dist/esnext/utilities/devtools.js +0 -11
- package/dist/esnext/utilities/empty-hydrogen-config.d.ts +0 -2
- package/dist/esnext/utilities/empty-hydrogen-config.js +0 -2
- package/dist/esnext/utilities/error.d.ts +0 -1
- package/dist/esnext/utilities/error.js +0 -6
- package/dist/esnext/utilities/fetch.d.ts +0 -9
- package/dist/esnext/utilities/fetch.js +0 -34
- package/dist/esnext/utilities/flattenConnection/flattenConnection.d.ts +0 -7
- package/dist/esnext/utilities/flattenConnection/flattenConnection.js +0 -18
- package/dist/esnext/utilities/flattenConnection/index.d.ts +0 -1
- package/dist/esnext/utilities/flattenConnection/index.js +0 -1
- package/dist/esnext/utilities/graphql-tag.d.ts +0 -1
- package/dist/esnext/utilities/graphql-tag.js +0 -6
- package/dist/esnext/utilities/graphql-tracker.d.ts +0 -17
- package/dist/esnext/utilities/graphql-tracker.js +0 -121
- package/dist/esnext/utilities/hash.d.ts +0 -2
- package/dist/esnext/utilities/hash.js +0 -26
- package/dist/esnext/utilities/html-encoding.d.ts +0 -1
- package/dist/esnext/utilities/html-encoding.js +0 -8
- package/dist/esnext/utilities/image_size.d.ts +0 -34
- package/dist/esnext/utilities/image_size.js +0 -96
- package/dist/esnext/utilities/index.d.ts +0 -12
- package/dist/esnext/utilities/index.js +0 -12
- package/dist/esnext/utilities/isBrowser/index.d.ts +0 -1
- package/dist/esnext/utilities/isBrowser/index.js +0 -1
- package/dist/esnext/utilities/isBrowser/isBrowser.d.ts +0 -4
- package/dist/esnext/utilities/isBrowser/isBrowser.js +0 -6
- package/dist/esnext/utilities/isServer/index.d.ts +0 -1
- package/dist/esnext/utilities/isServer/index.js +0 -1
- package/dist/esnext/utilities/isServer/isServer.d.ts +0 -4
- package/dist/esnext/utilities/isServer/isServer.js +0 -7
- package/dist/esnext/utilities/load_script.d.ts +0 -4
- package/dist/esnext/utilities/load_script.js +0 -28
- package/dist/esnext/utilities/locale/index.d.ts +0 -1
- package/dist/esnext/utilities/locale/index.js +0 -1
- package/dist/esnext/utilities/locale/locale.d.ts +0 -7
- package/dist/esnext/utilities/locale/locale.js +0 -22
- package/dist/esnext/utilities/log/index.d.ts +0 -4
- package/dist/esnext/utilities/log/index.js +0 -4
- package/dist/esnext/utilities/log/log-cache-api-status.d.ts +0 -1
- package/dist/esnext/utilities/log/log-cache-api-status.js +0 -17
- package/dist/esnext/utilities/log/log-cache-header.d.ts +0 -10
- package/dist/esnext/utilities/log/log-cache-header.js +0 -30
- package/dist/esnext/utilities/log/log-query-timeline.d.ts +0 -12
- package/dist/esnext/utilities/log/log-query-timeline.js +0 -105
- package/dist/esnext/utilities/log/log.d.ts +0 -28
- package/dist/esnext/utilities/log/log.js +0 -89
- package/dist/esnext/utilities/log/utils.d.ts +0 -3
- package/dist/esnext/utilities/log/utils.js +0 -11
- package/dist/esnext/utilities/matchPath.d.ts +0 -10
- package/dist/esnext/utilities/matchPath.js +0 -54
- package/dist/esnext/utilities/measurement.d.ts +0 -3
- package/dist/esnext/utilities/measurement.js +0 -98
- package/dist/esnext/utilities/object.d.ts +0 -5
- package/dist/esnext/utilities/object.js +0 -7
- package/dist/esnext/utilities/parse.d.ts +0 -2
- package/dist/esnext/utilities/parse.js +0 -28
- package/dist/esnext/utilities/parseMetafield/index.d.ts +0 -1
- package/dist/esnext/utilities/parseMetafield/index.js +0 -1
- package/dist/esnext/utilities/parseMetafield/parseMetafield.d.ts +0 -15
- package/dist/esnext/utilities/parseMetafield/parseMetafield.js +0 -62
- package/dist/esnext/utilities/random.d.ts +0 -1
- package/dist/esnext/utilities/random.js +0 -11
- package/dist/esnext/utilities/storefrontApi.d.ts +0 -8
- package/dist/esnext/utilities/storefrontApi.js +0 -63
- package/dist/esnext/utilities/suspense.d.ts +0 -12
- package/dist/esnext/utilities/suspense.js +0 -58
- package/dist/esnext/utilities/template.d.ts +0 -10
- package/dist/esnext/utilities/template.js +0 -60
- package/dist/esnext/utilities/tests/MockedServerRequestProvider.server.d.ts +0 -6
- package/dist/esnext/utilities/tests/MockedServerRequestProvider.server.js +0 -9
- package/dist/esnext/utilities/tests/price.d.ts +0 -5
- package/dist/esnext/utilities/tests/price.js +0 -8
- package/dist/esnext/utilities/tests/provider-helpers.d.ts +0 -31
- package/dist/esnext/utilities/tests/provider-helpers.js +0 -36
- package/dist/esnext/utilities/timing.d.ts +0 -7
- package/dist/esnext/utilities/timing.js +0 -14
- package/dist/esnext/utilities/video_parameters.d.ts +0 -47
- package/dist/esnext/utilities/video_parameters.js +0 -22
- package/dist/esnext/utilities/vite.d.ts +0 -1
- package/dist/esnext/utilities/vite.js +0 -4
- package/dist/esnext/utilities/web-api-polyfill.d.ts +0 -1
- package/dist/esnext/utilities/web-api-polyfill.js +0 -25
- package/dist/esnext/version.d.ts +0 -1
- package/dist/esnext/version.js +0 -1
- package/dist/node/foundation/session/session-types.d.ts +0 -15
- package/dist/node/foundation/session/session-types.js +0 -2
- package/dist/node/framework/cache/in-memory.d.ts +0 -17
- package/dist/node/framework/cache/in-memory.js +0 -84
- package/dist/node/framework/graphiql.d.ts +0 -1
- package/dist/node/framework/load-config.d.ts +0 -5
- package/dist/node/framework/load-config.js +0 -11
- package/dist/node/framework/middleware.d.ts +0 -21
- package/dist/node/framework/middleware.js +0 -124
- package/dist/node/framework/plugin.d.ts +0 -5
- package/dist/node/framework/plugin.js +0 -40
- package/dist/node/framework/plugins/vite-plugin-assets-version.d.ts +0 -2
- package/dist/node/framework/plugins/vite-plugin-assets-version.js +0 -15
- package/dist/node/framework/plugins/vite-plugin-client-imports.d.ts +0 -2
- package/dist/node/framework/plugins/vite-plugin-client-imports.js +0 -31
- package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.d.ts +0 -2
- package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.js +0 -107
- package/dist/node/framework/plugins/vite-plugin-css-rsc.d.ts +0 -2
- package/dist/node/framework/plugins/vite-plugin-css-rsc.js +0 -219
- package/dist/node/framework/plugins/vite-plugin-hydration-auto-import.d.ts +0 -3
- package/dist/node/framework/plugins/vite-plugin-hydration-auto-import.js +0 -46
- package/dist/node/framework/plugins/vite-plugin-hydrogen-client-components-cache.d.ts +0 -3
- package/dist/node/framework/plugins/vite-plugin-hydrogen-client-components-cache.js +0 -38
- package/dist/node/framework/plugins/vite-plugin-hydrogen-config.d.ts +0 -4
- package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +0 -118
- package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +0 -11
- package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +0 -66
- package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +0 -2
- package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.js +0 -29
- package/dist/node/framework/plugins/vite-plugin-hydrogen-suppress-warnings.d.ts +0 -3
- package/dist/node/framework/plugins/vite-plugin-hydrogen-suppress-warnings.js +0 -26
- package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +0 -7
- package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.js +0 -155
- package/dist/node/framework/plugins/vite-plugin-platform-entry.d.ts +0 -3
- package/dist/node/framework/plugins/vite-plugin-platform-entry.js +0 -117
- package/dist/node/framework/plugins/vite-plugin-ssr-interop.d.ts +0 -3
- package/dist/node/framework/plugins/vite-plugin-ssr-interop.js +0 -22
- package/dist/node/framework/types.d.ts +0 -20
- package/dist/node/framework/types.js +0 -2
- package/dist/node/framework/viteception.d.ts +0 -5
- package/dist/node/framework/viteception.js +0 -26
- package/dist/node/shared-types.d.ts +0 -31
- package/dist/node/shared-types.js +0 -5
- package/dist/node/utilities/vite.d.ts +0 -1
- package/dist/node/utilities/vite.js +0 -30
- package/dist/node/utilities/web-api-polyfill.d.ts +0 -1
- package/dist/node/utilities/web-api-polyfill.js +0 -53
- package/vendor/react-server-dom-vite/LICENSE +0 -21
- package/vendor/react-server-dom-vite/README.md +0 -5
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +0 -632
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +0 -1884
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +0 -48
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +0 -1945
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +0 -49
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite.development.js +0 -629
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +0 -19
- package/vendor/react-server-dom-vite/esm/package.json +0 -3
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +0 -83
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +0 -628
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +0 -1876
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +0 -1937
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite.js +0 -619
- package/vendor/react-server-dom-vite/index.js +0 -7
- package/vendor/react-server-dom-vite/package.json +0 -67
- package/vendor/react-server-dom-vite/plugin.js +0 -3
- package/vendor/react-server-dom-vite/writer.browser.server.js +0 -7
- package/vendor/react-server-dom-vite/writer.node.server.js +0 -7
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Strip out script `src` values from <script> tags in a given HTML template.
|
|
3
|
-
* Returns two lists of scripts, split based on whether they are `type="module"`.
|
|
4
|
-
*/
|
|
5
|
-
function stripScriptsFromTemplate(template) {
|
|
6
|
-
const bootstrapScripts = [];
|
|
7
|
-
const bootstrapModules = [];
|
|
8
|
-
const scripts = template.matchAll(/<script\n*?.+?src="(?<script>([^"]+?))"\n*.*?><\/script>/g);
|
|
9
|
-
for (const match of scripts) {
|
|
10
|
-
const scriptName = match.groups?.script;
|
|
11
|
-
if (!scriptName)
|
|
12
|
-
continue;
|
|
13
|
-
if (match[0].includes(`type="module"`)) {
|
|
14
|
-
bootstrapModules.push(scriptName);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
bootstrapScripts.push(scriptName);
|
|
18
|
-
}
|
|
19
|
-
template = template.replace(match[0], '');
|
|
20
|
-
}
|
|
21
|
-
return { noScriptTemplate: template, bootstrapScripts, bootstrapModules };
|
|
22
|
-
}
|
|
23
|
-
function extractAttributes(string) {
|
|
24
|
-
const attributes = {};
|
|
25
|
-
for (const [, attr, value] of string.matchAll(/\s([\w-]+)="([^"]*?)"/gm)) {
|
|
26
|
-
attributes[attr] = value;
|
|
27
|
-
}
|
|
28
|
-
return attributes;
|
|
29
|
-
}
|
|
30
|
-
export async function getTemplate(indexTemplate, url) {
|
|
31
|
-
let raw = typeof indexTemplate === 'function'
|
|
32
|
-
? await indexTemplate(url?.toString() || '')
|
|
33
|
-
: indexTemplate;
|
|
34
|
-
if (raw && typeof raw !== 'string') {
|
|
35
|
-
raw = raw.default;
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
raw,
|
|
39
|
-
linkHeader: createLinkHeader(raw),
|
|
40
|
-
...stripScriptsFromTemplate(raw),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const ALLOWED_REL_ATTRS = ['stylesheet', 'preconnect', 'preload'];
|
|
44
|
-
function createLinkHeader(template) {
|
|
45
|
-
const assets = (template.match(/\s*<link[^<>]+?>/gim) || []).map(extractAttributes);
|
|
46
|
-
const links = [];
|
|
47
|
-
for (const { href, rel = '', ...attrs } of assets) {
|
|
48
|
-
if (href && ALLOWED_REL_ATTRS.includes(rel)) {
|
|
49
|
-
const isStyle = rel === 'stylesheet';
|
|
50
|
-
if (isStyle && !attrs.as)
|
|
51
|
-
attrs.as = 'style';
|
|
52
|
-
links.push([
|
|
53
|
-
`<${encodeURI(href.replace(/^https?:/i, ''))}>`,
|
|
54
|
-
`rel=${isStyle ? 'preload' : rel}`,
|
|
55
|
-
...Object.entries(attrs).map((entry) => entry.join('=')),
|
|
56
|
-
].join('; '));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return links.join(', ');
|
|
60
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ShopifyProviderOptions } from '../../utilities/tests/provider-helpers.js';
|
|
3
|
-
export declare function MockedServerRequestProvider({ children, setServerProps, serverProps, requestUrl, }: Omit<ShopifyProviderOptions, 'history'> & {
|
|
4
|
-
children: React.ReactElement;
|
|
5
|
-
requestUrl?: string;
|
|
6
|
-
}): JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ServerRequestProvider } from '../../foundation/ServerRequestProvider/ServerRequestProvider.js';
|
|
3
|
-
import { ServerPropsProvider } from '../../foundation/ServerPropsProvider/ServerPropsProvider.js';
|
|
4
|
-
import { HydrogenRequest } from '../../foundation/HydrogenRequest/HydrogenRequest.server.js';
|
|
5
|
-
export function MockedServerRequestProvider({ children, setServerProps = () => { }, serverProps = { pathname: '', search: '' }, requestUrl = 'https://examples.com', }) {
|
|
6
|
-
const request = new HydrogenRequest(new Request(requestUrl));
|
|
7
|
-
return (React.createElement(ServerRequestProvider, { request: request },
|
|
8
|
-
React.createElement(ServerPropsProvider, { setServerPropsForRsc: setServerProps, initialServerProps: serverProps, setRscResponseFromApiRoute: () => { } }, children)));
|
|
9
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BrowserHistory } from 'history';
|
|
3
|
-
import { ShopifyConfig } from '../../types.js';
|
|
4
|
-
import { LocationServerProps, ServerProps } from '../../foundation/ServerPropsProvider/ServerPropsProvider.js';
|
|
5
|
-
import { type CartWithActions, type Cart } from '../../components/CartProvider/types.js';
|
|
6
|
-
export declare function ShopifyTestProviders({ children, setServerProps, serverProps, shopifyConfig, history, }: ShopifyProviderOptions & {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}): JSX.Element;
|
|
9
|
-
export declare function CartTestProviders({ children, cartProviderValues, }: {
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
cartProviderValues?: Parameters<typeof getCartProviderValues>[0];
|
|
12
|
-
}): JSX.Element;
|
|
13
|
-
export declare function getShopifyConfig(config?: Partial<ShopifyConfig>): {
|
|
14
|
-
countryCode: string;
|
|
15
|
-
languageCode: string;
|
|
16
|
-
storeDomain: string;
|
|
17
|
-
storefrontToken: string;
|
|
18
|
-
storefrontApiVersion: string;
|
|
19
|
-
};
|
|
20
|
-
declare function getCartProviderValues({ cart, ...config }?: CartProviderOptions): CartWithActions;
|
|
21
|
-
declare type SetServerProps = React.Dispatch<React.SetStateAction<ServerProps>>;
|
|
22
|
-
export interface ShopifyProviderOptions {
|
|
23
|
-
shopifyConfig?: Partial<ShopifyConfig>;
|
|
24
|
-
setServerProps?: SetServerProps;
|
|
25
|
-
serverProps?: LocationServerProps;
|
|
26
|
-
history?: BrowserHistory;
|
|
27
|
-
}
|
|
28
|
-
declare type CartProviderOptions = {
|
|
29
|
-
cart?: Partial<Cart>;
|
|
30
|
-
} & Partial<CartWithActions>;
|
|
31
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DEFAULT_COUNTRY, DEFAULT_LANGUAGE } from '../../foundation/constants.js';
|
|
3
|
-
import { ShopifyProvider } from '../../foundation/ShopifyProvider/ShopifyProvider.server.js';
|
|
4
|
-
import { BrowserRouter } from '../../foundation/Router/BrowserRouter.client.js';
|
|
5
|
-
import { ServerPropsProvider, } from '../../foundation/ServerPropsProvider/ServerPropsProvider.js';
|
|
6
|
-
import { CartContext } from '../../components/CartProvider/context.js';
|
|
7
|
-
import { CART_ACTIONS } from '../../components/CartProvider/tests/fixtures.js';
|
|
8
|
-
export function ShopifyTestProviders({ children, setServerProps = (() => { }), serverProps = { pathname: '', search: '' }, shopifyConfig, history, }) {
|
|
9
|
-
const finalShopifyConfig = getShopifyConfig(shopifyConfig);
|
|
10
|
-
return (React.createElement(ServerPropsProvider, { setServerPropsForRsc: setServerProps, initialServerProps: serverProps, setRscResponseFromApiRoute: () => { } },
|
|
11
|
-
React.createElement(ShopifyProvider, { shopifyConfig: finalShopifyConfig, languageCode: "EN", countryCode: "US" },
|
|
12
|
-
React.createElement(BrowserRouter, { history: history }, children))));
|
|
13
|
-
}
|
|
14
|
-
export function CartTestProviders({ children, cartProviderValues, }) {
|
|
15
|
-
const finalValue = getCartProviderValues(cartProviderValues);
|
|
16
|
-
return (React.createElement(CartContext.Provider, { value: finalValue }, children));
|
|
17
|
-
}
|
|
18
|
-
export function getShopifyConfig(config = {}) {
|
|
19
|
-
const languageCode = config.defaultLanguageCode ?? DEFAULT_LANGUAGE;
|
|
20
|
-
const countryCode = config.defaultCountryCode ?? DEFAULT_COUNTRY;
|
|
21
|
-
return {
|
|
22
|
-
countryCode: countryCode.toUpperCase(),
|
|
23
|
-
languageCode: languageCode.toUpperCase(),
|
|
24
|
-
storeDomain: config.storeDomain ?? 'notashop.myshopify.io',
|
|
25
|
-
storefrontToken: config.storefrontToken ?? 'abc123',
|
|
26
|
-
storefrontApiVersion: config.storefrontApiVersion ?? '2022-07',
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function getCartProviderValues({ cart = {}, ...config } = {}) {
|
|
30
|
-
const finalConfig = {
|
|
31
|
-
...CART_ACTIONS,
|
|
32
|
-
...cart,
|
|
33
|
-
...config,
|
|
34
|
-
};
|
|
35
|
-
return finalConfig;
|
|
36
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Not all environments have access to Performance.now(). This is to prevent
|
|
3
|
-
* timing side channel attacks.
|
|
4
|
-
*
|
|
5
|
-
* See: https://community.cloudflare.com/t/cloudflare-workers-how-do-i-measure-execution-time-of-my-method/69672
|
|
6
|
-
*/
|
|
7
|
-
export declare function getTime(): number;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Not all environments have access to Performance.now(). This is to prevent
|
|
3
|
-
* timing side channel attacks.
|
|
4
|
-
*
|
|
5
|
-
* See: https://community.cloudflare.com/t/cloudflare-workers-how-do-i-measure-execution-time-of-my-method/69672
|
|
6
|
-
*/
|
|
7
|
-
export function getTime() {
|
|
8
|
-
if (typeof performance !== 'undefined' && performance.now) {
|
|
9
|
-
return performance.now();
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return Date.now();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export interface YouTube {
|
|
2
|
-
autoplay?: 0 | 1;
|
|
3
|
-
cc_lang_pref?: string;
|
|
4
|
-
cc_load_policy?: 1;
|
|
5
|
-
color?: 'red' | 'white';
|
|
6
|
-
controls?: 0 | 1;
|
|
7
|
-
disablekb?: 0 | 1;
|
|
8
|
-
enablejsapi?: 0 | 1;
|
|
9
|
-
end?: number;
|
|
10
|
-
fs?: 0 | 1;
|
|
11
|
-
hl?: string;
|
|
12
|
-
iv_load_policy?: 1 | 3;
|
|
13
|
-
list?: string;
|
|
14
|
-
list_type?: 'playlist' | 'user_uploads';
|
|
15
|
-
loop?: 0 | 1;
|
|
16
|
-
modest_branding?: 1;
|
|
17
|
-
origin?: string;
|
|
18
|
-
playlist?: string;
|
|
19
|
-
plays_inline?: 0 | 1;
|
|
20
|
-
rel?: 0 | 1;
|
|
21
|
-
start?: number;
|
|
22
|
-
widget_referrer?: string;
|
|
23
|
-
}
|
|
24
|
-
declare type VimeoBoolean = 0 | 1 | boolean;
|
|
25
|
-
export interface Vimeo {
|
|
26
|
-
autopause?: VimeoBoolean;
|
|
27
|
-
autoplay?: VimeoBoolean;
|
|
28
|
-
background?: VimeoBoolean;
|
|
29
|
-
byline?: VimeoBoolean;
|
|
30
|
-
color?: string;
|
|
31
|
-
controls?: VimeoBoolean;
|
|
32
|
-
dnt?: VimeoBoolean;
|
|
33
|
-
loop?: VimeoBoolean;
|
|
34
|
-
muted?: VimeoBoolean;
|
|
35
|
-
pip?: VimeoBoolean;
|
|
36
|
-
playsinline?: VimeoBoolean;
|
|
37
|
-
portrait?: VimeoBoolean;
|
|
38
|
-
quality?: '240p' | '360p' | '540p' | '720p' | '1080p' | '2k' | '4k';
|
|
39
|
-
speed?: VimeoBoolean;
|
|
40
|
-
'#t'?: string;
|
|
41
|
-
texttrack?: string;
|
|
42
|
-
title?: VimeoBoolean;
|
|
43
|
-
transparent?: VimeoBoolean;
|
|
44
|
-
}
|
|
45
|
-
export declare function addParametersToEmbeddedVideoUrl(url: string, parameters?: YouTube | Vimeo): string;
|
|
46
|
-
export declare function useEmbeddedVideoUrl(url: string, parameters?: YouTube | Vimeo): string;
|
|
47
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export function addParametersToEmbeddedVideoUrl(url, parameters) {
|
|
3
|
-
if (parameters == null) {
|
|
4
|
-
return url;
|
|
5
|
-
}
|
|
6
|
-
const params = Object.keys(parameters).reduce((accumulator, param) => {
|
|
7
|
-
const value = parameters[param];
|
|
8
|
-
if (value == null) {
|
|
9
|
-
return accumulator;
|
|
10
|
-
}
|
|
11
|
-
return accumulator + `&${param}=${value}`;
|
|
12
|
-
}, '');
|
|
13
|
-
return `${url}?${params}`;
|
|
14
|
-
}
|
|
15
|
-
export function useEmbeddedVideoUrl(url, parameters) {
|
|
16
|
-
return useMemo(() => {
|
|
17
|
-
if (!parameters) {
|
|
18
|
-
return url;
|
|
19
|
-
}
|
|
20
|
-
return addParametersToEmbeddedVideoUrl(url, parameters);
|
|
21
|
-
}, [url, parameters]);
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isVite3: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import fetch, { Request, Response, Headers } from 'node-fetch';
|
|
2
|
-
import AbortController from 'abort-controller';
|
|
3
|
-
import { ReadableStream, WritableStream, TransformStream, } from 'web-streams-polyfill/ponyfill';
|
|
4
|
-
import { FormData } from 'undici';
|
|
5
|
-
if (!globalThis.fetch) {
|
|
6
|
-
Object.assign(globalThis, {
|
|
7
|
-
fetch,
|
|
8
|
-
Request,
|
|
9
|
-
Response,
|
|
10
|
-
Headers,
|
|
11
|
-
AbortController,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
if (!globalThis.FormData) {
|
|
15
|
-
Object.assign(globalThis, {
|
|
16
|
-
FormData,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
if (!globalThis.ReadableStream) {
|
|
20
|
-
Object.assign(globalThis, {
|
|
21
|
-
ReadableStream,
|
|
22
|
-
WritableStream,
|
|
23
|
-
TransformStream,
|
|
24
|
-
});
|
|
25
|
-
}
|
package/dist/esnext/version.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "1.6.4";
|
package/dist/esnext/version.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const LIB_VERSION = '1.6.4';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare type SessionSyncApi = {
|
|
2
|
-
get: () => Record<string, string>;
|
|
3
|
-
set: (data: Record<string, any>) => any;
|
|
4
|
-
};
|
|
5
|
-
export declare type SessionApi = {
|
|
6
|
-
get: () => Promise<Record<string, string>>;
|
|
7
|
-
set: (key: string, value: string) => Promise<void>;
|
|
8
|
-
destroy: () => Promise<void>;
|
|
9
|
-
getFlash: (key: string) => any;
|
|
10
|
-
};
|
|
11
|
-
export declare type SessionStorageAdapter = {
|
|
12
|
-
get: (request: Request) => Promise<Record<string, string>>;
|
|
13
|
-
set: (request: Request, value: Record<string, string>) => Promise<string>;
|
|
14
|
-
destroy: (request: Request) => Promise<string>;
|
|
15
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a limited implementation of an in-memory cache.
|
|
3
|
-
* It only supports the `cache-control` header.
|
|
4
|
-
* It does NOT support `age` or `expires` headers.
|
|
5
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Cache
|
|
6
|
-
*/
|
|
7
|
-
export declare class InMemoryCache implements Cache {
|
|
8
|
-
#private;
|
|
9
|
-
constructor();
|
|
10
|
-
add(request: RequestInfo): Promise<void>;
|
|
11
|
-
addAll(requests: RequestInfo[]): Promise<void>;
|
|
12
|
-
matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>;
|
|
13
|
-
put(request: Request, response: Response): Promise<void>;
|
|
14
|
-
match(request: Request): Promise<Response | undefined>;
|
|
15
|
-
delete(request: Request): Promise<boolean>;
|
|
16
|
-
keys(request?: Request): Promise<Request[]>;
|
|
17
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InMemoryCache = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* This is a limited implementation of an in-memory cache.
|
|
6
|
-
* It only supports the `cache-control` header.
|
|
7
|
-
* It does NOT support `age` or `expires` headers.
|
|
8
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Cache
|
|
9
|
-
*/
|
|
10
|
-
class InMemoryCache {
|
|
11
|
-
#store;
|
|
12
|
-
constructor() {
|
|
13
|
-
this.#store = new Map();
|
|
14
|
-
}
|
|
15
|
-
add(request) {
|
|
16
|
-
throw new Error('Method not implemented. Use `put` instead.');
|
|
17
|
-
}
|
|
18
|
-
addAll(requests) {
|
|
19
|
-
throw new Error('Method not implemented. Use `put` instead.');
|
|
20
|
-
}
|
|
21
|
-
matchAll(request, options) {
|
|
22
|
-
throw new Error('Method not implemented. Use `match` instead.');
|
|
23
|
-
}
|
|
24
|
-
async put(request, response) {
|
|
25
|
-
if (request.method !== 'GET') {
|
|
26
|
-
throw new TypeError('Cannot cache response to non-GET request.');
|
|
27
|
-
}
|
|
28
|
-
if (response.status === 206) {
|
|
29
|
-
throw new TypeError('Cannot cache response to a range request (206 Partial Content).');
|
|
30
|
-
}
|
|
31
|
-
if (response.headers.get('vary')?.includes('*')) {
|
|
32
|
-
throw new TypeError("Cannot cache response with 'Vary: *' header.");
|
|
33
|
-
}
|
|
34
|
-
this.#store.set(request.url, {
|
|
35
|
-
body: new Uint8Array(await response.arrayBuffer()),
|
|
36
|
-
status: response.status,
|
|
37
|
-
headers: [...response.headers],
|
|
38
|
-
timestamp: Date.now(),
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
async match(request) {
|
|
42
|
-
if (request.method !== 'GET')
|
|
43
|
-
return;
|
|
44
|
-
const match = this.#store.get(request.url);
|
|
45
|
-
if (!match) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const { body, timestamp, ...metadata } = match;
|
|
49
|
-
const headers = new Headers(metadata.headers);
|
|
50
|
-
const cacheControl = headers.get('cache-control') || '';
|
|
51
|
-
const maxAge = parseInt(cacheControl.match(/max-age=(\d+)/)?.[1] || '0', 10);
|
|
52
|
-
const swr = parseInt(cacheControl.match(/stale-while-revalidate=(\d+)/)?.[1] || '0', 10);
|
|
53
|
-
const age = (Date.now() - timestamp) / 1000;
|
|
54
|
-
const isMiss = age > maxAge + swr;
|
|
55
|
-
if (isMiss) {
|
|
56
|
-
this.#store.delete(request.url);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const isStale = age > maxAge;
|
|
60
|
-
headers.set('cache', isStale ? 'STALE' : 'HIT');
|
|
61
|
-
headers.set('date', new Date(timestamp).toUTCString());
|
|
62
|
-
return new Response(body, {
|
|
63
|
-
status: metadata.status ?? 200,
|
|
64
|
-
headers,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
async delete(request) {
|
|
68
|
-
if (this.#store.has(request.url)) {
|
|
69
|
-
this.#store.delete(request.url);
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
keys(request) {
|
|
75
|
-
const cacheKeys = [];
|
|
76
|
-
for (const url of this.#store.keys()) {
|
|
77
|
-
if (!request || request.url === url) {
|
|
78
|
-
cacheKeys.push(new Request(url));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return Promise.resolve(cacheKeys);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.InMemoryCache = InMemoryCache;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function graphiqlHtml(shop: string, token: string, apiVersion: string): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Provide Hydrogen config loader to external tools like the CLI
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.loadConfig = void 0;
|
|
5
|
-
const vite_plugin_hydrogen_virtual_files_js_1 = require("./plugins/vite-plugin-hydrogen-virtual-files.js");
|
|
6
|
-
const viteception_js_1 = require("./viteception.js");
|
|
7
|
-
async function loadConfig(options = { root: process.cwd() }) {
|
|
8
|
-
const { loaded } = await (0, viteception_js_1.viteception)([vite_plugin_hydrogen_virtual_files_js_1.VIRTUAL_PROXY_HYDROGEN_CONFIG_ID], options);
|
|
9
|
-
return { configuration: loaded[0].default };
|
|
10
|
-
}
|
|
11
|
-
exports.loadConfig = loadConfig;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ShopifyConfig } from '../shared-types.js';
|
|
2
|
-
import type { IncomingMessage, NextFunction } from 'connect';
|
|
3
|
-
import type { ServerResponse } from 'http';
|
|
4
|
-
import type { ViteDevServer } from 'vite';
|
|
5
|
-
declare type HydrogenMiddlewareArgs = {
|
|
6
|
-
dev?: boolean;
|
|
7
|
-
indexTemplate: string | ((url: string) => Promise<string>);
|
|
8
|
-
getServerEntrypoint: () => any;
|
|
9
|
-
devServer?: ViteDevServer;
|
|
10
|
-
cache?: Cache;
|
|
11
|
-
};
|
|
12
|
-
export declare function graphiqlMiddleware({ getShopifyConfig, dev, }: {
|
|
13
|
-
getShopifyConfig: (request: IncomingMessage) => ShopifyConfig | Promise<ShopifyConfig>;
|
|
14
|
-
dev?: boolean;
|
|
15
|
-
}): (request: IncomingMessage, response: ServerResponse, next: NextFunction) => Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Provides middleware to Node.js Express-like servers. Used by the Hydrogen
|
|
18
|
-
* Vite dev server plugin as well as production Node.js implementation.
|
|
19
|
-
*/
|
|
20
|
-
export declare function hydrogenMiddleware({ dev, cache, indexTemplate, getServerEntrypoint, devServer, }: HydrogenMiddlewareArgs): (request: IncomingMessage, response: ServerResponse, next: NextFunction) => Promise<void>;
|
|
21
|
-
export {};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.hydrogenMiddleware = exports.graphiqlMiddleware = void 0;
|
|
27
|
-
const graphiql_js_1 = require("./graphiql.js");
|
|
28
|
-
function graphiqlMiddleware({ getShopifyConfig, dev, }) {
|
|
29
|
-
return async function (request, response, next) {
|
|
30
|
-
if (dev && isGraphiqlRequest(request)) {
|
|
31
|
-
const shopifyConfig = await getShopifyConfig(request);
|
|
32
|
-
return respondWithGraphiql(response, shopifyConfig);
|
|
33
|
-
}
|
|
34
|
-
next();
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
exports.graphiqlMiddleware = graphiqlMiddleware;
|
|
38
|
-
let entrypointError = null;
|
|
39
|
-
/**
|
|
40
|
-
* Provides middleware to Node.js Express-like servers. Used by the Hydrogen
|
|
41
|
-
* Vite dev server plugin as well as production Node.js implementation.
|
|
42
|
-
*/
|
|
43
|
-
function hydrogenMiddleware({ dev, cache, indexTemplate, getServerEntrypoint, devServer, }) {
|
|
44
|
-
if (dev && devServer) {
|
|
45
|
-
// Store this globally for devtools
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
globalThis.__viteDevServer = devServer;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* We're running in the Node.js runtime without access to `fetch`,
|
|
51
|
-
* which is needed for proxy requests and server-side API requests.
|
|
52
|
-
*/
|
|
53
|
-
const webPolyfills = !globalThis.fetch || !globalThis.ReadableStream
|
|
54
|
-
? Promise.resolve().then(() => __importStar(require('../utilities/web-api-polyfill.js'))) : undefined;
|
|
55
|
-
return async function (request, response, next) {
|
|
56
|
-
try {
|
|
57
|
-
await webPolyfills;
|
|
58
|
-
const entrypoint = await Promise.resolve(getServerEntrypoint()).catch((error) => {
|
|
59
|
-
// Errors are only thrown the first time we try to load the entry point.
|
|
60
|
-
// After refreshing the browser, this just loads an empty module
|
|
61
|
-
// and doesn't throw anymore. Store this error in the outer scope
|
|
62
|
-
// to keep throwing it on refresh until things are fixed.
|
|
63
|
-
entrypointError = error;
|
|
64
|
-
});
|
|
65
|
-
const handleRequest = entrypoint?.default ?? entrypoint;
|
|
66
|
-
if (typeof handleRequest !== 'function') {
|
|
67
|
-
if (entrypointError) {
|
|
68
|
-
throw entrypointError;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
// This means there is no error when loading the entry point but
|
|
72
|
-
// we are still not getting a function as the default export.
|
|
73
|
-
throw new Error('Something is wrong in your project. Make sure to add "export default renderHydrogen(...)" in your server entry file.');
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
entrypointError = null;
|
|
77
|
-
await handleRequest(request, {
|
|
78
|
-
dev,
|
|
79
|
-
cache,
|
|
80
|
-
indexTemplate,
|
|
81
|
-
streamableResponse: response,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
catch (e) {
|
|
85
|
-
if (dev && devServer)
|
|
86
|
-
devServer.ssrFixStacktrace(e);
|
|
87
|
-
response.statusCode = 500;
|
|
88
|
-
/**
|
|
89
|
-
* Attempt to print the error stack within the template.
|
|
90
|
-
* This allows the react-refresh plugin and other Vite runtime helpers
|
|
91
|
-
* to display the error and auto-refresh when the error is fixed, instead
|
|
92
|
-
* of a white screen that needs a manual refresh.
|
|
93
|
-
*/
|
|
94
|
-
try {
|
|
95
|
-
const template = typeof indexTemplate === 'function'
|
|
96
|
-
? await indexTemplate(request.originalUrl ?? request.url ?? '')
|
|
97
|
-
: indexTemplate;
|
|
98
|
-
const html = template.replace(`<div id="root"></div>`, `<div id="root"><pre><code>${e.stack}</code></pre></div>`);
|
|
99
|
-
response.write(html);
|
|
100
|
-
next(e);
|
|
101
|
-
}
|
|
102
|
-
catch (_e) {
|
|
103
|
-
// If template loading is the culprit, give up and just return the error stack.
|
|
104
|
-
response.write(e.stack);
|
|
105
|
-
next(e);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
exports.hydrogenMiddleware = hydrogenMiddleware;
|
|
111
|
-
/**
|
|
112
|
-
* /graphiql and /___graphql are supported
|
|
113
|
-
*/
|
|
114
|
-
function isGraphiqlRequest(request) {
|
|
115
|
-
return /^\/(?:_{3})?graphi?ql/.test(request.url || '');
|
|
116
|
-
}
|
|
117
|
-
async function respondWithGraphiql(response, shopifyConfig) {
|
|
118
|
-
if (!shopifyConfig) {
|
|
119
|
-
throw new Error("You must provide a 'shopify' property in your Hydrogen config file");
|
|
120
|
-
}
|
|
121
|
-
const { storeDomain, storefrontToken, storefrontApiVersion } = shopifyConfig;
|
|
122
|
-
response.setHeader('Content-Type', 'text/html');
|
|
123
|
-
response.end((0, graphiql_js_1.graphiqlHtml)(storeDomain?.replace(/^https?:\/\//, ''), storefrontToken, storefrontApiVersion));
|
|
124
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const vite_plugin_hydrogen_config_js_1 = __importDefault(require("./plugins/vite-plugin-hydrogen-config.js"));
|
|
6
|
-
const vite_plugin_hydrogen_middleware_js_1 = __importDefault(require("./plugins/vite-plugin-hydrogen-middleware.js"));
|
|
7
|
-
const vite_plugin_hydrogen_client_components_cache_js_1 = __importDefault(require("./plugins/vite-plugin-hydrogen-client-components-cache.js"));
|
|
8
|
-
const vite_plugin_hydrogen_virtual_files_js_1 = __importDefault(require("./plugins/vite-plugin-hydrogen-virtual-files.js"));
|
|
9
|
-
const vite_plugin_platform_entry_js_1 = __importDefault(require("./plugins/vite-plugin-platform-entry.js"));
|
|
10
|
-
const vite_plugin_hydrogen_rsc_js_1 = __importDefault(require("./plugins/vite-plugin-hydrogen-rsc.js"));
|
|
11
|
-
const vite_plugin_ssr_interop_js_1 = __importDefault(require("./plugins/vite-plugin-ssr-interop.js"));
|
|
12
|
-
const vite_plugin_hydration_auto_import_js_1 = __importDefault(require("./plugins/vite-plugin-hydration-auto-import.js"));
|
|
13
|
-
const vite_plugin_inspect_1 = __importDefault(require("vite-plugin-inspect"));
|
|
14
|
-
const plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
|
|
15
|
-
const vite_plugin_css_rsc_js_1 = __importDefault(require("./plugins/vite-plugin-css-rsc.js"));
|
|
16
|
-
const vite_plugin_css_modules_rsc_js_1 = __importDefault(require("./plugins/vite-plugin-css-modules-rsc.js"));
|
|
17
|
-
const vite_plugin_client_imports_js_1 = __importDefault(require("./plugins/vite-plugin-client-imports.js"));
|
|
18
|
-
const vite_plugin_hydrogen_suppress_warnings_js_1 = __importDefault(require("./plugins/vite-plugin-hydrogen-suppress-warnings.js"));
|
|
19
|
-
const vite_plugin_assets_version_js_1 = __importDefault(require("./plugins/vite-plugin-assets-version.js"));
|
|
20
|
-
const hydrogenPlugin = (pluginOptions = {}) => {
|
|
21
|
-
return [
|
|
22
|
-
process.env.VITE_INSPECT && (0, vite_plugin_inspect_1.default)(),
|
|
23
|
-
(0, vite_plugin_hydrogen_config_js_1.default)(pluginOptions),
|
|
24
|
-
(0, vite_plugin_hydrogen_client_components_cache_js_1.default)(),
|
|
25
|
-
(0, vite_plugin_client_imports_js_1.default)(),
|
|
26
|
-
(0, vite_plugin_hydrogen_middleware_js_1.default)(pluginOptions),
|
|
27
|
-
(0, vite_plugin_hydrogen_virtual_files_js_1.default)(pluginOptions),
|
|
28
|
-
(0, plugin_react_1.default)(),
|
|
29
|
-
(0, vite_plugin_hydration_auto_import_js_1.default)(),
|
|
30
|
-
(0, vite_plugin_ssr_interop_js_1.default)(),
|
|
31
|
-
pluginOptions.experimental?.css === 'global' ? (0, vite_plugin_css_rsc_js_1.default)() : (0, vite_plugin_css_modules_rsc_js_1.default)(),
|
|
32
|
-
(0, vite_plugin_hydrogen_rsc_js_1.default)(pluginOptions),
|
|
33
|
-
(0, vite_plugin_platform_entry_js_1.default)(),
|
|
34
|
-
(0, vite_plugin_hydrogen_suppress_warnings_js_1.default)(),
|
|
35
|
-
pluginOptions.assetHashVersion &&
|
|
36
|
-
(0, vite_plugin_assets_version_js_1.default)(pluginOptions.assetHashVersion),
|
|
37
|
-
];
|
|
38
|
-
};
|
|
39
|
-
exports.default = hydrogenPlugin; // For ESM
|
|
40
|
-
module.exports = hydrogenPlugin;
|