From de0ba8cee8108794521a58c3579fc56b7a7663d3 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Sun, 17 Jan 2021 12:53:34 -0300 Subject: [PATCH] changes breaking --- components/cart/CartItem/CartItem.tsx | 9 +++++---- components/common/Footer/Footer.tsx | 2 +- components/common/Layout/Layout.tsx | 2 +- .../api/catalog/handlers/get-products.ts | 2 +- .../bigcommerce/api/customers/handlers/login.ts | 2 +- .../bigcommerce/api/customers/handlers/signup.ts | 2 +- .../api/utils/set-product-locale-meta.ts | 2 +- .../bigcommerce/api/wishlist/handlers/add-item.ts | 4 ++-- .../api/wishlist/handlers/get-wishlist.ts | 4 ++-- .../api/wishlist/handlers/remove-item.ts | 4 ++-- framework/bigcommerce/api/wishlist/index.ts | 2 +- .../bigcommerce/{api/operations => auth}/login.ts | 8 ++++---- .../{api/operations => common}/get-all-pages.ts | 6 +++--- .../{api/operations => common}/get-page.ts | 6 +++--- .../{api/operations => common}/get-site-info.ts | 10 +++++----- .../operations => customer}/get-customer-id.ts | 4 ++-- .../get-customer-wishlist.ts | 8 ++++---- .../get-all-product-paths.ts | 8 ++++---- .../operations => product}/get-all-products.ts | 14 +++++++------- .../{api/operations => product}/get-product.ts | 8 ++++---- framework/bigcommerce/product/index.ts | 4 ++-- package.json | 5 +++-- pages/[...pages].tsx | 4 ++-- pages/blog.tsx | 2 +- pages/cart.tsx | 2 +- pages/index.tsx | 6 +++--- pages/orders.tsx | 2 +- pages/product/[slug].tsx | 6 +++--- pages/profile.tsx | 2 +- pages/search.tsx | 4 ++-- pages/wishlist.tsx | 2 +- tsconfig.json | 2 +- yarn.lock | 15 ++++++++++++++- 33 files changed, 89 insertions(+), 74 deletions(-) rename framework/bigcommerce/{api/operations => auth}/login.ts (88%) rename framework/bigcommerce/{api/operations => common}/get-all-pages.ts (83%) rename framework/bigcommerce/{api/operations => common}/get-page.ts (85%) rename framework/bigcommerce/{api/operations => common}/get-site-info.ts (89%) rename framework/bigcommerce/{api/operations => customer}/get-customer-id.ts (84%) rename framework/bigcommerce/{api/operations => customer}/get-customer-wishlist.ts (89%) rename framework/bigcommerce/{api/operations => product}/get-all-product-paths.ts (89%) rename framework/bigcommerce/{api/operations => product}/get-all-products.ts (88%) rename framework/bigcommerce/{api/operations => product}/get-product.ts (93%) diff --git a/components/cart/CartItem/CartItem.tsx b/components/cart/CartItem/CartItem.tsx index 2337c871c..c5a48c8e6 100644 --- a/components/cart/CartItem/CartItem.tsx +++ b/components/cart/CartItem/CartItem.tsx @@ -2,13 +2,14 @@ import { ChangeEvent, useEffect, useState } from 'react' import cn from 'classnames' import Image from 'next/image' import Link from 'next/link' +import s from './CartItem.module.css' import { Trash, Plus, Minus } from '@components/icons' import usePrice from '@framework/product/use-price' import useUpdateItem from '@framework/cart/use-update-item' import useRemoveItem from '@framework/cart/use-remove-item' -import s from './CartItem.module.css' +import { CartItem } from 'framework/types' -const CartItem = ({ +const Item = ({ item, currencyCode, }: { @@ -31,7 +32,7 @@ const CartItem = ({ const val = Number(e.target.value) if (Number.isInteger(val) && val >= 0) { - setQuantity(e.target.value) + setQuantity(Number(e.target.value)) } } const handleBlur = () => { @@ -124,4 +125,4 @@ const CartItem = ({ ) } -export default CartItem +export default Item diff --git a/components/common/Footer/Footer.tsx b/components/common/Footer/Footer.tsx index c90b4886f..75b2806ef 100644 --- a/components/common/Footer/Footer.tsx +++ b/components/common/Footer/Footer.tsx @@ -2,7 +2,7 @@ import { FC } from 'react' import cn from 'classnames' import Link from 'next/link' import { useRouter } from 'next/router' -import type { Page } from '@framework/api/operations/get-all-pages' +import type { Page } from '@framework/common/get-all-pages' import getSlug from '@lib/get-slug' import { Github, Vercel } from '@components/icons' import { Logo, Container } from '@components/ui' diff --git a/components/common/Layout/Layout.tsx b/components/common/Layout/Layout.tsx index f4dac69ac..0490dbb19 100644 --- a/components/common/Layout/Layout.tsx +++ b/components/common/Layout/Layout.tsx @@ -11,7 +11,7 @@ import CartSidebarView from '@components/cart/CartSidebarView' import LoginView from '@components/auth/LoginView' import { CommerceProvider } from '@framework' -import type { Page } from '@framework/api/operations/get-all-pages' +import type { Page } from '@framework/common/get-all-pages' const Loading = () => (
diff --git a/framework/bigcommerce/api/catalog/handlers/get-products.ts b/framework/bigcommerce/api/catalog/handlers/get-products.ts index f99d82729..894dc5cf3 100644 --- a/framework/bigcommerce/api/catalog/handlers/get-products.ts +++ b/framework/bigcommerce/api/catalog/handlers/get-products.ts @@ -1,5 +1,5 @@ import { Product } from 'framework/types' -import getAllProducts, { ProductEdge } from '../../operations/get-all-products' +import getAllProducts, { ProductEdge } from '../../../product/get-all-products' import type { ProductsHandlers } from '../products' const SORT: { [key: string]: string | undefined } = { diff --git a/framework/bigcommerce/api/customers/handlers/login.ts b/framework/bigcommerce/api/customers/handlers/login.ts index c4062f6cc..9e019f3a0 100644 --- a/framework/bigcommerce/api/customers/handlers/login.ts +++ b/framework/bigcommerce/api/customers/handlers/login.ts @@ -1,5 +1,5 @@ import { FetcherError } from '@commerce/utils/errors' -import login from '../../operations/login' +import login from '../../../auth/login' import type { LoginHandlers } from '../login' const invalidCredentials = /invalid credentials/i diff --git a/framework/bigcommerce/api/customers/handlers/signup.ts b/framework/bigcommerce/api/customers/handlers/signup.ts index ff45adadb..1b24db0cc 100644 --- a/framework/bigcommerce/api/customers/handlers/signup.ts +++ b/framework/bigcommerce/api/customers/handlers/signup.ts @@ -1,5 +1,5 @@ import { BigcommerceApiError } from '../../utils/errors' -import login from '../../operations/login' +import login from '../../../auth/login' import { SignupHandlers } from '../signup' const signup: SignupHandlers['signup'] = async ({ diff --git a/framework/bigcommerce/api/utils/set-product-locale-meta.ts b/framework/bigcommerce/api/utils/set-product-locale-meta.ts index 767286477..974a197bd 100644 --- a/framework/bigcommerce/api/utils/set-product-locale-meta.ts +++ b/framework/bigcommerce/api/utils/set-product-locale-meta.ts @@ -1,4 +1,4 @@ -import type { ProductNode } from '../operations/get-all-products' +import type { ProductNode } from '../../product/get-all-products' import type { RecursivePartial } from './types' export default function setProductLocaleMeta( diff --git a/framework/bigcommerce/api/wishlist/handlers/add-item.ts b/framework/bigcommerce/api/wishlist/handlers/add-item.ts index a02ef4434..00d7b06bd 100644 --- a/framework/bigcommerce/api/wishlist/handlers/add-item.ts +++ b/framework/bigcommerce/api/wishlist/handlers/add-item.ts @@ -1,6 +1,6 @@ import type { WishlistHandlers } from '..' -import getCustomerId from '../../operations/get-customer-id' -import getCustomerWishlist from '../../operations/get-customer-wishlist' +import getCustomerId from '../../../customer/get-customer-id' +import getCustomerWishlist from '../../../customer/get-customer-wishlist' import { parseWishlistItem } from '../../utils/parse-item' // Returns the wishlist of the signed customer diff --git a/framework/bigcommerce/api/wishlist/handlers/get-wishlist.ts b/framework/bigcommerce/api/wishlist/handlers/get-wishlist.ts index 3eb3000cc..3737c033a 100644 --- a/framework/bigcommerce/api/wishlist/handlers/get-wishlist.ts +++ b/framework/bigcommerce/api/wishlist/handlers/get-wishlist.ts @@ -1,5 +1,5 @@ -import getCustomerId from '../../operations/get-customer-id' -import getCustomerWishlist from '../../operations/get-customer-wishlist' +import getCustomerId from '../../../customer/get-customer-id' +import getCustomerWishlist from '../../../customer/get-customer-wishlist' import type { Wishlist, WishlistHandlers } from '..' // Return wishlist info diff --git a/framework/bigcommerce/api/wishlist/handlers/remove-item.ts b/framework/bigcommerce/api/wishlist/handlers/remove-item.ts index 29b6eff60..a9cfd9db5 100644 --- a/framework/bigcommerce/api/wishlist/handlers/remove-item.ts +++ b/framework/bigcommerce/api/wishlist/handlers/remove-item.ts @@ -1,7 +1,7 @@ -import getCustomerId from '../../operations/get-customer-id' +import getCustomerId from '../../../customer/get-customer-id' import getCustomerWishlist, { Wishlist, -} from '../../operations/get-customer-wishlist' +} from '../../../customer/get-customer-wishlist' import type { WishlistHandlers } from '..' // Return current wishlist info diff --git a/framework/bigcommerce/api/wishlist/index.ts b/framework/bigcommerce/api/wishlist/index.ts index b50c5e97f..e892d2e78 100644 --- a/framework/bigcommerce/api/wishlist/index.ts +++ b/framework/bigcommerce/api/wishlist/index.ts @@ -7,7 +7,7 @@ import { BigcommerceApiError } from '../utils/errors' import type { Wishlist, WishlistItem, -} from '../operations/get-customer-wishlist' +} from '../../customer/get-customer-wishlist' import getWishlist from './handlers/get-wishlist' import addItem from './handlers/add-item' import removeItem from './handlers/remove-item' diff --git a/framework/bigcommerce/api/operations/login.ts b/framework/bigcommerce/auth/login.ts similarity index 88% rename from framework/bigcommerce/api/operations/login.ts rename to framework/bigcommerce/auth/login.ts index 8a8502705..adfa2d467 100644 --- a/framework/bigcommerce/api/operations/login.ts +++ b/framework/bigcommerce/auth/login.ts @@ -1,8 +1,8 @@ import type { ServerResponse } from 'http' -import type { LoginMutation, LoginMutationVariables } from '../../schema' -import type { RecursivePartial } from '../utils/types' -import concatHeader from '../utils/concat-cookie' -import { BigcommerceConfig, getConfig } from '..' +import type { LoginMutation, LoginMutationVariables } from '../schema' +import type { RecursivePartial } from '../api/utils/types' +import concatHeader from '../api/utils/concat-cookie' +import { BigcommerceConfig, getConfig } from '../api' export const loginMutation = /* GraphQL */ ` mutation login($email: String!, $password: String!) { diff --git a/framework/bigcommerce/api/operations/get-all-pages.ts b/framework/bigcommerce/common/get-all-pages.ts similarity index 83% rename from framework/bigcommerce/api/operations/get-all-pages.ts rename to framework/bigcommerce/common/get-all-pages.ts index 9fe83f2a1..dc5eb15a5 100644 --- a/framework/bigcommerce/api/operations/get-all-pages.ts +++ b/framework/bigcommerce/common/get-all-pages.ts @@ -1,6 +1,6 @@ -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import { BigcommerceConfig, getConfig } from '..' -import { definitions } from '../definitions/store-content' +import type { RecursivePartial, RecursiveRequired } from '../api/utils/types' +import { BigcommerceConfig, getConfig } from '../api' +import { definitions } from '../api/definitions/store-content' export type Page = definitions['page_Full'] diff --git a/framework/bigcommerce/api/operations/get-page.ts b/framework/bigcommerce/common/get-page.ts similarity index 85% rename from framework/bigcommerce/api/operations/get-page.ts rename to framework/bigcommerce/common/get-page.ts index 3010dd34c..b65e340e1 100644 --- a/framework/bigcommerce/api/operations/get-page.ts +++ b/framework/bigcommerce/common/get-page.ts @@ -1,6 +1,6 @@ -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import { BigcommerceConfig, getConfig } from '..' -import { definitions } from '../definitions/store-content' +import type { RecursivePartial, RecursiveRequired } from '../api/utils/types' +import { BigcommerceConfig, getConfig } from '../api' +import { definitions } from '../api/definitions/store-content' export type Page = definitions['page_Full'] diff --git a/framework/bigcommerce/api/operations/get-site-info.ts b/framework/bigcommerce/common/get-site-info.ts similarity index 89% rename from framework/bigcommerce/api/operations/get-site-info.ts rename to framework/bigcommerce/common/get-site-info.ts index 44c0cfeb5..80cde8d82 100644 --- a/framework/bigcommerce/api/operations/get-site-info.ts +++ b/framework/bigcommerce/common/get-site-info.ts @@ -1,8 +1,8 @@ -import type { GetSiteInfoQuery, GetSiteInfoQueryVariables } from '../../schema' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import filterEdges from '../utils/filter-edges' -import { BigcommerceConfig, getConfig } from '..' -import { categoryTreeItemFragment } from '../fragments/category-tree' +import type { GetSiteInfoQuery, GetSiteInfoQueryVariables } from '../schema' +import type { RecursivePartial, RecursiveRequired } from '../api/utils/types' +import filterEdges from '../api/utils/filter-edges' +import { BigcommerceConfig, getConfig } from '../api' +import { categoryTreeItemFragment } from '../api/fragments/category-tree' // Get 3 levels of categories export const getSiteInfoQuery = /* GraphQL */ ` diff --git a/framework/bigcommerce/api/operations/get-customer-id.ts b/framework/bigcommerce/customer/get-customer-id.ts similarity index 84% rename from framework/bigcommerce/api/operations/get-customer-id.ts rename to framework/bigcommerce/customer/get-customer-id.ts index 7fe84093e..65ce5a6a8 100644 --- a/framework/bigcommerce/api/operations/get-customer-id.ts +++ b/framework/bigcommerce/customer/get-customer-id.ts @@ -1,5 +1,5 @@ -import { GetCustomerIdQuery } from '../../schema' -import { BigcommerceConfig, getConfig } from '..' +import { GetCustomerIdQuery } from '../schema' +import { BigcommerceConfig, getConfig } from '../api' export const getCustomerIdQuery = /* GraphQL */ ` query getCustomerId { diff --git a/framework/bigcommerce/api/operations/get-customer-wishlist.ts b/framework/bigcommerce/customer/get-customer-wishlist.ts similarity index 89% rename from framework/bigcommerce/api/operations/get-customer-wishlist.ts rename to framework/bigcommerce/customer/get-customer-wishlist.ts index 2c1299b46..a3c7413cc 100644 --- a/framework/bigcommerce/api/operations/get-customer-wishlist.ts +++ b/framework/bigcommerce/customer/get-customer-wishlist.ts @@ -1,7 +1,7 @@ -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import { definitions } from '../definitions/wishlist' -import { BigcommerceConfig, getConfig } from '..' -import getAllProducts, { ProductEdge } from './get-all-products' +import type { RecursivePartial, RecursiveRequired } from '../api/utils/types' +import { definitions } from '../api/definitions/wishlist' +import { BigcommerceConfig, getConfig } from '../api' +import getAllProducts, { ProductEdge } from '../product/get-all-products' export type Wishlist = Omit & { items?: WishlistItem[] diff --git a/framework/bigcommerce/api/operations/get-all-product-paths.ts b/framework/bigcommerce/product/get-all-product-paths.ts similarity index 89% rename from framework/bigcommerce/api/operations/get-all-product-paths.ts rename to framework/bigcommerce/product/get-all-product-paths.ts index 71522be35..c1b23b38d 100644 --- a/framework/bigcommerce/api/operations/get-all-product-paths.ts +++ b/framework/bigcommerce/product/get-all-product-paths.ts @@ -1,10 +1,10 @@ import type { GetAllProductPathsQuery, GetAllProductPathsQueryVariables, -} from '../../schema' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import filterEdges from '../utils/filter-edges' -import { BigcommerceConfig, getConfig } from '..' +} from '../schema' +import type { RecursivePartial, RecursiveRequired } from '../api/utils/types' +import filterEdges from '../api/utils/filter-edges' +import { BigcommerceConfig, getConfig } from '../api' export const getAllProductPathsQuery = /* GraphQL */ ` query getAllProductPaths($first: Int = 100) { diff --git a/framework/bigcommerce/api/operations/get-all-products.ts b/framework/bigcommerce/product/get-all-products.ts similarity index 88% rename from framework/bigcommerce/api/operations/get-all-products.ts rename to framework/bigcommerce/product/get-all-products.ts index 3cfb77b7c..b7d728c4a 100644 --- a/framework/bigcommerce/api/operations/get-all-products.ts +++ b/framework/bigcommerce/product/get-all-products.ts @@ -1,13 +1,13 @@ import type { GetAllProductsQuery, GetAllProductsQueryVariables, -} from '../../schema' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import filterEdges from '../utils/filter-edges' -import setProductLocaleMeta from '../utils/set-product-locale-meta' -import { productConnectionFragment } from '../fragments/product' -import { BigcommerceConfig, getConfig } from '..' -import { normalizeProduct } from '../../lib/normalize' +} from '../schema' +import type { RecursivePartial, RecursiveRequired } from '../api/utils/types' +import filterEdges from '../api/utils/filter-edges' +import setProductLocaleMeta from '../api/utils/set-product-locale-meta' +import { productConnectionFragment } from '../api/fragments/product' +import { BigcommerceConfig, getConfig } from '../api' +import { normalizeProduct } from '../lib/normalize' export const getAllProductsQuery = /* GraphQL */ ` query getAllProducts( diff --git a/framework/bigcommerce/api/operations/get-product.ts b/framework/bigcommerce/product/get-product.ts similarity index 93% rename from framework/bigcommerce/api/operations/get-product.ts rename to framework/bigcommerce/product/get-product.ts index 4d34d86a0..3624a9cca 100644 --- a/framework/bigcommerce/api/operations/get-product.ts +++ b/framework/bigcommerce/product/get-product.ts @@ -1,7 +1,7 @@ -import type { GetProductQuery, GetProductQueryVariables } from '../../schema' -import setProductLocaleMeta from '../utils/set-product-locale-meta' -import { productInfoFragment } from '../fragments/product' -import { BigcommerceConfig, getConfig } from '..' +import type { GetProductQuery, GetProductQueryVariables } from '../schema' +import setProductLocaleMeta from '../api/utils/set-product-locale-meta' +import { productInfoFragment } from '../api/fragments/product' +import { BigcommerceConfig, getConfig } from '../api' import { normalizeProduct } from '@framework/lib/normalize' export const getProductQuery = /* GraphQL */ ` diff --git a/framework/bigcommerce/product/index.ts b/framework/bigcommerce/product/index.ts index 83d507a2c..b290c189f 100644 --- a/framework/bigcommerce/product/index.ts +++ b/framework/bigcommerce/product/index.ts @@ -1,4 +1,4 @@ export { default as usePrice } from './use-price' export { default as useSearch } from './use-search' -export { default as getProduct } from '../api/operations/get-product' -export { default as getAllProducts } from '../api/operations/get-all-products' +export { default as getProduct } from './get-product' +export { default as getAllProducts } from './get-all-products' diff --git a/package.json b/package.json index edabd234f..aba8b4b5d 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "bowser": "^2.11.0", "classnames": "^2.2.6", "cookie": "^0.4.1", + "dot-object": "^2.1.4", "email-validator": "^2.0.4", "js-cookie": "^2.2.1", "keen-slider": "^5.2.4", @@ -100,8 +101,8 @@ "resolutions": { "webpack": "5.11.1" }, - "node": { - "net": "empty" + "engines": { + "node": ">=14" }, "license": "MIT" } diff --git a/pages/[...pages].tsx b/pages/[...pages].tsx index 6caac1720..98d7697cd 100644 --- a/pages/[...pages].tsx +++ b/pages/[...pages].tsx @@ -8,8 +8,8 @@ import { Layout } from '@components/common' import getSlug from '@lib/get-slug' import { missingLocaleInPages } from '@lib/usage-warns' import { getConfig } from '@framework/api' -import getPage from '@framework/api/operations/get-page' -import getAllPages from '@framework/api/operations/get-all-pages' +import getPage from '@framework/common/get-page' +import getAllPages from '@framework/common/get-all-pages' import { defaultPageProps } from '@lib/defaults' export async function getStaticProps({ diff --git a/pages/blog.tsx b/pages/blog.tsx index a3a020bca..eca3b2295 100644 --- a/pages/blog.tsx +++ b/pages/blog.tsx @@ -1,6 +1,6 @@ import type { GetStaticPropsContext } from 'next' import { getConfig } from '@framework/api' -import getAllPages from '@framework/api/operations/get-all-pages' +import getAllPages from '@framework/common/get-all-pages' import { Layout } from '@components/common' import { Container } from '@components/ui' diff --git a/pages/cart.tsx b/pages/cart.tsx index 57b92db27..e78beed57 100644 --- a/pages/cart.tsx +++ b/pages/cart.tsx @@ -1,6 +1,6 @@ import type { GetStaticPropsContext } from 'next' import { getConfig } from '@framework/api' -import getAllPages from '@framework/api/operations/get-all-pages' +import getAllPages from '@framework/common/get-all-pages' import useCart from '@framework/cart/use-cart' import usePrice from '@framework/product/use-price' import { Layout } from '@components/common' diff --git a/pages/index.tsx b/pages/index.tsx index d3f3f6ba5..811472674 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -5,9 +5,9 @@ import HomeAllProductsGrid from '@components/common/HomeAllProductsGrid' import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next' import { getConfig } from '@framework/api' -import getAllProducts from '@framework/api/operations/get-all-products' -import getSiteInfo from '@framework/api/operations/get-site-info' -import getAllPages from '@framework/api/operations/get-all-pages' +import getAllProducts from '@framework/product/get-all-products' +import getSiteInfo from '@framework/common/get-site-info' +import getAllPages from '@framework/common/get-all-pages' export async function getStaticProps({ preview, diff --git a/pages/orders.tsx b/pages/orders.tsx index 973a021eb..08e32c2b2 100644 --- a/pages/orders.tsx +++ b/pages/orders.tsx @@ -1,6 +1,6 @@ import type { GetStaticPropsContext } from 'next' import { getConfig } from '@framework/api' -import getAllPages from '@framework/api/operations/get-all-pages' +import getAllPages from '@framework/common/get-all-pages' import { Layout } from '@components/common' import { Container, Text } from '@components/ui' import { Bag } from '@components/icons' diff --git a/pages/product/[slug].tsx b/pages/product/[slug].tsx index 4f17dcbad..3d2971eed 100644 --- a/pages/product/[slug].tsx +++ b/pages/product/[slug].tsx @@ -8,9 +8,9 @@ import { Layout } from '@components/common' import { ProductView } from '@components/product' import { getConfig } from '@framework/api' -import getProduct from '@framework/api/operations/get-product' -import getAllPages from '@framework/api/operations/get-all-pages' -import getAllProductPaths from '@framework/api/operations/get-all-product-paths' +import getProduct from '@framework/product/get-product' +import getAllPages from '@framework/common/get-all-pages' +import getAllProductPaths from '@framework/product/get-all-product-paths' export async function getStaticProps({ params, diff --git a/pages/profile.tsx b/pages/profile.tsx index 8b8c1a3b1..ec845c879 100644 --- a/pages/profile.tsx +++ b/pages/profile.tsx @@ -1,6 +1,6 @@ import type { GetStaticPropsContext } from 'next' import { getConfig } from '@framework/api' -import getAllPages from '@framework/api/operations/get-all-pages' +import getAllPages from '@framework/common/get-all-pages' import useCustomer from '@framework/customer/use-customer' import { Layout } from '@components/common' import { Container, Text } from '@components/ui' diff --git a/pages/search.tsx b/pages/search.tsx index d9367239f..e84569db3 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -9,9 +9,9 @@ import { ProductCard } from '@components/product' import { Container, Grid, Skeleton } from '@components/ui' import { getConfig } from '@framework/api' -import getAllPages from '@framework/api/operations/get-all-pages' -import getSiteInfo from '@framework/api/operations/get-site-info' import useSearch from '@framework/product/use-search' +import getAllPages from '@framework/common/get-all-pages' +import getSiteInfo from '@framework/common/get-site-info' import rangeMap from '@lib/range-map' diff --git a/pages/wishlist.tsx b/pages/wishlist.tsx index b4410a58c..9df111dc6 100644 --- a/pages/wishlist.tsx +++ b/pages/wishlist.tsx @@ -1,6 +1,6 @@ import type { GetStaticPropsContext } from 'next' import { getConfig } from '@framework/api' -import getAllPages from '@framework/api/operations/get-all-pages' +import getAllPages from '@framework/common/get-all-pages' import useWishlist from '@framework/wishlist/use-wishlist' import { Layout } from '@components/common' import { Heart } from '@components/icons' diff --git a/tsconfig.json b/tsconfig.json index d80fe8ba8..e6201f640 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,8 +27,8 @@ } }, "include": [ + "/framework/types.d.ts", "next-env.d.ts", - "framework/types.d.ts", "**/*.ts", "**/*.tsx", "**/*.js" diff --git a/yarn.lock b/yarn.lock index 4db1aba12..441f924fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2346,6 +2346,11 @@ commander@^2.13.0, commander@^2.16.0, commander@^2.20.0, commander@^2.20.3, comm resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@^5.0.0, commander@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" @@ -2982,6 +2987,14 @@ dot-case@^3.0.3: no-case "^3.0.4" tslib "^2.0.3" +dot-object@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/dot-object/-/dot-object-2.1.4.tgz#c6c54e9fca510b4d0ea4d65acf33726963843b5f" + integrity sha512-7FXnyyCLFawNYJ+NhkqyP9Wd2yzuo+7n9pGiYpkmXCTYa8Ci2U0eUNDVg5OuO5Pm6aFXI2SWN8/N/w7SJWu1WA== + dependencies: + commander "^4.0.0" + glob "^7.1.5" + dotenv@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" @@ -3618,7 +3631,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.6: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.5, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==