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

Commit f0e73a2

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature/searchQuery-graphQl-Update-1
# Conflicts: # src/graphql/elasticsearch/catalog/processor.js # src/graphql/elasticsearch/catalog/resolver.js
2 parents ae34301 + 00387cb commit f0e73a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4708
-2194
lines changed

.eslintrc.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module.exports = {
2+
root: true,
3+
env: { jest: true, node: true, es6: true},
4+
parserOptions: {
5+
parser: '@typescript-eslint/parser',
6+
ecmaVersion: 2018,
7+
sourceType: 'module'
8+
},
9+
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
10+
extends: [
11+
'standard',
12+
'plugin:@typescript-eslint/recommended'
13+
],
14+
plugins: ['vue-storefront', '@typescript-eslint'],
15+
// add your custom rules here
16+
rules: {
17+
'@typescript-eslint/no-var-requires': 1,
18+
'@typescript-eslint/indent': ['error', 2],
19+
'@typescript-eslint/camelcase': 0,
20+
semi: 'off',
21+
'@typescript-eslint/semi': 0,
22+
'@typescript-eslint/member-delimiter-style': ['error', { 'multiline': { 'delimiter': 'comma', 'requireLast': false }, 'singleline': { 'delimiter': 'comma' } }],
23+
'@typescript-eslint/no-empty-interface': 1,
24+
'@typescript-eslint/no-use-before-define': 1,
25+
'@typescript-eslint/no-explicit-any': 0,
26+
'@typescript-eslint/class-name-casing': 1,
27+
'@typescript-eslint/no-unused-vars': 0,
28+
'@typescript-eslint/explicit-function-return-type': 0,
29+
'@typescript-eslint/no-var-requires': 0,
30+
'handle-callback-err': 1,
31+
'prefer-promise-reject-errors': 0,
32+
'import/no-duplicates': ['warning'],
33+
// allow paren-less arrow functions
34+
'arrow-parens': 0,
35+
'prefer-arrow-callback': 1,
36+
// allow async-await
37+
'generator-star-spacing': 0,
38+
// allow debugger during development
39+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
40+
'no-restricted-imports': [2, { paths: ['lodash-es'] }],
41+
'vue-storefront/no-corecomponent-import': 'error',
42+
'vue-storefront/no-corecomponent': 'error',
43+
'vue-storefront/no-corepage-import': 'error',
44+
'vue-storefront/no-corepage': 'error',
45+
'no-console': 0,
46+
'no-unused-vars': 1
47+
},
48+
overrides: [
49+
{
50+
// @todo check if this is closed https://github.com/typescript-eslint/typescript-eslint/issues/342
51+
// This is an issue with interfaces so we need to wait until it fixed.
52+
files: ['core/**/*.ts'],
53+
rules: {
54+
'no-undef': 1
55+
}
56+
}
57+
]
58+
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ api_test.sh
99
package-lock.json
1010
src/config.json
1111
config/local.json
12+
config/certs/*.pem
1213
var/magento2-sample-data/
1314
.migrate
1415
*.iml

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ jobs:
2121
- <<: *build
2222
node_js: '8'
2323

24+
- &unit
25+
stage: Test
26+
script: yarn test:unit
27+
name: "NodeJS 10 unit tests"
28+
node_js: "10"
29+
30+
- <<: *unit
31+
name: "NodeJS 8 unit tests"
32+
node_js: "8"

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ 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
8+
9+
### Added
10+
- Constant for Mailchimp subscription status - @KonstantinSoelch (#294)
11+
- mage2vs import now has optional `--generate-unique-url-keys` parameter which defaults to `false` to enable/disable the url key generation with name and id for categories - @rain2o (#232)
12+
- Added eslint config from vue-storefront so we have the same config and in both repos typescript support - @resubaka (#320)
13+
- Added jest support - @resubaka (#321)
14+
15+
### Fixed
16+
- The `product.price_*` fields have been normalized with the backward compatibility support (see `config.tax.deprecatedPriceFieldsSupport` which is by default true) - @pkarw (#289)
17+
- The `product.final_price` field is now being taken into product price calcualtion. Moreover, we've added the `config.tax.finalPriceIncludesTax` - which is set to `true` by default. All the `price`, `original_price` and `special_price` fields are calculated accordingly. It was required as Magento2 uses `final_price` to set the catalog pricing rules after-prices - @pkarw (#289)
18+
- Force ES connections to use protocol config option - @cewald (#303, #304)
19+
- Better handling of HTTP error codes provided by API client - #3151
20+
721
## [1.10.0-rc.1] - UNRELEASED
822

923
### Added
@@ -16,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1630
- Extensions have ability to modify Elasticsearch results. @grimasod (#269)
1731
- Refactored Travis build config @Tjitse-E (#273)
1832
- Multistore support for `magento1`-platform using `magento1-vsbridge` @cewald (#276)
33+
- Support self signed certificates - @lukeromanowicz (#287)
1934

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

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ You can use the following command to run a delta indexer for a specific storevie
146146
yarn mage2vs productsdelta --store-code=de
147147
```
148148

149+
## Self signed certificates
150+
151+
Often in non production environment other services are using self signed certificates for secure connection.
152+
You can easily setup the application to trust them by putting them in config/certs directory.
153+
149154
License
150155
-------
151156

config/certs/.gitkeep

Whitespace-only changes.

config/default.json

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@
6969
"tax": {
7070
"defaultCountry": "DE",
7171
"defaultRegion": "",
72+
"deprecatedPriceFieldsSupport": true,
7273
"calculateServerSide": true,
73-
"sourcePriceIncludesTax": false
74+
"sourcePriceIncludesTax": false,
75+
"finalPriceIncludesTax": true
7476
},
7577
"i18n": {
7678
"fullCountryName": "Germany",
@@ -100,7 +102,9 @@
100102
"defaultCountry": "IT",
101103
"defaultRegion": "",
102104
"calculateServerSide": true,
103-
"sourcePriceIncludesTax": false
105+
"sourcePriceIncludesTax": false,
106+
"deprecatedPriceFieldsSupport": true,
107+
"finalPriceIncludesTax": true
104108
},
105109
"i18n": {
106110
"fullCountryName": "Italy",
@@ -126,7 +130,9 @@
126130
"alwaysSyncPlatformPricesOver": false,
127131
"usePlatformTotals": true,
128132
"setConfigurableProductOptions": true,
129-
"sourcePriceIncludesTax": false
133+
"sourcePriceIncludesTax": false,
134+
"deprecatedPriceFieldsSupport": true,
135+
"finalPriceIncludesTax": true
130136
},
131137
"bodyLimit": "100kb",
132138
"corsHeaders": [
@@ -144,7 +150,8 @@
144150
"mailchimp": {
145151
"listId": "e06875a7e1",
146152
"apiKey": "a9a3318ea7d30f5c5596bd4a78ae0985-us3",
147-
"apiUrl": "https://us3.api.mailchimp.com/3.0"
153+
"apiUrl": "https://us3.api.mailchimp.com/3.0",
154+
"userStatus": "subscribed"
148155
},
149156
"mailService": {
150157
"transport": {
@@ -216,7 +223,17 @@
216223
"process": 4
217224
},
218225
"simd": true,
219-
"keepDownloads": true
226+
"keepDownloads": true,
227+
"caching": {
228+
"active": false,
229+
"type": "file",
230+
"file": {
231+
"path": "/tmp/vue-storefront-api"
232+
}
233+
},
234+
"action": {
235+
"type": "local"
236+
}
220237
},
221238
"entities": {
222239
"category": {

config/test.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

docker/vue-storefront-api/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ WORKDIR /var/www
77
RUN apk add --no-cache curl git
88

99
COPY package.json ./
10+
COPY yarn.lock ./
1011

1112
RUN apk add --no-cache --virtual .build-deps ca-certificates wget && \
1213
yarn install --no-cache && \

migrations/.common.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ let queue = kue.createQueue(Object.assign(config.kue, { redis: config.redis }))
55

66
let es = require('elasticsearch')
77
const esConfig = {
8-
host: config.elasticsearch.host + ':' + config.elasticsearch.port,
8+
host: {
9+
host: config.elasticsearch.host,
10+
port: config.elasticsearch.port,
11+
protocol: config.elasticsearch.protocol
12+
},
913
log: 'debug',
1014
apiVersion: config.elasticsearch.apiVersion,
1115
requestTimeout: 1000 * 60 * 60,

0 commit comments

Comments
 (0)