diff --git a/.ci/comment.html b/.ci/comment.html index 00234da65..a2795dad9 100755 --- a/.ci/comment.html +++ b/.ci/comment.html @@ -9,7 +9,7 @@

Snippets tests reports

v6 @@ -29,7 +29,7 @@

Snippets tests reports

v5 @@ -49,7 +49,7 @@

Snippets tests reports

v1 @@ -69,7 +69,7 @@

Snippets tests reports

v1 @@ -89,7 +89,7 @@

Snippets tests reports

v1 @@ -109,7 +109,7 @@

Snippets tests reports

v1 diff --git a/.ci/comment_pr.sh b/.ci/comment_pr.sh index f11274de4..98b03f753 100755 --- a/.ci/comment_pr.sh +++ b/.ci/comment_pr.sh @@ -12,7 +12,7 @@ echo '{"prId": "'"$TRAVIS_PULL_REQUEST"'", "cppv1": "'"$cppv1"'", "javav1": "'"$ docker run --rm -it -v "$(pwd)":/mnt alexandrebouthinon/kuttlefish kuttlefish \ -template /mnt/.ci/comment.html \ -data /mnt/.ci/data.json \ - -repo documentation-v2 \ + -repo documentation \ -owner kuzzleio \ -token $GH_TOKEN\ -id $TRAVIS_PULL_REQUEST diff --git a/.travis.yml b/.travis.yml index 3c76f92e2..ab61a9e43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,7 @@ jobs: script: - npm install + - npm run lint - npm run build after_script: @@ -64,7 +65,7 @@ jobs: - "8" before_install: - - docker pull kuzzleio/documentation-v2:js + - docker pull kuzzleio/documentation:js - sysctl -w vm.max_map_count=262144 script: @@ -75,8 +76,8 @@ jobs: - | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv reports/index.html reports/report.html && aws s3 cp reports/ s3://$REPORT_S3/reports/$TRAVIS_PULL_REQUEST/js/5/ --recursive --exclude "*.gitkeep" - cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - - cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER . && cd - + cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - + cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER . && cd - bash ./.ci/comment_pr.sh fi; @@ -88,7 +89,7 @@ jobs: - "8" before_install: - - docker pull kuzzleio/documentation-v2:js + - docker pull kuzzleio/documentation:js - sysctl -w vm.max_map_count=262144 script: @@ -99,8 +100,8 @@ jobs: - | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv reports/index.html reports/report.html && aws s3 cp reports/ s3://$REPORT_S3/reports/$TRAVIS_PULL_REQUEST/js/6/ --recursive --exclude "*.gitkeep" - cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - - cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER . && cd - + cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - + cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER . && cd - bash ./.ci/comment_pr.sh fi; @@ -112,7 +113,7 @@ jobs: - "8" before_install: - - docker pull kuzzleio/documentation-v2:go + - docker pull kuzzleio/documentation:go - sysctl -w vm.max_map_count=262144 script: @@ -123,8 +124,8 @@ jobs: - | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv reports/index.html reports/report.html && aws s3 cp reports/ s3://$REPORT_S3/reports/$TRAVIS_PULL_REQUEST/go/1/ --recursive --exclude "*.gitkeep" - cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - - cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER . && cd - + cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - + cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER . && cd - bash ./.ci/comment_pr.sh fi; @@ -136,7 +137,7 @@ jobs: - "8" before_install: - - docker pull kuzzleio/documentation-v2:java + - docker pull kuzzleio/documentation:java - sysctl -w vm.max_map_count=262144 script: @@ -147,8 +148,8 @@ jobs: - | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv reports/index.html reports/report.html && aws s3 cp reports/ s3://$REPORT_S3/reports/$TRAVIS_PULL_REQUEST/java/1/ --recursive --exclude "*.gitkeep" - cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - - cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER . && cd - + cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - + cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER . && cd - bash ./.ci/comment_pr.sh fi; @@ -160,7 +161,7 @@ jobs: - "8" before_install: - - docker pull kuzzleio/documentation-v2:cpp + - docker pull kuzzleio/documentation:cpp - sysctl -w vm.max_map_count=262144 script: @@ -171,8 +172,8 @@ jobs: - | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv reports/index.html reports/report.html && aws s3 cp reports/ s3://$REPORT_S3/reports/$TRAVIS_PULL_REQUEST/cpp/1/ --recursive --exclude "*.gitkeep" - cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - - cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER . && cd - + cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - + cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER . && cd - bash ./.ci/comment_pr.sh fi; @@ -184,7 +185,7 @@ jobs: - "8" before_install: - - docker pull kuzzleio/documentation-v2:csharp + - docker pull kuzzleio/documentation:csharp - sysctl -w vm.max_map_count=262144 script: @@ -195,8 +196,8 @@ jobs: - | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv reports/index.html reports/report.html && aws s3 cp reports/ s3://$REPORT_S3/reports/$TRAVIS_PULL_REQUEST/csharp/1/ --recursive --exclude "*.gitkeep" - cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - - cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation-v2/$TRAVIS_BUILD_NUMBER . && cd - + cd .ci && aws s3 cp . s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER --recursive --exclude "*.sh" --exclude "*.html" --exclude "*.yml" --exclude ".gitignore" && cd - + cd .ci && aws s3 sync s3://$TRAVIS_S3_BUCKET/documentation/$TRAVIS_BUILD_NUMBER . && cd - bash ./.ci/comment_pr.sh fi; diff --git a/README.md b/README.md index d3d1f0eb0..ba4a1890f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Documentation-V2 +# Documentation ## Usage diff --git a/docker/js b/docker/js index c26a4a8b2..b063ab832 100644 --- a/docker/js +++ b/docker/js @@ -1,4 +1,4 @@ -FROM kuzzleio/puppeteer-light:latest +FROM buildkite/puppeteer:latest RUN apt-get update -y && apt-get install --no-install-recommends -y -q \ curl \ @@ -10,8 +10,7 @@ RUN mkdir /nodejs && curl http://nodejs.org/dist/v8.9.0/node-v8.9.0-linux-x64.ta ENV PATH $PATH:/nodejs/bin - -RUN npm i -g eslint eslint-plugin-import@latest eslint-plugin-node@latest eslint-plugin-promise@latest eslint-plugin-standard@latest +RUN npm i -g eslint eslint-plugin-import@latest eslint-plugin-node@latest eslint-plugin-promise@latest eslint-plugin-standard@latest RUN npm i -g puppeteer mqtt webpack@4.29.5 webpack-cli@3.2.3 html-webpack-plugin@3.2.0 --unsafe-perm=true WORKDIR /app diff --git a/index.js b/index.js index a1194e441..9e3e208a9 100644 --- a/index.js +++ b/index.js @@ -96,7 +96,7 @@ const metalsmith = _metalsmith(__dirname) site_title: 'Kuzzle documentation', site_url: options.build.host, site_base_path: options.build.path, - gh_repo: process.env.TRAVIS_REPO_SLUG || 'kuzzleio/documentation-V2', + gh_repo: process.env.TRAVIS_REPO_SLUG || 'kuzzleio/documentation', gh_branch: process.env.TRAVIS_BRANCH || 'master', algolia_projectId: options.algolia.projectId, algolia_publicKey: options.algolia.publicKey, diff --git a/plugins/anchors.js b/plugins/anchors.js index fe47b03c2..6b875baec 100644 --- a/plugins/anchors.js +++ b/plugins/anchors.js @@ -7,7 +7,7 @@ module.exports = { $ = cheerio.load(data.contents.toString()); $('h1, h2').each((i, el) => { - id = `${$(el) + const id = `${$(el) .text() .replace(/&.*?/g, '') .replace(/\s+/g, '-') diff --git a/run-snippet-tests.sh b/run-snippet-tests.sh index 50f348e41..3a373edcd 100755 --- a/run-snippet-tests.sh +++ b/run-snippet-tests.sh @@ -65,19 +65,19 @@ echo "SDK: $SDK version $SDK_VERSION" case $SDK in js) - docker run -it --name runner_js --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation-v2:js $SDK $SDK_VERSION $TESTS_PATH + docker run -it --name runner_js --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation:js $SDK $SDK_VERSION $TESTS_PATH ;; go) - docker run -it --name runner_go --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app -v "$(pwd)"/test/bin:/go/src/github.com/kuzzleio/go-test kuzzleio/documentation-v2:go $SDK $SDK_VERSION $TESTS_PATH + docker run -it --name runner_go --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app -v "$(pwd)"/test/bin:/go/src/github.com/kuzzleio/go-test kuzzleio/documentation:go $SDK $SDK_VERSION $TESTS_PATH ;; cpp) - docker run -it --name runner_cpp --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation-v2:cpp $SDK $SDK_VERSION $TESTS_PATH + docker run -it --name runner_cpp --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation:cpp $SDK $SDK_VERSION $TESTS_PATH ;; java) - docker run -it --name runner_java --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation-v2:java $SDK $SDK_VERSION $TESTS_PATH + docker run -it --name runner_java --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation:java $SDK $SDK_VERSION $TESTS_PATH ;; csharp) - docker run -it --name runner_csharp --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation-v2:csharp $SDK $SDK_VERSION $TESTS_PATH + docker run -it --name runner_csharp --rm -e DEV_MODE="$DEV_MODE" -e SDK_VERSION="$SDK_VERSION" -e LANGUAGE="$SDK" --network ci_default --link kuzzle -v "$(pwd)":/app kuzzleio/documentation:csharp $SDK $SDK_VERSION $TESTS_PATH ;; *) echo "$SDK is not a valid sdk" diff --git a/src/api/1/controller-auth/check-token/index.md b/src/api/1/controller-auth/check-token/index.md index 510a6c04a..8eb993530 100644 --- a/src/api/1/controller-auth/check-token/index.md +++ b/src/api/1/controller-auth/check-token/index.md @@ -7,9 +7,7 @@ title: checkToken {{{since "1.0.0"}}} -Checks a JWT validity. - -This API route does not require the caller to be logged in. +Checks the validity of an authentication token. --- @@ -23,7 +21,7 @@ Method: POST Body: ``` -```js +```json { "token": "" } @@ -31,7 +29,7 @@ Body: ### Other protocols -```js +```json { "controller": "auth", "action": "checkToken", @@ -45,7 +43,7 @@ Body: ## Body properties -* `token`: the JWT to be tested +* `token`: the authentication token to be tested --- @@ -59,7 +57,7 @@ The returned result contains the following properties: Example: -```js +```json { "status": 200, "error": null, diff --git a/src/sdk-reference/js/6/auth/check-token/index.md b/src/sdk-reference/js/6/auth/check-token/index.md index 1d55e226b..7a30ede88 100644 --- a/src/sdk-reference/js/6/auth/check-token/index.md +++ b/src/sdk-reference/js/6/auth/check-token/index.md @@ -8,8 +8,6 @@ description: Checks a JWT's validity. Checks a token validity. -This API route does not require the caller to be logged in. -
```javascript