Skip to content

Commit fc45968

Browse files
authored
Merge pull request #553 from kuzzleio/7.4.1-proposal
# [7.4.1](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.4.1) (2020-10-28) #### Enhancements - [ [#552](#552) ] Upgrade to typescript 4 compatible code ([scottinet](https://github.com/scottinet)) - [ [#551](#551) ] Export interfaces ([Aschen](https://github.com/Aschen)) #### Others - [ [#548](#548) ] [doc] Add a disclaimer about Expo in getting started React Native ([Njuelle](https://github.com/Njuelle)) - [ [#547](#547) ] Stick `realtime:unsubscribe` behavior to documentation ([Yoann-Abbes](https://github.com/Yoann-Abbes)) ---
2 parents 4515cdf + a20cd6d commit fc45968

File tree

16 files changed

+1225
-3167
lines changed

16 files changed

+1225
-3167
lines changed

.ci/doc/eslint.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@
2828
"block-spacing": ["error", "always"],
2929
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
3030
"camelcase": ["error", { "properties": "never" }],
31-
"comma-dangle": [
32-
"error",
33-
{
34-
"arrays": "never",
35-
"objects": "never",
36-
"imports": "never",
37-
"exports": "never",
38-
"functions": "never"
39-
}
40-
],
4131
"comma-spacing": ["error", { "before": false, "after": true }],
4232
"comma-style": ["error", "last"],
4333
"constructor-super": "error",

.ci/doc/templates/default.tpl.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ const {
55
} = require('kuzzle-sdk');
66

77
// Instantiates a Kuzzle client
8-
const
9-
kuzzle = new Kuzzle(
10-
new WebSocket('kuzzle', { autoReconnect: false })
11-
);
8+
const kuzzle = new Kuzzle(new WebSocket('kuzzle', { autoReconnect: false }));
129

1310
// Adds a listener to detect any connection problems
1411
kuzzle.on('networkError', error => {
@@ -21,6 +18,7 @@ kuzzle.on('networkError', error => {
2118
} catch (error) {
2219
console.log(`Can not connect to Kuzzle: ${error.message}`);
2320
}
21+
2422
[snippet-code] finally {
2523
kuzzle.disconnect();
2624
}

.ci/test-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -e
3+
set -ex
44

55
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
66
cd "$here"

.eslintrc-ts.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"plugin:@typescript-eslint/recommended"
1111
],
1212
"rules": {
13+
"no-shadow": "off",
14+
"@typescript-eslint/no-shadow": "error",
1315
"@typescript-eslint/no-explicit-any": 0,
1416
"@typescript-eslint/explicit-module-boundary-types": 0
1517
}
16-
}
18+
}

doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
try {
2-
await kuzzle.auth.login('local', { username: 'jane.doe', password: 'password' });
2+
await kuzzle.auth.login('local', {
3+
username: 'jane.doe',
4+
password: 'password',
5+
});
36

4-
await kuzzle.auth.deleteApiKey('fQRa28BsidO6V_wmOcL');
7+
const apiKey = await kuzzle.auth.createApiKey('Sigfox API key', {
8+
refresh: 'wait_for'
9+
});
10+
11+
await kuzzle.auth.deleteApiKey(apiKey._id);
512

613
console.log('API key successfully deleted');
714
} catch (e) {

doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ hooks:
1313
}
1414
}
1515
}' "kuzzle:7512/users/jane.doe/_create?refresh=wait_for"
16-
&&
17-
curl -XPOST -H "Content-type: application/json" -d '{
18-
"description": "Sigfox API key"
19-
}' "kuzzle:7512/users/jane.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for"
2016
after:
2117
curl -XDELETE kuzzle:7512/users/jane.doe
2218
template: default

doc/7/getting-started/react-native/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ This section deals with **Kuzzle V2** (+ **Javascript SDK 7**) and **React Nativ
2020

2121
"[Expo](https://docs.expo.io/versions/latest/) is a framework and a platform for universal React applications. It is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS, Android, and web apps from the same JavaScript/TypeScript codebase."
2222

23+
:::info
24+
Note that this getting-started uses Expo for ease of use, the following React Native code is just as valid without Expo.
25+
:::
26+
2327
## Prepare your environment
2428

2529
Create your React Native app with Expo CLI.

doc/7/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ order: 0
55
title: Javascript SDK v7.x
66
description: Javascript SDK v7.x
77
---
8+
9+
<RedirectToFirstChild />

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ export * from './src/core/searchResult/Document';
1919
export * from './src/core/searchResult/Profile';
2020
export * from './src/core/searchResult/Role';
2121
export * from './src/core/searchResult/Specifications';
22-
export * from './src/core/searchResult/User';
22+
export * from './src/core/searchResult/User';
23+
24+
export * from './src/utils/interfaces';

0 commit comments

Comments
 (0)