Skip to content

Commit

Permalink
Merge pull request #15 from VikasTiwari-Webkul/main
Browse files Browse the repository at this point in the history
Fix: Installation/Build issues
  • Loading branch information
VikasTiwari-Webkul authored Apr 3, 2024
2 parents 90b5773 + 7a29705 commit c95c500
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ node_modules
.pnp
.pnp.js
yarn.lock
pnpm-lock.yaml
pnpm-workspace.yaml

# testing
coverage
Expand Down
6 changes: 6 additions & 0 deletions commerce.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"features": {
"wishlist": false,
"customCheckout": true
}
}
2 changes: 1 addition & 1 deletion packages/bagisto/src/api/utils/fetch/fetch-graphql-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> => {
const config = getConfig()
const res = await fetch(config.commerceUrl, {
...fetchOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/commerce/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 0 additions & 2 deletions packages/commerce/src/api/utils/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { Response } from '@vercel/fetch'

export class CommerceAPIError extends Error {
status: number
res: Response
Expand Down
6 changes: 5 additions & 1 deletion packages/local/src/api/utils/fetch-local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> => {
const config = getConfig()
const res = await fetch(config.commerceUrl, {
...fetchOptions,
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"baseBranch": "origin/main",
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down

0 comments on commit c95c500

Please sign in to comment.