Skip to content

Commit

Permalink
Merge release/1.0.0-rc.2 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 2, 2021
2 parents 03187e3 + e86cfea commit b0a6fc9
Show file tree
Hide file tree
Showing 182 changed files with 2,291 additions and 2,441 deletions.
48 changes: 28 additions & 20 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
]
},
{
"login": "alefbarbeli",
"name": "Alef Barbeli",
"avatar_url": "https://avatars.githubusercontent.com/u/7727647?v=4",
"profile": "https://github.com/alefbarbeli",
"contributions": [
"code",
"doc"
]
},

"login": "alefbarbeli",
"name": "Alef Barbeli",
"avatar_url": "https://avatars.githubusercontent.com/u/7727647?v=4",
"profile": "https://github.com/alefbarbeli",
"contributions": [
"code",
"doc"
]
},
{
"login": "domideimel",
"name": "Dominik Deimel",
Expand All @@ -51,16 +50,25 @@
"code"
]
},
{
"login": "hcmlopes",
"name": "Henrique Lopes",
"avatar_url": "https://avatars.githubusercontent.com/u/20449158?v=4",
"profile": "https://github.com/hcmlopes",
"contributions": [
"code",
"doc"
]
},
{
"login": "hcmlopes",
"name": "Henrique Lopes",
"avatar_url": "https://avatars.githubusercontent.com/u/20449158?v=4",
"profile": "https://github.com/hcmlopes",
"contributions": [
"code",
"doc"
]
},
{
"login": "DaiLoc5698",
"name": "Đại Lộc Lê Quang",
"avatar_url": "https://avatars.githubusercontent.com/u/76195735?v=4",
"profile": "https://github.com/DaiLoc5698",
"contributions": [
"code"
]
},
{
"login": "filrak",
"name": "Filip Rakowski",
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ body:
label: Version
description: What version of the Magento 2 integration you are using?
options:
- 1.0.0-rc.2
- 1.0.0-rc.1
- 1.0.0-beta.14
validations:
Expand Down
15 changes: 15 additions & 0 deletions .graphqlconfig.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Magento 2 GraphQL Schema",
"schemaPath": "packages/api-client/schema.graphql",
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "https://{YOUR_SITE_FRONT_URL}/graphql",
"headers": {
"user-agent": "JS GraphQL"
},
"introspect": false
}
}
}
}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
## Vue Storefront 2 integration with Magento

