diff --git a/.gitignore b/.gitignore index 3ff64e5..cf1f20d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ node_modules .pnp .pnp.js yarn.lock +pnpm-lock.yaml +pnpm-workspace.yaml # testing coverage diff --git a/commerce.config.json b/commerce.config.json new file mode 100644 index 0000000..ffec73e --- /dev/null +++ b/commerce.config.json @@ -0,0 +1,6 @@ +{ + "features": { + "wishlist": false, + "customCheckout": true + } +} \ No newline at end of file diff --git a/packages/bagisto/src/api/utils/fetch/fetch-graphql-api.ts b/packages/bagisto/src/api/utils/fetch/fetch-graphql-api.ts index 4f64ab2..b0609ea 100644 --- a/packages/bagisto/src/api/utils/fetch/fetch-graphql-api.ts +++ b/packages/bagisto/src/api/utils/fetch/fetch-graphql-api.ts @@ -6,7 +6,7 @@ import type { BagistoConfig } from '../../' const fetchGraphqlApi: (getConfig: () => BagistoConfig) => GraphQLFetcher = (getConfig) => - async (query: string, { variables } = {}, fetchOptions) => { + async (query: string, { variables } = {}, fetchOptions): Promise => { const config = getConfig() const res = await fetch(config.commerceUrl, { ...fetchOptions, diff --git a/packages/commerce/src/api/index.ts b/packages/commerce/src/api/index.ts index c1d3e24..9ace32b 100644 --- a/packages/commerce/src/api/index.ts +++ b/packages/commerce/src/api/index.ts @@ -1,5 +1,5 @@ import type { NextApiHandler } from 'next' -import type { FetchOptions, Response } from '@vercel/fetch' +import type { FetchOptions } from '@vercel/fetch' import type { APIEndpoint, APIHandler } from './utils/types' import type { CartSchema } from '../types/cart' import type { CustomerSchema } from '../types/customer' diff --git a/packages/commerce/src/api/utils/errors.ts b/packages/commerce/src/api/utils/errors.ts index 6f9ecce..8fd3b6a 100644 --- a/packages/commerce/src/api/utils/errors.ts +++ b/packages/commerce/src/api/utils/errors.ts @@ -1,5 +1,3 @@ -import type { Response } from '@vercel/fetch' - export class CommerceAPIError extends Error { status: number res: Response diff --git a/packages/local/src/api/utils/fetch-local.ts b/packages/local/src/api/utils/fetch-local.ts index ae84fff..160a05c 100644 --- a/packages/local/src/api/utils/fetch-local.ts +++ b/packages/local/src/api/utils/fetch-local.ts @@ -5,7 +5,11 @@ import fetch from './fetch' const fetchGraphqlApi: (getConfig: () => LocalConfig) => GraphQLFetcher = (getConfig) => - async (query: string, { variables, preview } = {}, fetchOptions) => { + async ( + query: string, + { variables, preview } = {}, + fetchOptions + ): Promise => { const config = getConfig() const res = await fetch(config.commerceUrl, { ...fetchOptions, diff --git a/turbo.json b/turbo.json index c734b80..821f849 100644 --- a/turbo.json +++ b/turbo.json @@ -1,5 +1,5 @@ { - "baseBranch": "origin/main", + "$schema": "https://turborepo.org/schema.json", "pipeline": { "build": { "dependsOn": ["^build"],