Skip to content

Commit

Permalink
Merge pull request #553 from kuzzleio/7.4.1-proposal
Browse files Browse the repository at this point in the history
# [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))
---
  • Loading branch information
scottinet authored Oct 28, 2020
2 parents 4515cdf + a20cd6d commit fc45968
Show file tree
Hide file tree
Showing 16 changed files with 1,225 additions and 3,167 deletions.
10 changes: 0 additions & 10 deletions .ci/doc/eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": ["error", { "properties": "never" }],
"comma-dangle": [
"error",
{
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never"
}
],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"constructor-super": "error",
Expand Down
6 changes: 2 additions & 4 deletions .ci/doc/templates/default.tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ const {
} = require('kuzzle-sdk');

// Instantiates a Kuzzle client
const
kuzzle = new Kuzzle(
new WebSocket('kuzzle', { autoReconnect: false })
);
const kuzzle = new Kuzzle(new WebSocket('kuzzle', { autoReconnect: false }));

// Adds a listener to detect any connection problems
kuzzle.on('networkError', error => {
Expand All @@ -21,6 +18,7 @@ kuzzle.on('networkError', error => {
} catch (error) {
console.log(`Can not connect to Kuzzle: ${error.message}`);
}

[snippet-code] finally {
kuzzle.disconnect();
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/test-docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -ex

here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$here"
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc-ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0
}
}
}
11 changes: 9 additions & 2 deletions doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
try {
await kuzzle.auth.login('local', { username: 'jane.doe', password: 'password' });
await kuzzle.auth.login('local', {
username: 'jane.doe',
password: 'password',
});

await kuzzle.auth.deleteApiKey('fQRa28BsidO6V_wmOcL');
const apiKey = await kuzzle.auth.createApiKey('Sigfox API key', {
refresh: 'wait_for'
});

await kuzzle.auth.deleteApiKey(apiKey._id);

console.log('API key successfully deleted');
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ hooks:
}
}
}' "kuzzle:7512/users/jane.doe/_create?refresh=wait_for"
&&
curl -XPOST -H "Content-type: application/json" -d '{
"description": "Sigfox API key"
}' "kuzzle:7512/users/jane.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for"
after:
curl -XDELETE kuzzle:7512/users/jane.doe
template: default
Expand Down
4 changes: 4 additions & 0 deletions doc/7/getting-started/react-native/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ This section deals with **Kuzzle V2** (+ **Javascript SDK 7**) and **React Nativ

"[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."

:::info
Note that this getting-started uses Expo for ease of use, the following React Native code is just as valid without Expo.
:::

## Prepare your environment

Create your React Native app with Expo CLI.
Expand Down
2 changes: 2 additions & 0 deletions doc/7/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ order: 0
title: Javascript SDK v7.x
description: Javascript SDK v7.x
---

<RedirectToFirstChild />
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ export * from './src/core/searchResult/Document';
export * from './src/core/searchResult/Profile';
export * from './src/core/searchResult/Role';
export * from './src/core/searchResult/Specifications';
export * from './src/core/searchResult/User';
export * from './src/core/searchResult/User';

export * from './src/utils/interfaces';
Loading

0 comments on commit fc45968

Please sign in to comment.