This project is a Magento 2 integration for Vue Storefront 2.
This integration developed by superheroes from [Caravel Solutions](https://github.com/caravelsolutions) and [Leonex](https://www.leonex.de/) ❤️
This integration developed by superheroes from [Caravel](https://github.com/caravelx) and [Leonex](https://www.leonex.de/) ❤️
<div align="center">
<img src="https://user-images.githubusercontent.com/1626923/127100067-98eda368-94e3-47dd-b824-842d38dc8550.png" height="80px"/>  <img src="https://user-images.githubusercontent.com/1626923/127100001-7607c515-474d-449d-b9df-1c710f966f0a.png" height="80px"/>
</div>
------

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

## How to start if you want to try out the integration
Expand Down Expand Up @@ -83,9 +83,10 @@ Thanks go to these wonderful people ([emoji key](https://allcontributors.org/doc
<td align="center"><a href="https://github.com/domideimel"><img src="https://avatars.githubusercontent.com/u/32941053?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dominik Deimel</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=domideimel" title="Code">💻</a> <a href="https://github.com/vuestorefront/magento2/commits?author=domideimel" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/LiorLindvor"><img src="https://avatars.githubusercontent.com/u/6757942?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lior Lindvor</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=LiorLindvor" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hcmlopes"><img src="https://avatars.githubusercontent.com/u/20449158?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Henrique Lopes</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=hcmlopes" title="Code">💻</a> <a href="https://github.com/vuestorefront/magento2/commits?author=hcmlopes" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/filrak"><img src="https://avatars.githubusercontent.com/u/15185752?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Filip Rakowski</b></sub></a><br /><a href="#question-filrak" title="Answering Questions">💬</a> <a href="#mentoring-filrak" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Afilrak" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/DaiLoc5698"><img src="https://avatars.githubusercontent.com/u/76195735?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Đại Lộc Lê Quang</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=DaiLoc5698" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/filrak"><img src="https://avatars.githubusercontent.com/u/15185752?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Filip Rakowski</b></sub></a><br /><a href="#question-filrak" title="Answering Questions">💬</a> <a href="#mentoring-filrak" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Afilrak" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/filipsobol"><img src="https://avatars.githubusercontent.com/u/4145208?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Filip Sobol</b></sub></a><br /><a href="#question-filipsobol" title="Answering Questions">💬</a> <a href="#mentoring-filipsobol" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Afilipsobol" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/andrzejewsky"><img src="https://avatars.githubusercontent.com/u/7943292?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patryk Andrzejewski</b></sub></a><br /><a href="#question-andrzejewsky" title="Answering Questions">💬</a> <a href="#mentoring-andrzejewsky" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Aandrzejewsky" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/renanoliveira0"><img src="https://avatars.githubusercontent.com/u/1081576?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Renan Oliveira</b></sub></a><br /><a href="#tool-renanoliveira0" title="Tools">🔧</a> <a href="#plugin-renanoliveira0" title="Plugin/utility libraries">🔌</a></td>
Expand Down
4 changes: 3 additions & 1 deletion codegen.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
overwrite: true
schema: "packages/api-client/schema.graphql"
documents: "packages/api-client/src/**/*.graphql"
documents:
- "packages/api-client/src/api/**/!(*.d).{ts,tsx}"
- "packages/api-client/src/fragments/**/!(*.d).{ts,tsx}"
generates:
packages/api-client/src/types/GraphQL.ts:
plugins:
Expand Down
2 changes: 1 addition & 1 deletion internals/eslint-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"rules"
],
"dependencies": {
"eslint-plugin-vue": "^7.14.0"
"eslint-plugin-vue": "^7.15.0"
},
"main": "index.js"
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@commitlint/config-lerna-scopes": "^13.1.0",
"@graphql-codegen/cli": "1.21.7",
"@graphql-codegen/cli": "1.21.8",
"@graphql-codegen/typescript": "1.23.0",
"@graphql-codegen/typescript-operations": "^1.18.4",
"@manypkg/cli": "^0.18.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@types/graphql": "^14.5.0",
"@types/jest": "^26.0.24",
"@types/jsdom": "^16.2.13",
"@types/node": "^16.4.3",
"@types/node": "^16.4.7",
"@types/webpack": "^5.28.0",
"@typescript-eslint/parser": "^4.28.5",
"@vue/eslint-config-typescript": "^7.0.0",
Expand All @@ -73,14 +73,14 @@
"majestic": "^1.8.1",
"npm-check-updates": "^11.8.3",
"rimraf": "^3.0.2",
"rollup": "^2.54.0",
"rollup": "^2.55.1",
"rollup-plugin-typescript2": "^0.30.0",
"shx": "^0.3.3",
"ts-jest": "^27.0.4",
"ts-node": "^10.1.0",
"tslib": "^2.3.0",
"typescript": "^4.3.5",
"vue-eslint-parser": "^7.9.0"
"vue-eslint-parser": "^7.10.0"
},
"engines": {
"node": ">=14.x"
Expand Down
8 changes: 5 additions & 3 deletions packages/api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ This is only the **api-client** package, you need to install the other dependenc
------

This project is a Magento 2 integration for Vue Storefront 2.
This integration developed by superheroes from [Caravel Solutions](https://github.com/caravelsolutions) and [Leonex](https://www.leonex.de/) ❤️
This integration developed by superheroes from [Caravel](https://github.com/caravelx) and [Leonex](https://www.leonex.de/) ❤️

<div align="center">
<img src="https://user-images.githubusercontent.com/1626923/127100067-98eda368-94e3-47dd-b824-842d38dc8550.png" height="80px"/>  <img src="https://user-images.githubusercontent.com/1626923/127100001-7607c515-474d-449d-b9df-1c710f966f0a.png" height="80px"/>
</div>

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->


## How to start if you want to try out the integration

```
Expand Down Expand Up @@ -86,9 +87,10 @@ Thanks go to these wonderful people ([emoji key](https://allcontributors.org/doc
<td align="center"><a href="https://github.com/domideimel"><img src="https://avatars.githubusercontent.com/u/32941053?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dominik Deimel</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=domideimel" title="Code">💻</a> <a href="https://github.com/vuestorefront/magento2/commits?author=domideimel" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/LiorLindvor"><img src="https://avatars.githubusercontent.com/u/6757942?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lior Lindvor</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=LiorLindvor" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hcmlopes"><img src="https://avatars.githubusercontent.com/u/20449158?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Henrique Lopes</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=hcmlopes" title="Code">💻</a> <a href="https://github.com/vuestorefront/magento2/commits?author=hcmlopes" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/filrak"><img src="https://avatars.githubusercontent.com/u/15185752?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Filip Rakowski</b></sub></a><br /><a href="#question-filrak" title="Answering Questions">💬</a> <a href="#mentoring-filrak" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Afilrak" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/DaiLoc5698"><img src="https://avatars.githubusercontent.com/u/76195735?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Đại Lộc Lê Quang</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=DaiLoc5698" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/filrak"><img src="https://avatars.githubusercontent.com/u/15185752?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Filip Rakowski</b></sub></a><br /><a href="#question-filrak" title="Answering Questions">💬</a> <a href="#mentoring-filrak" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Afilrak" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/filipsobol"><img src="https://avatars.githubusercontent.com/u/4145208?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Filip Sobol</b></sub></a><br /><a href="#question-filipsobol" title="Answering Questions">💬</a> <a href="#mentoring-filipsobol" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Afilipsobol" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/andrzejewsky"><img src="https://avatars.githubusercontent.com/u/7943292?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patryk Andrzejewski</b></sub></a><br /><a href="#question-andrzejewsky" title="Answering Questions">💬</a> <a href="#mentoring-andrzejewsky" title="Mentoring">🧑‍🏫</a> <a href="https://github.com/vuestorefront/magento2/pulls?q=is%3Apr+reviewed-by%3Aandrzejewsky" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/renanoliveira0"><img src="https://avatars.githubusercontent.com/u/1081576?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Renan Oliveira</b></sub></a><br /><a href="#tool-renanoliveira0" title="Tools">🔧</a> <a href="#plugin-renanoliveira0" title="Plugin/utility libraries">🔌</a></td>
Expand Down
9 changes: 5 additions & 4 deletions packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/magento-api",
"version": "1.0.0-rc.1",
"version": "1.0.0-rc.2",
"sideEffects": false,
"homepage": "https://github.com/vuestorefront/magento2",
"bugs": {
Expand All @@ -24,7 +24,7 @@
"update:update": "ncu -u"
},
"dependencies": {
"@apollo/client": "^3.3.21",
"@apollo/client": "^3.4.1",
"@vue-storefront/core": "^2.3.4",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",
Expand All @@ -38,8 +38,8 @@
"isomorphic-fetch": "^3.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-graphql": "^1.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-json": "^4.1.0",
"@types/isomorphic-fetch": "^0.0.35",
"apollo-link-schema": "^1.2.5",
Expand All @@ -52,7 +52,8 @@
},
"files": [
"lib/**/*",
"server/**/*"
"server/**/*",
"types/**/*"
],
"publishConfig": {
"access": "public",
Expand Down
18 changes: 14 additions & 4 deletions packages/api-client/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
/* eslint-disable import/no-extraneous-dependencies */
import commonjs from '@rollup/plugin-commonjs';
import graphql from '@rollup/plugin-graphql';
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json';
import { generateBaseConfig } from '../../rollup.base.config';

const extensions = ['.ts', '.graphql', '.js'];
const extensions = ['.js', '.jsx', '.es6', '.es', '.mjs', '.ts', '.graphql'];

const server = {
input: 'src/index.server.ts',
Expand All @@ -25,9 +27,17 @@ const server = {
nodeResolve({
extensions,
}),
typescript({ useTsconfigDeclarationDir: true }),
graphql(),
json(),
typescript({
rollupCommonJSResolveHack: false,
useTsconfigDeclarationDir: true,
// eslint-disable-next-line unicorn/prefer-module
tslib: require.resolve('typescript'),
}),
commonjs({
extensions,
}),
],
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import gql from 'graphql-tag';
import CompleteCartData from '../../fragments/completeCartFragment';

export default gql`
${CompleteCartData}
mutation addConfigurableProductsToCart($input: AddConfigurableProductsToCartInput) {
addConfigurableProductsToCart(input: $input) {
cart {
...CompleteCartData
}
}
}`;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FetchResult } from '@apollo/client';
import mutation from './mutation.graphql';
import addConfigurableProductsToCart from './addConfigurableProductsToCart';
import {
AddConfigurableProductsToCartMutationVariables,
AddConfigurableProductsToCartMutation,
Expand All @@ -12,6 +12,6 @@ export default async (
input: AddConfigurableProductsToCartInput,
): Promise<FetchResult<AddConfigurableProductsToCartMutation>> => client
.mutate<any, AddConfigurableProductsToCartMutationVariables>({
mutation,
mutation: addConfigurableProductsToCart,
variables: { input },
});

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#import "../../fragments/wishlistDataFragment.graphql"
import gql from 'graphql-tag';
import WishlistData from '../../fragments/wishlistDataFragment';

export default gql`
${WishlistData}
mutation addProductsToWishlist($id: ID!, $items: [WishlistItemInput!]!) {
addProductsToWishlist(wishlistId: $id, wishlistItems: $items) {
wishlist {
...Wishlistdata
...WishlistData
}
}
}
}`;
4 changes: 2 additions & 2 deletions packages/api-client/src/api/addProductToWishList/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FetchResult } from '@apollo/client';
import mutation from './mutation.graphql';
import addProductsToWishlist from './addProductsToWishlist';
import {
AddProductsToWishlistMutation,
AddProductsToWishlistMutationVariables,
Expand All @@ -11,6 +11,6 @@ export default async (
input: AddProductsToWishlistMutationVariables,
): Promise<FetchResult<AddProductsToWishlistMutation>> => client
.mutate<AddProductsToWishlistMutation, AddProductsToWishlistMutationVariables>({
mutation,
mutation: addProductsToWishlist,
variables: input,
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#import "../../fragments/completeCartFragment.graphql"
import gql from 'graphql-tag';
import CompleteCartData from '../../fragments/completeCartFragment';

export default gql`
${CompleteCartData}
mutation addProductsToCart($cartId: String!, $cartItems: [CartItemInput!]!) {
addProductsToCart(cartId,: $cartId, cartItems,: $cartItems) {
cart {
...CompleteCartData
}
}
}
}`;
12 changes: 8 additions & 4 deletions packages/api-client/src/api/addProductsToCart/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { FetchResult } from '@apollo/client';
import mutation from './mutation.graphql';
import addProductsToCart from './addProductsToCart';
import {
AddProductsToCartInput,
AddProductsToCartMutation,
AddProductsToCartMutation, CartItemInput,
} from '../../types/GraphQL';
import { Context } from '../../types/context';

export type AddProductsToCartInput = {
cartId: string;
cartItems: CartItemInput[];
};

export default async (
{ client }: Context,
input: AddProductsToCartInput,
): Promise<FetchResult<AddProductsToCartMutation>> => client
.mutate<AddProductsToCartMutation, AddProductsToCartInput>({
mutation,
mutation: addProductsToCart,
variables: input,
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#import "../../fragments/completeCartFragment.graphql"
import gql from 'graphql-tag';
import CompleteCartData from '../../fragments/completeCartFragment';

export default gql`
${CompleteCartData}
mutation addSimpleProductsToCart($input: AddSimpleProductsToCartInput) {
addSimpleProductsToCart(input: $input) {
cart {
...CompleteCartData
}
}
}
}`;
Loading

0 comments on commit b0a6fc9

Please sign in to comment.