Skip to content

Commit c95c500

Browse files
Merge pull request #15 from VikasTiwari-Webkul/main
Fix: Installation/Build issues
2 parents 90b5773 + 7a29705 commit c95c500

7 files changed

Lines changed: 16 additions & 6 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ node_modules
55
.pnp
66
.pnp.js
77
yarn.lock
8+
pnpm-lock.yaml
9+
pnpm-workspace.yaml
810

911
# testing
1012
coverage

commerce.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"features": {
3+
"wishlist": false,
4+
"customCheckout": true
5+
}
6+
}

packages/bagisto/src/api/utils/fetch/fetch-graphql-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { BagistoConfig } from '../../'
66

77
const fetchGraphqlApi: (getConfig: () => BagistoConfig) => GraphQLFetcher =
88
(getConfig) =>
9-
async (query: string, { variables } = {}, fetchOptions) => {
9+
async (query: string, { variables } = {}, fetchOptions): Promise<any> => {
1010
const config = getConfig()
1111
const res = await fetch(config.commerceUrl, {
1212
...fetchOptions,

packages/commerce/src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { NextApiHandler } from 'next'
2-
import type { FetchOptions, Response } from '@vercel/fetch'
2+
import type { FetchOptions } from '@vercel/fetch'
33
import type { APIEndpoint, APIHandler } from './utils/types'
44
import type { CartSchema } from '../types/cart'
55
import type { CustomerSchema } from '../types/customer'

packages/commerce/src/api/utils/errors.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type { Response } from '@vercel/fetch'
2-
31
export class CommerceAPIError extends Error {
42
status: number
53
res: Response

packages/local/src/api/utils/fetch-local.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import fetch from './fetch'
55

66
const fetchGraphqlApi: (getConfig: () => LocalConfig) => GraphQLFetcher =
77
(getConfig) =>
8-
async (query: string, { variables, preview } = {}, fetchOptions) => {
8+
async (
9+
query: string,
10+
{ variables, preview } = {},
11+
fetchOptions
12+
): Promise<any> => {
913
const config = getConfig()
1014
const res = await fetch(config.commerceUrl, {
1115
...fetchOptions,

turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"baseBranch": "origin/main",
2+
"$schema": "https://turborepo.org/schema.json",
33
"pipeline": {
44
"build": {
55
"dependsOn": ["^build"],

0 commit comments

Comments
 (0)