Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 8477d23

Browse files
authored
Merge pull request #368 from DivanteLtd/release/v1.11-rc1
Release/v1.11
2 parents 40b5bcb + 74e4ce0 commit 8477d23

File tree

19 files changed

+2867
-1320
lines changed

19 files changed

+2867
-1320
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ src/config.json
1111
config/local.json
1212
config/certs/*.pem
1313
var/magento2-sample-data/
14-
var/*
1514
.migrate
1615
*.iml
1716
/docker/elasticsearch/data/

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [1.11.0-rc.1] - UNRELEASED
7+
## [1.11.0-rc.2] - unreleased
8+
9+
### Fixed
10+
11+
- Fixed some smaller issues with graphql so that it is now working again with the fronted - #350
12+
13+
14+
## [1.11.0-rc.1] - 2019.10.03
815

916
### Added
1017
- Experimental Elastic 7 support - @pkarw (#342)
@@ -32,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3239
### Changed
3340
- Error responses for mailchimp - @andrzejewsky (#3337)
3441
- Replaced function arguments to object destructuring in `calculateProductTax` - @andrzejewsky (#3337)
42+
- Refactor `taxcalc.js` similar to frontend - @gibkigonzo (#356)
3543

3644
## [1.10.0] - 2019.08.12
3745

@@ -49,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4957

5058
### Changed
5159
- Sharp dependency has been updated. *It might require reinstalling yarn dependencies* - @lukeromanowicz
60+
- Replaced index property value `not_analyzed` with `true` for `options` field in attribute schema - @adityasharma7 (#334)
5261

5362
### Fixed
5463
- Missing `res` and `req` parameters are now passed to ProductProcessor - @jahvi (#218)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Besides a big improvement for the shopping experience, we also want to create a
1919
- Docker and Docker Compose
2020

2121
Already included in `vue-storefront-api` Docker image (required locally, if you do not use containerization):
22-
- Node.js 8.x or higher
22+
- Node.js 10.x or higher
2323
- Yarn
2424

2525
## Installation
@@ -144,7 +144,7 @@ This backend is using ElasticSearch data formats popularized by [ElasticSuite fo
144144
Please use data migration mechanism provided to manipulate Redis, ElasticSearch or kue. Details: https://github.com/DivanteLtd/vue-storefront-api/tree/master/doc
145145

146146
## Adding custom modules with own dependencies (Yarn only)
147-
When adding custom [Extensions to the API](https://github.com/DivanteLtd/vue-storefront/blob/master/doc/Extending%20vue-storefront-api.md) you might want to define some dependencies inside them. Thanks to [Yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) dependecies defined inside your custom module will be intaled when you execute `yarn` at project root level, so it's way esier and faster than installing all modules dependcies separetly.
147+
When adding custom [Extensions to the API](https://github.com/DivanteLtd/vue-storefront/blob/master/doc/Extending%20vue-storefront-api.md) you might want to define some dependencies inside them. Thanks to [Yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) dependencies defined inside your custom module will be installed when you execute `yarn` at project root level, so it's way easier and faster than installing all modules dependencies separately.
148148

149149
To do this, define the `package.json` with your dependencies in your custom module:
150150
- `src/api/extensions/{your-custom-extension}/package.json`

config/default.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"storeCode": "de",
6464
"disabled": false,
6565
"storeId": 3,
66+
"websiteId": 1,
6667
"name": "German Store",
6768
"url": "/de",
6869
"elasticsearch": {
@@ -97,6 +98,7 @@
9798
"storeCode": "it",
9899
"disabled": false,
99100
"storeId": 4,
101+
"websiteId": 1,
100102
"name": "Italian Store",
101103
"url": "/it",
102104
"elasticsearch": {

config/elastic.schema.attribute.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
}
1515
}
1616
}
17-
}
17+
}

config/elastic.schema.category.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"is_active": {"type": "boolean"},
77
"product_count": {"type": "integer"},
88
"parent_id": {"type": "integer"},
9-
"position": {"type": "long"},
10-
"created_at": {
11-
"type": "date",
9+
"position": {"type": "integer"},
10+
"created_at": {
11+
"type": "date",
1212
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
1313
},
14-
"updated_at": {
15-
"type": "date",
14+
"updated_at": {
15+
"type": "date",
1616
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
1717
}
1818
}

scripts/db.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ program
2424

2525
console.log(`** Putting the mappings on top of ${tempIndex}`)
2626
es.putMappings(common.db, tempIndex, (err) => {
27+
if (err) {
28+
console.error(err.meta ? err.meta : err)
29+
}
30+
2731
console.log(`** We will reindex ${originalIndex} with the current schema`)
2832
es.reIndex(common.db, originalIndex, tempIndex, (err) => {
2933
if (err) {

src/api/user.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ export default ({config, db}) => {
119119
*/
120120
userApi.post('/reset-password', (req, res) => {
121121
const userProxy = _getProxy(req)
122+
const storeCode = req.query.storeCode
123+
const websiteId = config.storeViews[storeCode].websiteId
122124

123125
if (!req.body.email) {
124126
return apiStatus(res, 'Invalid e-mail provided!', 500)
125127
}
126128

127-
userProxy.resetPassword({ email: req.body.email, template: 'email_reset', websiteId: 1 }).then((result) => {
129+
userProxy.resetPassword({ email: req.body.email, template: 'email_reset', websiteId }).then((result) => {
128130
apiStatus(res, result, 200);
129131
}).catch(err => {
130132
apiError(res, err);
@@ -150,10 +152,10 @@ export default ({config, db}) => {
150152
userApi.get('/order-history', (req, res) => {
151153
const userProxy = _getProxy(req)
152154
userProxy.orderHistory(
153-
req.query.token,
154-
req.query.pageSize || 20,
155-
req.query.currentPage || 1
156-
).then((result) => {
155+
req.query.token,
156+
req.query.pageSize || 20,
157+
req.query.currentPage || 1
158+
).then((result) => {
157159
apiStatus(res, result, 200);
158160
}).catch(err => {
159161
apiError(res, err);

src/db.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import config from 'config'
2-
import * as redis from '../src/lib/redis'
3-
import * as elastic from '../src/lib/elastic'
2+
import * as redis from './lib/redis'
3+
import * as elastic from './lib/elastic'
44

55
export default callback => {
66
// connect to a database if needed, then pass it to `callback`:

src/graphql/elasticsearch/attribute/resolver.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ async function listAttributes (attributes, context, rootValue, _sourceIncludes)
1616
body: query,
1717
_sourceIncludes
1818
};
19-
if (parseInt(config.elasticsearch.apiVersion) < 6) {
20-
esQuery.type = config.elasticsearch.indexTypes[3]
21-
}
2219

2320
const response = await client.search(adjustQuery(esQuery, 'attribute', config));
2421

0 commit comments

Comments
 (0)