-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(update nuxt version / dependencies): project configuration
- Loading branch information
1 parent
8c1a7fe
commit 6337ee0
Showing
76 changed files
with
150,276 additions
and
3,181 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
yarn-path ".yarn/releases/yarn-1.19.0.cjs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
}, | ||
"packages": [ | ||
"packages/**/*", | ||
"playground/**/*" | ||
"playground-nuxt/**/*" | ||
], | ||
"version": "1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ODOO_BASE_URL=https://vsfdemo15.labs.odoogap.com/graphql/vsf | ||
|
||
NUXT_PUBLIC_MIDDLEWARE_URL=http://localhost:3000/ | ||
NUXT_PUBLIC_MIDDLEWARE_PORT=8443 | ||
|
||
NODE_ENV=dev | ||
NUXT_NODE_LOCALE=en-EN | ||
NUXT_PUBLIC_VSF_PORT=3000 | ||
|
||
REDIS_ENABLED=false | ||
REDIS_HOST=127.0.0.1 | ||
REDIS_PORT=6379 | ||
REDIS_PASSWORD=pass | ||
# Used for invalidating cache | ||
NUXT_REDIS_INVALIDATION_KEY=123 | ||
|
||
NUXT_TELEMETRY_DISABLED=1 | ||
GOOGLE_TAG_MANAGER_ID=1 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 5 additions & 9 deletions
14
playground/app/nuxt.config.ts → playground-nuxt/app/nuxt.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
playground/app/pages/category/[id].vue → playground-nuxt/app/pages/category/[id].vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script setup lang="ts"> | ||
import { QueryProductVariantArgs, ProductVariantQueryResponse, MutationLoginArgs, LoginMutationResponse } from '~/graphql' | ||
import { QueryName } from '~/server/queries'; | ||
import { MutationName } from '~/server/mutations'; | ||
const { $sdk } = useNuxtApp(); | ||
const { data } = await $sdk().odoo.query<QueryProductVariantArgs, ProductVariantQueryResponse>({ queryName: QueryName.ProductVariantQuery }, { | ||
productTemplateId: 39, | ||
combinationId: [12, 305] | ||
}); | ||
console.log(data.productVariant.displayName); | ||
const { data: dataMut } = await $sdk().odoo.mutation<MutationLoginArgs, LoginMutationResponse>({ mutationName: MutationName.LoginMutation }, { | ||
email: "[email protected]", | ||
password: "123" | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<MainBanner /> | ||
|
||
</div> | ||
</template> |
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
playground/app/plugins/2.getImage.client.ts → ...und-nuxt/app/plugins/2.getImage.client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { initSDK, buildModule } from '@vue-storefront/sdk'; | ||
import { OdooModule, OdooModuleType } from '@erpgap/odoo-sdk'; | ||
|
||
export default defineNuxtPlugin(async (nuxtApp) => { | ||
const config = useRuntimeConfig(); | ||
|
||
const sdkConfig = { | ||
odoo: buildModule<OdooModuleType>(OdooModule, { | ||
apiUrl: `${config.public.middlewareUrl}api/odoo/` | ||
}) | ||
}; | ||
|
||
return { | ||
provide: { | ||
sdk: () => initSDK<typeof sdkConfig>(sdkConfig) | ||
} | ||
}; | ||
}); |
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Endpoints } from '@erpgap/odoo-sdk-api-client'; | ||
|
||
export default defineEventHandler(async (event) => { | ||
const body = await readBody(event); | ||
|
||
const api: Endpoints = event.context.apolloClient.api; | ||
|
||
return await api.mutation(body[0], body[1]); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Endpoints } from '@erpgap/odoo-sdk-api-client'; | ||
|
||
export default cachedEventHandler(async (event) => { | ||
const body = await readBody(event); | ||
|
||
const api: Endpoints = event.context.apolloClient.api; | ||
|
||
return await api.query(body[0], body[1]); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { createApiClient } from '@erpgap/odoo-sdk-api-client/server'; | ||
import { Queries } from '~/server/queries'; | ||
import { Mutations } from '~/server/mutations'; | ||
|
||
export default defineEventHandler((event) => { | ||
|
||
event.context.apolloClient = createApiClient({ | ||
odooGraphqlUrl: `${process.env.ODOO_BASE_URL}graphql/vsf`, | ||
queries: { ...Queries, ...Mutations } | ||
}); | ||
}); | ||
|
10 changes: 10 additions & 0 deletions
10
playground-nuxt/app/server/mutations/ChangePasswordMutation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { gql } from '@apollo/client/core'; | ||
export default gql` | ||
mutation($newPassword: String!, $token: String!) { | ||
changePassword(newPassword: $newPassword, token: $token) { | ||
id | ||
name | ||
} | ||
} | ||
`; |
25 changes: 25 additions & 0 deletions
25
playground-nuxt/app/server/mutations/CreateNewAccountMutation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { gql } from '@apollo/client/core'; | ||
|
||
export default gql` | ||
mutation register($companyName: String!, $firstName: String!, $lastName: String!, $email: String!, $location : String!$password: String!, $phoneNumber: String!) { | ||
register(companyName: $companyName, firstName: $firstName, lastName: $lastName, email: $email, location: $location, password: $password, phoneNumber: $phoneNumber) { | ||
partner{ | ||
id | ||
name | ||
street | ||
street2 | ||
city | ||
state | ||
{ | ||
id | ||
} | ||
country | ||
{ | ||
id | ||
} | ||
phone | ||
} | ||
} | ||
}`; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { gql } from '@apollo/client/core'; | ||
export default gql` | ||
mutation($email: String!, $password: String!) { | ||
login(email: $email, password: $password) { | ||
partner{ | ||
id | ||
name | ||
street | ||
street2 | ||
city | ||
state | ||
{ | ||
id | ||
} | ||
country | ||
{ | ||
id | ||
} | ||
phone | ||
} | ||
} | ||
}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { gql } from '@apollo/client/core'; | ||
export default gql` | ||
mutation { | ||
logout | ||
} | ||
`; |
10 changes: 10 additions & 0 deletions
10
playground-nuxt/app/server/mutations/SendResetPasswordMutation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { gql } from '@apollo/client/core'; | ||
export default gql` | ||
mutation($email: String!) { | ||
resetPassword(email: $email) { | ||
id | ||
name | ||
} | ||
} | ||
`; |
Oops, something went wrong.