Skip to content

Commit 3534957

Browse files
authored
7.0.0 beta.2 proposal (#458)
# [7.0.0-beta.2](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.0.0-beta.2) (2019-11-05) #### Bug fixes - [ [#453](#453) ] Fix connected property ([Aschen](https://github.com/Aschen)) #### Enhancements - [ [#450](#450) ] Remove local checks for arguments ([Aschen](https://github.com/Aschen)) ---
1 parent 64806e7 commit 3534957

File tree

106 files changed

+25625
-1884
lines changed

Some content is hidden

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

106 files changed

+25625
-1884
lines changed

.ci/doc/docker-compose.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
version: '3'
22

33
services:
4-
# kuzzle:
5-
# image: kuzzleio/kuzzle:2
6-
# ports:
7-
# - '7512:7512'
8-
# cap_add:
9-
# - SYS_PTRACE
10-
# depends_on:
11-
# - redis
12-
# - elasticsearch
13-
# environment:
14-
# - kuzzle_services__storageEngine__client__node=http://elasticsearch:9200
15-
# - kuzzle_services__internalCache__node__host=redis
16-
# - kuzzle_services__memoryStorage__node__host=redis
17-
# - kuzzle_services__storageEngine__commonMapping__dynamic=true
18-
# - kuzzle_services__storageEngine__internalIndex__collections__users__dynamic=true
19-
# - NODE_ENV=production
4+
kuzzle:
5+
image: kuzzleio/kuzzle:2
6+
ports:
7+
- '7512:7512'
8+
cap_add:
9+
- SYS_PTRACE
10+
depends_on:
11+
- redis
12+
- elasticsearch
13+
environment:
14+
- kuzzle_services__storageEngine__client__node=http://elasticsearch:9200
15+
- kuzzle_services__internalCache__node__host=redis
16+
- kuzzle_services__memoryStorage__node__host=redis
17+
- kuzzle_services__storageEngine__commonMapping__dynamic=true
18+
- kuzzle_services__storageEngine__internalIndex__collections__users__dynamic=true
19+
- NODE_ENV=development
2020

21-
# redis:
22-
# image: redis:5
21+
redis:
22+
image: redis:5
2323

24-
# elasticsearch:
25-
# image: kuzzleio/elasticsearch:7.3.0
26-
# ulimits:
27-
# nofile: 65536
28-
# environment:
29-
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
30-
# - node.name=alyx
31-
# - cluster.name=kuzzle
32-
# - discovery.type=single-node
24+
elasticsearch:
25+
image: kuzzleio/elasticsearch:7.3.0
26+
ulimits:
27+
nofile: 65536
28+
environment:
29+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
30+
- node.name=alyx
31+
- cluster.name=kuzzle
32+
- discovery.type=single-node
3333

3434
doc-tests:
3535
image: kuzzleio/snippets-tests
3636
privileged: true
3737
ports:
3838
- '9229:9229'
3939
depends_on:
40-
# - kuzzle
40+
- kuzzle
4141
- doc-runner-node
4242
- doc-runner-web
4343
- doc-runner-webpack

.ci/docker-compose.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22

33
services:
44
kuzzle:
5-
image: kuzzleio/kuzzle
5+
image: kuzzleio/kuzzle:2
66
ports:
77
- "7512:7512"
88
cap_add:
@@ -28,7 +28,4 @@ services:
2828
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
2929
- node.name=alyx
3030
- cluster.name=kuzzle
31-
- discovery.type=single-node
32-
33-
volumes:
34-
snippets:
31+
- discovery.type=single-node

.ci/test-docs.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6+
cd "$here"
7+
8+
docker-compose -f ./doc/docker-compose.yml pull
9+
docker-compose -f ./doc/docker-compose.yml run doc-tests node index
10+
EXIT=$?
11+
docker-compose -f ./doc/docker-compose.yml down
12+
13+
docker-compose -f ./doc/docker-compose.yml up -d kuzzle
14+
15+
until $(curl --output /dev/null --silent --head --fail http://localhost:7512); do
16+
printf '.'
17+
sleep 5
18+
done
19+
20+
cd ${here}/../doc/7/getting-started/.react
21+
yarn install
22+
SKIP_PREFLIGHT_CHECK=true yarn start &
23+
npm run test
24+
25+
cd ${here}/../doc/7/getting-started/.vuejs
26+
npm ci
27+
npm run serve-standalone &
28+
npm run test
29+
30+
cd ${here}
31+
docker-compose -f ./doc/docker-compose.yml down
32+
33+
exit $EXIT

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ examples/node_modules/
1616
coverage/
1717

1818
doc/framework
19-
dead_links.json
19+
dead_links.json
20+
21+
# Cypress debug
22+
doc/6/getting-started/.react/cypress/screenshots
23+
doc/6/getting-started/.react/cypress/videos
24+
doc/6/getting-started/.vuejs/cypress/screenshots
25+
doc/6/getting-started/.vuejs/cypress/videos

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Unit Tests
1313
if: type = pull_request OR type = push AND branch =~ /^master|[0-9]+-(dev|stable)$/ OR type = cron
1414
language: node_js
15-
node_js: 6
15+
node_js: 10
1616

1717
env:
1818
# Codecov token
@@ -43,7 +43,7 @@ jobs:
4343
name: Integration Tests
4444
if: type = pull_request OR type = push AND branch =~ /^master|[0-9]+-(dev|stable)$/ OR type = cron
4545
language: node_js
46-
node_js: 6
46+
node_js: 10
4747

4848
addons:
4949
apt:
@@ -158,7 +158,7 @@ jobs:
158158
if: tag IS present AND type != cron
159159
sudo: false
160160
language: node_js
161-
node_js: 6
161+
node_js: 10
162162

163163
addons:
164164
apt:
@@ -191,7 +191,7 @@ jobs:
191191
if: type = push && branch =~ /^[0-9]+-dev$/
192192
sudo: false
193193
language: node_js
194-
node_js: 6
194+
node_js: 10
195195

196196
addons:
197197
apt:

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ Our teams will be able to meet your needs in terms of expertise and multi-techno
5757

5858
## Usage
5959

60+
## Compatibility matrice
61+
62+
| Kuzzle Version | SDK Version |
63+
| -------------- | -------------- |
64+
| 1.x.x | 5.x.x |
65+
| 1.x.x | 6.x.x |
66+
| 2.x.x | 7.x.x |
67+
6068
### Installation
6169

6270
This SDK can be used either in NodeJS or in a browser.
@@ -140,4 +148,3 @@ try {
140148
console.error(error);
141149
}
142150
```
143-

doc/7/controllers/document/m-create-or-replace/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ description: Create or replace documents
99

1010
Creates or replaces multiple documents.
1111

12-
Throws a partial error (error code 206) if one or more document creations/replacements fail.
13-
1412
<br/>
1513

1614
```js
@@ -21,7 +19,7 @@ mCreateOrReplace(index, collection, documents, [options]);
2119
| ------------ | --------------- | ---------------------------- |
2220
| `index` | <pre>string</pre> | Index name |
2321
| `collection` | <pre>string</pre> | Collection name |
24-
| `documents` | <pre>array<object></pre> | Array of documents to create |
22+
| `documents` | <pre>object[]</pre> | Array of documents to create |
2523
| `options` | <pre>object</pre> | Query options |
2624

2725
### Options

doc/7/controllers/document/m-create/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mCreate(index, collection, documents, [options]);
1919
| ------------ | --------------- | ---------------------------- |
2020
| `index` | <pre>string</pre> | Index name |
2121
| `collection` | <pre>string</pre> | Collection name |
22-
| `documents` | <pre>array<object></pre> | Array of documents to create |
22+
| `documents` | <pre>object[]</pre> | Array of documents to create |
2323
| `options` | <pre>object</pre> | Query options |
2424

2525
### Options
@@ -51,7 +51,6 @@ Each errored document is an object of the `errors` array with the following prop
5151
| `status` | <pre>number</pre> | HTTP error status |
5252
| `reason` | <pre>string</pre> | Human readable reason |
5353

54-
5554
## Usage
5655

5756
<<< ./snippets/m-create.js

doc/7/controllers/document/m-delete/index.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ description: Delete documents
99

1010
Deletes multiple documents.
1111

12-
Throws a partial error (error code 206) if one or more document deletions fail.
13-
1412
The optional parameter `refresh` can be used with the value `wait_for` in order to wait for the document indexation (indexed documents are available for `search`).
1513

1614
<br/>
@@ -23,7 +21,7 @@ mDelete(index, collection, ids, [options]);
2321
| ------------ | --------------- | ------------------------------ |
2422
| `index` | <pre>string</pre> | Index name |
2523
| `collection` | <pre>string</pre> | Collection name |
26-
| `ids` | <pre>array<string></pre> | IDs of the documents to delete |
24+
| `ids` | <pre>string[]</pre> | IDs of the documents to delete |
2725
| `options` | <pre>object</pre> | Query options |
2826

2927
### Options
@@ -37,9 +35,9 @@ Additional query options
3735

3836
## Resolves
3937

40-
Returns an object containing 2 arrays: `deleted` and `errors`
38+
Returns an object containing 2 arrays: `successes` and `errors`
4139

42-
The `deleted` array contain the successfuly deleted document IDs.
40+
The `successes` array contain the successfuly deleted document IDs.
4341

4442
Each deletion error is an object of the `errors` array with the following properties:
4543

doc/7/controllers/document/m-delete/snippets/m-delete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ try {
88
['some-id', 'some-other-id']
99
);
1010

11-
console.log(`Successfully deleted ${response.deleted.length} documents`);
11+
console.log(`Successfully deleted ${response.successes.length} documents`);
1212
} catch (error) {
1313
console.error(error.message);
1414
}

0 commit comments

Comments
 (0)