diff --git a/.ci/doc/config.yml b/.ci/doc/config.yml index bb6a2166..3ba8f690 100644 --- a/.ci/doc/config.yml +++ b/.ci/doc/config.yml @@ -2,7 +2,7 @@ snippets: mount: /mnt - path: '.doc/**/*.test.yml' + path: '.doc/**/snippets/*.test.yml' templates: /mnt/.ci/doc/templates runners: diff --git a/.ci/doc/docker-compose.yml b/.ci/doc/docker-compose.yml index 65035acb..00bbf6ff 100644 --- a/.ci/doc/docker-compose.yml +++ b/.ci/doc/docker-compose.yml @@ -2,10 +2,9 @@ version: '3' services: kuzzle: - image: kuzzleio/kuzzle:1 + image: kuzzleio/kuzzle:2 ports: - '7512:7512' - - '1883:1883' cap_add: - SYS_PTRACE depends_on: @@ -13,21 +12,19 @@ services: - elasticsearch container_name: kuzzle environment: - - kuzzle_services__db__client__host=http://elasticsearch:9200 + - kuzzle_services__storageEngine__client__node=http://elasticsearch:9200 - kuzzle_services__internalCache__node__host=redis - kuzzle_services__memoryStorage__node__host=redis - - NODE_END=production + - kuzzle_services__storageEngine__commonMapping__dynamic=true + - NODE_ENV=production redis: image: redis:5 elasticsearch: - image: kuzzleio/elasticsearch:5.6.10 + image: kuzzleio/elasticsearch:7 ulimits: nofile: 65536 - environment: - - cluster.name=kuzzle - - 'ES_JAVA_OPTS=-Xms256m -Xmx256m' doc-tests: image: kuzzleio/snippets-tests @@ -48,6 +45,7 @@ services: image: golang:alpine volumes: - ../..:/mnt + - ../..:/go/src/github.com/kuzzleio/sdk-go - snippets:/var/snippets command: > ash -c ' @@ -59,7 +57,6 @@ services: github.com/gorilla/websocket \ golang.org/x/tools/cmd/goimports \ golang.org/x/lint/golint; - go get github.com/kuzzleio/sdk-go; touch /tmp/runner_ready_to_lint; touch /tmp/runner_is_ready; tail -f /dev/null diff --git a/.doc/2/controllers/collection/get-specifications/snippets/get-specifications.test.yml b/.doc/2/controllers/collection/get-specifications/snippets/get-specifications.test.yml deleted file mode 100644 index f1b60ada..00000000 --- a/.doc/2/controllers/collection/get-specifications/snippets/get-specifications.test.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: collection#getSpecifications -description: Returns the validation specifications -hooks: - before: "curl -X POST kuzzle:7512/nyc-open-data/_create && curl -X PUT kuzzle:7512/nyc-open-data/yellow-taxi && curl -X PUT -H \"Content-Type: application/json\" -d '{\"nyc-open-data\": {\"yellow-taxi\": {\"strict\": false,\"fields\": {\"license\": {\"type\": \"string\"}}}}}' kuzzle:7512/_specifications" - after: -template: default -expected: Success - -sdk: go -version: 1 diff --git a/.doc/2/controllers/document/mCreate/snippets/m-create.go b/.doc/2/controllers/document/mCreate/snippets/m-create.go deleted file mode 100644 index 062b8851..00000000 --- a/.doc/2/controllers/document/mCreate/snippets/m-create.go +++ /dev/null @@ -1,75 +0,0 @@ -documents := json.RawMessage(`[ - { - "_id": "some-id", - "body": { "capacity": 4 } - }, - { - "body": { "this": "document id is auto-computed" } - } -]`) -response, err := kuzzle.Document.MCreate( - "nyc-open-data", - "yellow-taxi", - documents, - nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Println(string(response)) - /* - [ - { - "_id":"some-id", - "_source":{ - "_kuzzle_info":{ - "active":true, - "author":"-1", - "updater":null, - "updatedAt":null, - "deletedAt":null, - "createdAt":1538484279484 - }, - "capacity":4 - }, - "_index":"nyc-open-data", - "_type":"yellow-taxi", - "_version":1, - "result":"created", - "_shards":{ - "total":2, - "successful":1, - "failed":0 - }, - "created":true, - "status":201 - }, - { - "_id":"AWY0zxi_7XvER2v0e9xR", - "_source":{ - "_kuzzle_info":{ - "active":true, - "author":"-1", - "updater":null, - "updatedAt":null, - "deletedAt":null, - "createdAt":1538484279484 - }, - "this":"document id is auto-computed" - }, - "_index":"nyc-open-data", - "_type":"yellow-taxi", - "_version":1, - "result":"created", - "_shards":{ - "total":2, - "successful":1, - "failed":0 - }, - "created":true, - "status":201 - } - ] - */ - fmt.Println("Success") -} \ No newline at end of file diff --git a/.doc/2/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.go b/.doc/2/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.go deleted file mode 100644 index 2a0a1cae..00000000 --- a/.doc/2/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.go +++ /dev/null @@ -1,92 +0,0 @@ -body := json.RawMessage(`[ - { - "_id": "some-id", - "body": { "capacity": 4 } - }, - { - "_id": "some-other-id", - "body": { "capacity": 4 } - } -]`) -response, err := kuzzle.Document.MCreateOrReplace( - "nyc-open-data", - "yellow-taxi", - body, - nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Println(string(response)) - /* - [ - { - "_id":"some-id", - "_source":{ - "_kuzzle_info":{ - "active":true, - "author":"-1", - "updater":null, - "updatedAt":null, - "deletedAt":null, - "createdAt":1538552685790 - }, - "capacity":4 - }, - "_index":"nyc-open-data", - "_type":"yellow-taxi", - "_version":1, - "result":"created", - "_shards":{ - "total":2, - "successful":1, - "failed":0 - }, - "created":true, - "status":201, - "_meta":{ - "active":true, - "author":"-1", - "updater":null, - "updatedAt":null, - "deletedAt":null, - "createdAt":1538552685790 - } - }, - { - "_id":"some-other-id", - "_source":{ - "_kuzzle_info":{ - "active":true, - "author":"-1", - "updater":null, - "updatedAt":null, - "deletedAt":null, - "createdAt":1538552685790 - }, - "capacity":4 - }, - "_index":"nyc-open-data", - "_type":"yellow-taxi", - "_version":1, - "result":"created", - "_shards":{ - "total":2, - "successful":1, - "failed":0 - }, - "created":true, - "status":201, - "_meta":{ - "active":true, - "author":"-1", - "updater":null, - "updatedAt":null, - "deletedAt":null, - "createdAt":1538552685790 - } - } - ] - */ - fmt.Println("Success") -} \ No newline at end of file diff --git a/.doc/2/controllers/document/mDelete/snippets/m-delete.go b/.doc/2/controllers/document/mDelete/snippets/m-delete.go deleted file mode 100644 index cd855929..00000000 --- a/.doc/2/controllers/document/mDelete/snippets/m-delete.go +++ /dev/null @@ -1,23 +0,0 @@ -ids := []string{"some-id", "some-other-id"} - -kuzzle.Document.Create( - "nyc-open-data", - "yellow-taxi", - "some-id", - json.RawMessage(`{}`), - nil) - -kuzzle.Document.Create( - "nyc-open-data", - "yellow-taxi", - "some-other-id", - json.RawMessage(`{}`), - nil) - -deleted, err := kuzzle.Document.MDelete("nyc-open-data", "yellow-taxi", ids, nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Printf("Successfully deleted %d documents", len(deleted)) -} diff --git a/.doc/2/controllers/index/get-auto-refresh/index.md b/.doc/2/controllers/index/get-auto-refresh/index.md deleted file mode 100644 index dbcef2a3..00000000 --- a/.doc/2/controllers/index/get-auto-refresh/index.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -code: true -type: page -title: getAutoRefresh -description: Returns the status of autorefresh flag ---- - -# GetAutoRefresh - -The getAutoRefresh action returns the current autorefresh status for the index. - -Each index has an autorefresh flag. -When set to true, each write request trigger a [refresh](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html) action on Elasticsearch. -Without a refresh after a write request, the documents may not be immediately visible in search. - -:::info -A refresh operation comes with some performance costs. -While forcing the autoRefresh can be convenient on a development or test environment, -we recommend that you avoid using it in production or at least carefully monitor its implications before using it. -::: - -## Arguments - -```go -GetAutoRefresh(index string, options types.QueryOptions) (bool, error) -``` - -| Arguments | Type | Description | -| --------- | ------------ | ------------- | -| `index` |
string
| Index name | -| `options` |
QueryOptions
| Query options | - -### **Options** - -Additional query options - -| Option | Type | Description | Default | -| ---------- | ---- | --------------------------------- | ------- | -| `queuable` |
bool
| Make this request queuable or not | `true` | - -## Return - -Returns a `bool` that indicate the status of the **autoRefresh** flag. - -## Usage - -<<< ./snippets/getAutoRefresh.go diff --git a/.doc/2/controllers/index/get-auto-refresh/snippets/getAutoRefresh.go b/.doc/2/controllers/index/get-auto-refresh/snippets/getAutoRefresh.go deleted file mode 100644 index 83338dc5..00000000 --- a/.doc/2/controllers/index/get-auto-refresh/snippets/getAutoRefresh.go +++ /dev/null @@ -1,9 +0,0 @@ -status, err := kuzzle.Index.GetAutoRefresh("nyc-open-data", nil) - -if err != nil { - log.Fatal(err) -} else if status == true { - fmt.Println("autorefresh is true") -} else { - fmt.Println("autorefresh is false") -} diff --git a/.doc/2/controllers/index/get-auto-refresh/snippets/getAutoRefresh.test.yml b/.doc/2/controllers/index/get-auto-refresh/snippets/getAutoRefresh.test.yml deleted file mode 100644 index f8a84f53..00000000 --- a/.doc/2/controllers/index/get-auto-refresh/snippets/getAutoRefresh.test.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: index#getAutoRefresh -description: Return autorefresh status for index -hooks: - before: curl -X DELETE kuzzle:7512/nyc-open-data && curl -X POST kuzzle:7512/nyc-open-data/_create - after: -template: default -expected: autorefresh is false - -sdk: go -version: 1 diff --git a/.doc/2/controllers/index/refresh-internal/index.md b/.doc/2/controllers/index/refresh-internal/index.md deleted file mode 100644 index 3265c8e5..00000000 --- a/.doc/2/controllers/index/refresh-internal/index.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -code: true -type: page -title: refreshInternal -description: Forces refresh of Kuzzle internal index ---- - -# RefreshInternal - -When writing or deleting security and internal documents (users, roles, profiles, configuration, etc.) in Kuzzle, the update needs to be indexed before being reflected in the search index. - -The `refreshInternal` action forces a [refresh](/sdk/go/1/controllers/index/refresh), on the internal index, making the documents available to search immediately. - -::: info -A refresh operation comes with some performance costs. - -From [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html): -"While a refresh is much lighter than a commit, it still has a performance cost. A manual refresh can be useful when writing tests, but don’t do a manual refresh every time you index a document in production; it will hurt your performance. Instead, your application needs to be aware of the near real-time nature of Elasticsearch and make allowances for it." -::: - -## Arguments - -```go -RefreshInternal(options types.QueryOptions) error -``` - -
- -| Arguments | Type | Description | -| --------- | ------------ | ------------- | -| `options` |
QueryOptions
| Query options | - -### Options - -The `options` arguments can contain the following option properties: - -| Option | Type (default) | Description | -| ---------- | -------------- | --------------------------------- | -| `queuable` |
bool (true)
| If true, queues the request during downtime, until connected to Kuzzle again | - -## Return - -Return an error or `nil` if index successfully refreshed. - -## Usage - -<<< ./snippets/refreshInternal.go diff --git a/.doc/2/controllers/index/refresh-internal/snippets/refreshInternal.go b/.doc/2/controllers/index/refresh-internal/snippets/refreshInternal.go deleted file mode 100644 index bda8d77d..00000000 --- a/.doc/2/controllers/index/refresh-internal/snippets/refreshInternal.go +++ /dev/null @@ -1,7 +0,0 @@ -err := kuzzle.Index.RefreshInternal(nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Println("Internal index successfully refreshed") -} diff --git a/.doc/2/controllers/index/refresh-internal/snippets/refreshInternal.test.yml b/.doc/2/controllers/index/refresh-internal/snippets/refreshInternal.test.yml deleted file mode 100644 index 1e03bcf0..00000000 --- a/.doc/2/controllers/index/refresh-internal/snippets/refreshInternal.test.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: index#refreshInternal -description: Force refresh of Kuzzle internal index -hooks: - before: - after: -template: default -expected: Internal index successfully refreshed - -sdk: go -version: 1 diff --git a/.doc/2/controllers/index/refresh/index.md b/.doc/2/controllers/index/refresh/index.md deleted file mode 100644 index ac92ea93..00000000 --- a/.doc/2/controllers/index/refresh/index.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -code: true -type: page -title: refresh -description: Forces Elasticsearch search index update ---- - -# Refresh - -When writing or deleting documents in Kuzzle, the update needs to be indexed before being available in search results. - -:::info -A refresh operation comes with some performance costs. - -From the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-refresh.html): -> "While a refresh is much lighter than a commit, it still has a performance cost. A manual refresh can be useful when writing tests, but don’t do a manual refresh every time you index a document in production; it will hurt your performance. Instead, your application needs to be aware of the near real-time nature of Elasticsearch and make allowances for it." -::: - -## Arguments - -```go -Refresh(index string, options types.QueryOptions) error -``` - -| Arguments | Type | Description | -| --------- | ------------ | ------------- | -| `index` |
string
| Index name | -| `options` |
QueryOptions
| Query options | - -### **Options** - -Additional query options - -| Option | Type | Description | Default | -| ---------- | ---- | --------------------------------- | ------- | -| `queuable` |
bool
| Make this request queuable or not | `true` | - -## Return - -Return an error or `nil` if index successfully refreshed. - -## Usage - -<<< ./snippets/refresh.go diff --git a/.doc/2/controllers/index/refresh/snippets/refresh.go b/.doc/2/controllers/index/refresh/snippets/refresh.go deleted file mode 100644 index b6344a7c..00000000 --- a/.doc/2/controllers/index/refresh/snippets/refresh.go +++ /dev/null @@ -1,7 +0,0 @@ -err := kuzzle.Index.Refresh("nyc-open-data", nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Println("0 shards fail to refresh") -} diff --git a/.doc/2/controllers/index/refresh/snippets/refresh.test.yml b/.doc/2/controllers/index/refresh/snippets/refresh.test.yml deleted file mode 100644 index 0169d00f..00000000 --- a/.doc/2/controllers/index/refresh/snippets/refresh.test.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: index#refresh -description: Force Elasticsearch search index update -hooks: - before: curl -X POST kuzzle:7512/nyc-open-data/_create - after: -template: default -expected: 0 shards fail to refresh - -sdk: go -version: 1 diff --git a/.doc/2/controllers/index/set-auto-refresh/index.md b/.doc/2/controllers/index/set-auto-refresh/index.md deleted file mode 100644 index f642ec60..00000000 --- a/.doc/2/controllers/index/set-auto-refresh/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -code: true -type: page -title: setAutoRefresh -description: Sets the autorefresh flag ---- - -# setAutoRefresh(index, autorefresh, [options]) - -The setAutoRefresh action allows to set the autorefresh flag for the index. - -Each index has an autorefresh flag. -When set to true, each write request trigger a [refresh](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html) action on Elasticsearch. -Without a refresh after a write request, the documents may not be immediately visible in search. - -:::info -A refresh operation comes with some performance costs. -While forcing the autoRefresh can be convenient on a development or test environment, -we recommend that you avoid using it in production or at least carefully monitor its implications before using it. -::: - -## Arguments - -```go -SetAutoRefresh(index string, autoRefresh bool, options types.QueryOptions) error -``` - -| Arguments | Type | Description | -| ------------- | ------------ | ---------------- | -| `index` |
string
| Index name | -| `autoRefresh` |
Boolean
| autoRefresh flag | -| `options` |
QueryOptions
| Query options | no | - -### **Options** - -Additional query options - -| Option | Type | Description | Default | -| ---------- | ---- | --------------------------------- | ------- | -| `queuable` |
bool
| Make this request queuable or not | `true` | - -## Return - -Return an error or `nil`. - -## Usage - -<<< ./snippets/setAutoRefresh.go diff --git a/.doc/2/controllers/index/set-auto-refresh/snippets/setAutoRefresh.go b/.doc/2/controllers/index/set-auto-refresh/snippets/setAutoRefresh.go deleted file mode 100644 index fd177158..00000000 --- a/.doc/2/controllers/index/set-auto-refresh/snippets/setAutoRefresh.go +++ /dev/null @@ -1,7 +0,0 @@ -err := kuzzle.Index.SetAutoRefresh("nyc-open-data", true, nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Println("autorefresh flag is set to true") -} diff --git a/.doc/2/controllers/index/set-auto-refresh/snippets/setAutoRefresh.test.yml b/.doc/2/controllers/index/set-auto-refresh/snippets/setAutoRefresh.test.yml deleted file mode 100644 index 0501ffbc..00000000 --- a/.doc/2/controllers/index/set-auto-refresh/snippets/setAutoRefresh.test.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: index#setAutoRefresh -description: Set the autorefresh flag for the index -hooks: - before: curl -X DELETE kuzzle:7512/nyc-open-data && curl -X POST kuzzle:7512/nyc-open-data/_create - after: -template: default -expected: autorefresh flag is set to true - -sdk: go -version: 1 diff --git a/.doc/2/controllers/server/get-all-stats/snippets/get-all-stats.go b/.doc/2/controllers/server/get-all-stats/snippets/get-all-stats.go deleted file mode 100644 index 1a894373..00000000 --- a/.doc/2/controllers/server/get-all-stats/snippets/get-all-stats.go +++ /dev/null @@ -1,7 +0,0 @@ -as, err := kuzzle.Server.GetAllStats(nil) - -if err != nil { - log.Fatal(err) -} else { - fmt.Println("All Kuzzle Stats as JSON string:", string(as)) -} diff --git a/.doc/2/controllers/server/get-all-stats/snippets/get-all-stats.test.yml b/.doc/2/controllers/server/get-all-stats/snippets/get-all-stats.test.yml deleted file mode 100644 index c10efcd0..00000000 --- a/.doc/2/controllers/server/get-all-stats/snippets/get-all-stats.test.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: server#getAllStats -description: Gets all stored internal statistic snapshots. -hooks: - before: - after: -template: default -expected: ^(All Kuzzle Stats as JSON string:) {"hits":\[({"connections":{.*},"ongoingRequests":{.*},"completedRequests":{.*},"failedRequests":{.*},"timestamp":[0-9]{13}}(,)*\]),"total":[0-9]+}$ - -sdk: go -version: 1 diff --git a/.doc/2/index.md b/.doc/2/index.md deleted file mode 100644 index abe116c8..00000000 --- a/.doc/2/index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -code: false -type: root -order: 1 -title: GOLANG SDK v2.x -description: GOLANG SDK v2.x ---- - diff --git a/.doc/2/.vuepress b/.doc/3/.vuepress similarity index 100% rename from .doc/2/.vuepress rename to .doc/3/.vuepress diff --git a/.doc/2/controllers/auth/check-token/index.md b/.doc/3/controllers/auth/check-token/index.md similarity index 100% rename from .doc/2/controllers/auth/check-token/index.md rename to .doc/3/controllers/auth/check-token/index.md diff --git a/.doc/2/controllers/auth/check-token/snippets/check-token.go b/.doc/3/controllers/auth/check-token/snippets/check-token.go similarity index 100% rename from .doc/2/controllers/auth/check-token/snippets/check-token.go rename to .doc/3/controllers/auth/check-token/snippets/check-token.go diff --git a/.doc/2/controllers/auth/check-token/snippets/check-token.test.yml b/.doc/3/controllers/auth/check-token/snippets/check-token.test.yml similarity index 97% rename from .doc/2/controllers/auth/check-token/snippets/check-token.test.yml rename to .doc/3/controllers/auth/check-token/snippets/check-token.test.yml index a502b7c3..fa7371e4 100644 --- a/.doc/2/controllers/auth/check-token/snippets/check-token.test.yml +++ b/.doc/3/controllers/auth/check-token/snippets/check-token.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/create-my-credentials/index.md b/.doc/3/controllers/auth/create-my-credentials/index.md similarity index 100% rename from .doc/2/controllers/auth/create-my-credentials/index.md rename to .doc/3/controllers/auth/create-my-credentials/index.md diff --git a/.doc/2/controllers/auth/create-my-credentials/snippets/create-my-credentials.go b/.doc/3/controllers/auth/create-my-credentials/snippets/create-my-credentials.go similarity index 100% rename from .doc/2/controllers/auth/create-my-credentials/snippets/create-my-credentials.go rename to .doc/3/controllers/auth/create-my-credentials/snippets/create-my-credentials.go diff --git a/.doc/2/controllers/auth/create-my-credentials/snippets/create-my-credentials.test.yml b/.doc/3/controllers/auth/create-my-credentials/snippets/create-my-credentials.test.yml similarity index 97% rename from .doc/2/controllers/auth/create-my-credentials/snippets/create-my-credentials.test.yml rename to .doc/3/controllers/auth/create-my-credentials/snippets/create-my-credentials.test.yml index e0e42377..ff87cb49 100644 --- a/.doc/2/controllers/auth/create-my-credentials/snippets/create-my-credentials.test.yml +++ b/.doc/3/controllers/auth/create-my-credentials/snippets/create-my-credentials.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/credentials-exist/index.md b/.doc/3/controllers/auth/credentials-exist/index.md similarity index 100% rename from .doc/2/controllers/auth/credentials-exist/index.md rename to .doc/3/controllers/auth/credentials-exist/index.md diff --git a/.doc/2/controllers/auth/credentials-exist/snippets/credentials-exist.go b/.doc/3/controllers/auth/credentials-exist/snippets/credentials-exist.go similarity index 100% rename from .doc/2/controllers/auth/credentials-exist/snippets/credentials-exist.go rename to .doc/3/controllers/auth/credentials-exist/snippets/credentials-exist.go diff --git a/.doc/2/controllers/auth/credentials-exist/snippets/credentials-exist.test.yml b/.doc/3/controllers/auth/credentials-exist/snippets/credentials-exist.test.yml similarity index 97% rename from .doc/2/controllers/auth/credentials-exist/snippets/credentials-exist.test.yml rename to .doc/3/controllers/auth/credentials-exist/snippets/credentials-exist.test.yml index 0695c926..17c3536f 100644 --- a/.doc/2/controllers/auth/credentials-exist/snippets/credentials-exist.test.yml +++ b/.doc/3/controllers/auth/credentials-exist/snippets/credentials-exist.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/delete-my-credentials/index.md b/.doc/3/controllers/auth/delete-my-credentials/index.md similarity index 100% rename from .doc/2/controllers/auth/delete-my-credentials/index.md rename to .doc/3/controllers/auth/delete-my-credentials/index.md diff --git a/.doc/2/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.go b/.doc/3/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.go similarity index 100% rename from .doc/2/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.go rename to .doc/3/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.go diff --git a/.doc/2/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.test.yml b/.doc/3/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.test.yml similarity index 97% rename from .doc/2/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.test.yml rename to .doc/3/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.test.yml index 40c1482e..749e4401 100644 --- a/.doc/2/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.test.yml +++ b/.doc/3/controllers/auth/delete-my-credentials/snippets/delete-my-credentials.test.yml @@ -6,4 +6,4 @@ hooks: template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/get-current-user/index.md b/.doc/3/controllers/auth/get-current-user/index.md similarity index 100% rename from .doc/2/controllers/auth/get-current-user/index.md rename to .doc/3/controllers/auth/get-current-user/index.md diff --git a/.doc/2/controllers/auth/get-current-user/snippets/get-current-user.go b/.doc/3/controllers/auth/get-current-user/snippets/get-current-user.go similarity index 100% rename from .doc/2/controllers/auth/get-current-user/snippets/get-current-user.go rename to .doc/3/controllers/auth/get-current-user/snippets/get-current-user.go diff --git a/.doc/2/controllers/auth/get-current-user/snippets/get-current-user.test.yml b/.doc/3/controllers/auth/get-current-user/snippets/get-current-user.test.yml similarity index 97% rename from .doc/2/controllers/auth/get-current-user/snippets/get-current-user.test.yml rename to .doc/3/controllers/auth/get-current-user/snippets/get-current-user.test.yml index a9d23a50..693514d5 100644 --- a/.doc/2/controllers/auth/get-current-user/snippets/get-current-user.test.yml +++ b/.doc/3/controllers/auth/get-current-user/snippets/get-current-user.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/get-my-credentials/index.md b/.doc/3/controllers/auth/get-my-credentials/index.md similarity index 100% rename from .doc/2/controllers/auth/get-my-credentials/index.md rename to .doc/3/controllers/auth/get-my-credentials/index.md diff --git a/.doc/2/controllers/auth/get-my-credentials/snippets/get-my-credentials.go b/.doc/3/controllers/auth/get-my-credentials/snippets/get-my-credentials.go similarity index 100% rename from .doc/2/controllers/auth/get-my-credentials/snippets/get-my-credentials.go rename to .doc/3/controllers/auth/get-my-credentials/snippets/get-my-credentials.go diff --git a/.doc/2/controllers/auth/get-my-credentials/snippets/get-my-credentials.test.yml b/.doc/3/controllers/auth/get-my-credentials/snippets/get-my-credentials.test.yml similarity index 97% rename from .doc/2/controllers/auth/get-my-credentials/snippets/get-my-credentials.test.yml rename to .doc/3/controllers/auth/get-my-credentials/snippets/get-my-credentials.test.yml index 395679cf..093bf08e 100644 --- a/.doc/2/controllers/auth/get-my-credentials/snippets/get-my-credentials.test.yml +++ b/.doc/3/controllers/auth/get-my-credentials/snippets/get-my-credentials.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/get-my-rights/index.md b/.doc/3/controllers/auth/get-my-rights/index.md similarity index 100% rename from .doc/2/controllers/auth/get-my-rights/index.md rename to .doc/3/controllers/auth/get-my-rights/index.md diff --git a/.doc/2/controllers/auth/get-my-rights/snippets/get-my-rights.go b/.doc/3/controllers/auth/get-my-rights/snippets/get-my-rights.go similarity index 100% rename from .doc/2/controllers/auth/get-my-rights/snippets/get-my-rights.go rename to .doc/3/controllers/auth/get-my-rights/snippets/get-my-rights.go diff --git a/.doc/2/controllers/auth/get-my-rights/snippets/get-my-rights.test.yml b/.doc/3/controllers/auth/get-my-rights/snippets/get-my-rights.test.yml similarity index 97% rename from .doc/2/controllers/auth/get-my-rights/snippets/get-my-rights.test.yml rename to .doc/3/controllers/auth/get-my-rights/snippets/get-my-rights.test.yml index 7d0b6445..17a58e17 100644 --- a/.doc/2/controllers/auth/get-my-rights/snippets/get-my-rights.test.yml +++ b/.doc/3/controllers/auth/get-my-rights/snippets/get-my-rights.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/get-strategies/index.md b/.doc/3/controllers/auth/get-strategies/index.md similarity index 100% rename from .doc/2/controllers/auth/get-strategies/index.md rename to .doc/3/controllers/auth/get-strategies/index.md diff --git a/.doc/2/controllers/auth/get-strategies/snippets/get-strategies.go b/.doc/3/controllers/auth/get-strategies/snippets/get-strategies.go similarity index 100% rename from .doc/2/controllers/auth/get-strategies/snippets/get-strategies.go rename to .doc/3/controllers/auth/get-strategies/snippets/get-strategies.go diff --git a/.doc/2/controllers/auth/get-strategies/snippets/get-strategies.test.yml b/.doc/3/controllers/auth/get-strategies/snippets/get-strategies.test.yml similarity index 97% rename from .doc/2/controllers/auth/get-strategies/snippets/get-strategies.test.yml rename to .doc/3/controllers/auth/get-strategies/snippets/get-strategies.test.yml index 2c533aed..180412f0 100644 --- a/.doc/2/controllers/auth/get-strategies/snippets/get-strategies.test.yml +++ b/.doc/3/controllers/auth/get-strategies/snippets/get-strategies.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/index.md b/.doc/3/controllers/auth/index.md similarity index 100% rename from .doc/2/controllers/auth/index.md rename to .doc/3/controllers/auth/index.md diff --git a/.doc/2/controllers/auth/login/index.md b/.doc/3/controllers/auth/login/index.md similarity index 67% rename from .doc/2/controllers/auth/login/index.md rename to .doc/3/controllers/auth/login/index.md index ebed0e0a..79958c2a 100644 --- a/.doc/2/controllers/auth/login/index.md +++ b/.doc/3/controllers/auth/login/index.md @@ -9,7 +9,7 @@ description: Authenticates a user Authenticates a user. -If this action is successful, all further requests emitted by this SDK instance will be in the name of the authenticated user, until either the authenticated token expires, the [logout](/sdk/go/1/controllers/auth/logout) action is called, or the `jwt` property is manually unset. +If this action is successful, all further requests emitted by this SDK instance will be in the name of the authenticated user, until either the authenticated token expires, the [logout](/sdk/go/3/controllers/auth/logout) action is called, or the `jwt` property is manually unset. ## Arguments @@ -29,20 +29,20 @@ func (a *Auth) Login( #### strategy -The name of the authentication [strategy](/core/1/guides/kuzzle-depth/authentication#authentication) used to log the user in. +The name of the authentication [strategy](/core/2/guides/main-concepts/authentication#local-strategy) used to log the user in. -Depending on the chosen authentication `strategy`, additional [credential arguments](/core/1/guides/kuzzle-depth/authentication#authentication) may be required. +Depending on the chosen authentication `strategy`, additional [credential arguments](/core/2/guides/main-concepts/authentication#local-strategy) may be required. The API request example in this page provides the necessary arguments for the [`local` authentication plugin](https://github.com/kuzzleio/kuzzle-plugin-auth-passport-local). -Check the appropriate [authentication plugin](/core/1/plugins/guides/strategies/overview) documentation to get the list of additional arguments to provide. +Check the appropriate [authentication plugin](/core/2/guides/write-plugins/integrate-authentication-strategy) documentation to get the list of additional arguments to provide. ### expiresIn - The default value for the `expiresIn` option is defined at server level, in Kuzzle's [configuration file](/core/1/guides/essentials/configuration). + The default value for the `expiresIn` option is defined at server level, in Kuzzle's [configuration file](/core/2/guides/advanced/configuration). ## Return -The **login** action returns an encrypted JSON Web Token, that must then be sent in the [requests headers](/core/1/api/essentials/query-syntax). +The **login** action returns an encrypted JSON Web Token, that must then be sent in the [requests headers](/core/2/guides/main-concepts/querying). ## Usage diff --git a/.doc/2/controllers/auth/login/snippets/login.go b/.doc/3/controllers/auth/login/snippets/login.go similarity index 100% rename from .doc/2/controllers/auth/login/snippets/login.go rename to .doc/3/controllers/auth/login/snippets/login.go diff --git a/.doc/2/controllers/auth/login/snippets/login.test.yml b/.doc/3/controllers/auth/login/snippets/login.test.yml similarity index 96% rename from .doc/2/controllers/auth/login/snippets/login.test.yml rename to .doc/3/controllers/auth/login/snippets/login.test.yml index a5a31c8f..c230267f 100644 --- a/.doc/2/controllers/auth/login/snippets/login.test.yml +++ b/.doc/3/controllers/auth/login/snippets/login.test.yml @@ -8,4 +8,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/logout/index.md b/.doc/3/controllers/auth/logout/index.md similarity index 100% rename from .doc/2/controllers/auth/logout/index.md rename to .doc/3/controllers/auth/logout/index.md diff --git a/.doc/2/controllers/auth/logout/snippets/logout.go b/.doc/3/controllers/auth/logout/snippets/logout.go similarity index 100% rename from .doc/2/controllers/auth/logout/snippets/logout.go rename to .doc/3/controllers/auth/logout/snippets/logout.go diff --git a/.doc/2/controllers/auth/logout/snippets/logout.test.yml b/.doc/3/controllers/auth/logout/snippets/logout.test.yml similarity index 97% rename from .doc/2/controllers/auth/logout/snippets/logout.test.yml rename to .doc/3/controllers/auth/logout/snippets/logout.test.yml index 4a3695d7..31902dde 100644 --- a/.doc/2/controllers/auth/logout/snippets/logout.test.yml +++ b/.doc/3/controllers/auth/logout/snippets/logout.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/update-my-credentials/index.md b/.doc/3/controllers/auth/update-my-credentials/index.md similarity index 100% rename from .doc/2/controllers/auth/update-my-credentials/index.md rename to .doc/3/controllers/auth/update-my-credentials/index.md diff --git a/.doc/2/controllers/auth/update-my-credentials/snippets/update-my-credentials.go b/.doc/3/controllers/auth/update-my-credentials/snippets/update-my-credentials.go similarity index 100% rename from .doc/2/controllers/auth/update-my-credentials/snippets/update-my-credentials.go rename to .doc/3/controllers/auth/update-my-credentials/snippets/update-my-credentials.go diff --git a/.doc/2/controllers/auth/update-my-credentials/snippets/update-my-credentials.test.yml b/.doc/3/controllers/auth/update-my-credentials/snippets/update-my-credentials.test.yml similarity index 97% rename from .doc/2/controllers/auth/update-my-credentials/snippets/update-my-credentials.test.yml rename to .doc/3/controllers/auth/update-my-credentials/snippets/update-my-credentials.test.yml index e91e2c64..8a734055 100644 --- a/.doc/2/controllers/auth/update-my-credentials/snippets/update-my-credentials.test.yml +++ b/.doc/3/controllers/auth/update-my-credentials/snippets/update-my-credentials.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/update-self/index.md b/.doc/3/controllers/auth/update-self/index.md similarity index 100% rename from .doc/2/controllers/auth/update-self/index.md rename to .doc/3/controllers/auth/update-self/index.md diff --git a/.doc/2/controllers/auth/update-self/snippets/update-self.go b/.doc/3/controllers/auth/update-self/snippets/update-self.go similarity index 100% rename from .doc/2/controllers/auth/update-self/snippets/update-self.go rename to .doc/3/controllers/auth/update-self/snippets/update-self.go diff --git a/.doc/2/controllers/auth/update-self/snippets/update-self.test.yml b/.doc/3/controllers/auth/update-self/snippets/update-self.test.yml similarity index 97% rename from .doc/2/controllers/auth/update-self/snippets/update-self.test.yml rename to .doc/3/controllers/auth/update-self/snippets/update-self.test.yml index 3969ef09..a7d7cd71 100644 --- a/.doc/2/controllers/auth/update-self/snippets/update-self.test.yml +++ b/.doc/3/controllers/auth/update-self/snippets/update-self.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/auth/validate-my-credentials/index.md b/.doc/3/controllers/auth/validate-my-credentials/index.md similarity index 100% rename from .doc/2/controllers/auth/validate-my-credentials/index.md rename to .doc/3/controllers/auth/validate-my-credentials/index.md diff --git a/.doc/2/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.go b/.doc/3/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.go similarity index 100% rename from .doc/2/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.go rename to .doc/3/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.go diff --git a/.doc/2/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.test.yml b/.doc/3/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.test.yml similarity index 97% rename from .doc/2/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.test.yml rename to .doc/3/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.test.yml index 53706942..488109c9 100644 --- a/.doc/2/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.test.yml +++ b/.doc/3/controllers/auth/validate-my-credentials/snippets/validate-my-credentials.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/create/index.md b/.doc/3/controllers/collection/create/index.md similarity index 89% rename from .doc/2/controllers/collection/create/index.md rename to .doc/3/controllers/collection/create/index.md index 6d47ef06..d33003d3 100644 --- a/.doc/2/controllers/collection/create/index.md +++ b/.doc/3/controllers/collection/create/index.md @@ -7,7 +7,7 @@ description: Creates a new collection # Create -Creates a new [collection](/core/1/guides/essentials/store-access-data) in the provided `index`. +Creates a new [collection](/core/2/guides/main-concepts/data-storage) in the provided `index`. You can also provide an optional data mapping that allow you to exploit the full capabilities of our persistent data storage layer, [ElasticSearch](ttps://www.elastic.co/elastic-stack) (check here the [mapping capabilities of ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/mapping.html)). @@ -45,7 +45,7 @@ The mapping must have a root field `properties` that contain the mapping definit } ``` -More informations about database mappings [here](/core/1/guides/essentials/database-mappings). +More informations about database mappings [here](/core/2/guides/main-concepts/data-storage). ### **options** @@ -61,4 +61,4 @@ Return an error or `nil` if collection successfully created. ## Usage -<<< ./snippets/create.go +<<< ./snippets/create.go \ No newline at end of file diff --git a/.doc/2/controllers/collection/create/snippets/create.go b/.doc/3/controllers/collection/create/snippets/create.go similarity index 100% rename from .doc/2/controllers/collection/create/snippets/create.go rename to .doc/3/controllers/collection/create/snippets/create.go diff --git a/.doc/2/controllers/collection/create/snippets/create.test.yml b/.doc/3/controllers/collection/create/snippets/create.test.yml similarity index 94% rename from .doc/2/controllers/collection/create/snippets/create.test.yml rename to .doc/3/controllers/collection/create/snippets/create.test.yml index 1b5dcb85..c506e672 100644 --- a/.doc/2/controllers/collection/create/snippets/create.test.yml +++ b/.doc/3/controllers/collection/create/snippets/create.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/delete-specifications/index.md b/.doc/3/controllers/collection/delete-specifications/index.md similarity index 100% rename from .doc/2/controllers/collection/delete-specifications/index.md rename to .doc/3/controllers/collection/delete-specifications/index.md diff --git a/.doc/2/controllers/collection/delete-specifications/snippets/delete-specifications.go b/.doc/3/controllers/collection/delete-specifications/snippets/delete-specifications.go similarity index 100% rename from .doc/2/controllers/collection/delete-specifications/snippets/delete-specifications.go rename to .doc/3/controllers/collection/delete-specifications/snippets/delete-specifications.go diff --git a/.doc/2/controllers/collection/delete-specifications/snippets/delete-specifications.test.yml b/.doc/3/controllers/collection/delete-specifications/snippets/delete-specifications.test.yml similarity index 96% rename from .doc/2/controllers/collection/delete-specifications/snippets/delete-specifications.test.yml rename to .doc/3/controllers/collection/delete-specifications/snippets/delete-specifications.test.yml index 46060d9c..58cf3625 100644 --- a/.doc/2/controllers/collection/delete-specifications/snippets/delete-specifications.test.yml +++ b/.doc/3/controllers/collection/delete-specifications/snippets/delete-specifications.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/3/controllers/collection/delete/index.md b/.doc/3/controllers/collection/delete/index.md new file mode 100644 index 00000000..4d7a28c3 --- /dev/null +++ b/.doc/3/controllers/collection/delete/index.md @@ -0,0 +1,33 @@ +--- +code: true +type: page +title: delete +description: Deletes a collection +--- + +# delete + +Deletes a collection. + +
+ +```go +Delete(index string, collection string, options types.QueryOptions) (json.RawMessage, error) +``` + +
+ +| Arguments | Type | Description | +| ------------ | ----------------------- | --------------- | +| `index` |
string
| Index name | +| `collection` |
string
| Collection name | +| `options` |
QueryOptions
| Query options | + + +## Resolves + +Resolves if the collection is successfully deleted. + +## Usage + +<<< ./snippets/delete.go diff --git a/.doc/3/controllers/collection/delete/snippets/delete.go b/.doc/3/controllers/collection/delete/snippets/delete.go new file mode 100644 index 00000000..2a060de8 --- /dev/null +++ b/.doc/3/controllers/collection/delete/snippets/delete.go @@ -0,0 +1,7 @@ +err := kuzzle.Collection.Delete("nyc-open-data", "yellow-taxi", nil) + +if err != nil { + log.Fatal(err) +} else { + fmt.Println("Success") +} diff --git a/.doc/3/controllers/collection/delete/snippets/delete.test.yml b/.doc/3/controllers/collection/delete/snippets/delete.test.yml new file mode 100644 index 00000000..1722e26a --- /dev/null +++ b/.doc/3/controllers/collection/delete/snippets/delete.test.yml @@ -0,0 +1,10 @@ +name: collection#delete +description: Delete a collection +hooks: + before: curl -X POST kuzzle:7512/nyc-open-data/_create && curl -X PUT kuzzle:7512/nyc-open-data/yellow-taxi + after: +template: default +expected: Success + +sdk: go +version: 3 diff --git a/.doc/2/controllers/collection/exists/index.md b/.doc/3/controllers/collection/exists/index.md similarity index 100% rename from .doc/2/controllers/collection/exists/index.md rename to .doc/3/controllers/collection/exists/index.md diff --git a/.doc/2/controllers/collection/exists/snippets/exists.go b/.doc/3/controllers/collection/exists/snippets/exists.go similarity index 100% rename from .doc/2/controllers/collection/exists/snippets/exists.go rename to .doc/3/controllers/collection/exists/snippets/exists.go diff --git a/.doc/2/controllers/collection/exists/snippets/exists.test.yml b/.doc/3/controllers/collection/exists/snippets/exists.test.yml similarity index 95% rename from .doc/2/controllers/collection/exists/snippets/exists.test.yml rename to .doc/3/controllers/collection/exists/snippets/exists.test.yml index 62a8a739..98fd3f26 100644 --- a/.doc/2/controllers/collection/exists/snippets/exists.test.yml +++ b/.doc/3/controllers/collection/exists/snippets/exists.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/get-mapping/index.md b/.doc/3/controllers/collection/get-mapping/index.md similarity index 100% rename from .doc/2/controllers/collection/get-mapping/index.md rename to .doc/3/controllers/collection/get-mapping/index.md diff --git a/.doc/2/controllers/collection/get-mapping/snippets/get-mapping.go b/.doc/3/controllers/collection/get-mapping/snippets/get-mapping.go similarity index 100% rename from .doc/2/controllers/collection/get-mapping/snippets/get-mapping.go rename to .doc/3/controllers/collection/get-mapping/snippets/get-mapping.go diff --git a/.doc/2/controllers/collection/get-mapping/snippets/get-mapping.test.yml b/.doc/3/controllers/collection/get-mapping/snippets/get-mapping.test.yml similarity index 95% rename from .doc/2/controllers/collection/get-mapping/snippets/get-mapping.test.yml rename to .doc/3/controllers/collection/get-mapping/snippets/get-mapping.test.yml index 81bef456..da8d7e53 100644 --- a/.doc/2/controllers/collection/get-mapping/snippets/get-mapping.test.yml +++ b/.doc/3/controllers/collection/get-mapping/snippets/get-mapping.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/get-specifications/index.md b/.doc/3/controllers/collection/get-specifications/index.md similarity index 100% rename from .doc/2/controllers/collection/get-specifications/index.md rename to .doc/3/controllers/collection/get-specifications/index.md diff --git a/.doc/2/controllers/collection/get-specifications/snippets/get-specifications.go b/.doc/3/controllers/collection/get-specifications/snippets/get-specifications.go similarity index 100% rename from .doc/2/controllers/collection/get-specifications/snippets/get-specifications.go rename to .doc/3/controllers/collection/get-specifications/snippets/get-specifications.go diff --git a/.doc/3/controllers/collection/get-specifications/snippets/get-specifications.test.yml b/.doc/3/controllers/collection/get-specifications/snippets/get-specifications.test.yml new file mode 100644 index 00000000..1c52b28e --- /dev/null +++ b/.doc/3/controllers/collection/get-specifications/snippets/get-specifications.test.yml @@ -0,0 +1,14 @@ +name: collection#getSpecifications +description: Returns the validation specifications +hooks: + before: | + curl -X DELETE kuzzle:7512/nyc-open-data + curl -X POST kuzzle:7512/nyc-open-data/_create + curl -X PUT kuzzle:7512/nyc-open-data/yellow-taxi + curl -X PUT -H "Content-Type: application/json" -d '{"strict": false, "fields": {"license": {"type": "string"} } }' kuzzle:7512/nyc-open-data/yellow-taxi/_specifications + after: +template: default +expected: Success + +sdk: go +version: 3 diff --git a/.doc/2/controllers/collection/index.md b/.doc/3/controllers/collection/index.md similarity index 100% rename from .doc/2/controllers/collection/index.md rename to .doc/3/controllers/collection/index.md diff --git a/.doc/2/controllers/collection/list/index.md b/.doc/3/controllers/collection/list/index.md similarity index 100% rename from .doc/2/controllers/collection/list/index.md rename to .doc/3/controllers/collection/list/index.md diff --git a/.doc/2/controllers/collection/list/snippets/list.go b/.doc/3/controllers/collection/list/snippets/list.go similarity index 100% rename from .doc/2/controllers/collection/list/snippets/list.go rename to .doc/3/controllers/collection/list/snippets/list.go diff --git a/.doc/2/controllers/collection/list/snippets/list.test.yml b/.doc/3/controllers/collection/list/snippets/list.test.yml similarity index 96% rename from .doc/2/controllers/collection/list/snippets/list.test.yml rename to .doc/3/controllers/collection/list/snippets/list.test.yml index c86ea995..4d9345b5 100644 --- a/.doc/2/controllers/collection/list/snippets/list.test.yml +++ b/.doc/3/controllers/collection/list/snippets/list.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/3/controllers/collection/refresh/index.md b/.doc/3/controllers/collection/refresh/index.md new file mode 100644 index 00000000..6ed85365 --- /dev/null +++ b/.doc/3/controllers/collection/refresh/index.md @@ -0,0 +1,40 @@ +--- +code: true +type: page +title: refresh +description: Forces an Elasticsearch search index update +--- + +# refresh + +Refreshes a collection to reindex the written and deleted documents so they are available in search results. + +:::info +A refresh operation comes with some performance costs. + +From the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/docs-refresh.html): +> "While a refresh is much lighter than a commit, it still has a performance cost. A manual refresh can be useful when writing tests, but don’t do a manual refresh every time you index a document in production; it will hurt your performance. Instead, your application needs to be aware of the near real-time nature of Elasticsearch and make allowances for it." + +::: + +
+ +## Arguments + +```go +Refresh(index string, collection string, options types.QueryOptions) error +``` + +| Arguments | Type | Description +| ------------ | --------------- | -------------------------------------- | +| `index` |
string
| Index name | +| `collection` |
string
| Collection name | +| `options` |
QueryOptions
| Query options | + +## Resolves + +Resolves when the refresh has been done. + +## Usage + +<<< ./snippets/refresh.go diff --git a/.doc/3/controllers/collection/refresh/snippets/refresh.go b/.doc/3/controllers/collection/refresh/snippets/refresh.go new file mode 100644 index 00000000..85854e4e --- /dev/null +++ b/.doc/3/controllers/collection/refresh/snippets/refresh.go @@ -0,0 +1,7 @@ +err := kuzzle.Collection.Refresh("nyc-open-data", "yellow-taxi", nil) + +if err != nil { + log.Fatal(err) +} else { + fmt.Println("Success") +} diff --git a/.doc/3/controllers/collection/refresh/snippets/refresh.test.yml b/.doc/3/controllers/collection/refresh/snippets/refresh.test.yml new file mode 100644 index 00000000..8d5273b7 --- /dev/null +++ b/.doc/3/controllers/collection/refresh/snippets/refresh.test.yml @@ -0,0 +1,12 @@ +name: collection#refresh +description: Refresh a collection +hooks: + before: | + curl -X POST kuzzle:7512/nyc-open-data/_create + curl -X PUT kuzzle:7512/nyc-open-data/yellow-taxi + after: +template: default +expected: Success + +sdk: go +version: 3 diff --git a/.doc/2/controllers/collection/search-specifications/index.md b/.doc/3/controllers/collection/search-specifications/index.md similarity index 98% rename from .doc/2/controllers/collection/search-specifications/index.md rename to .doc/3/controllers/collection/search-specifications/index.md index cfa8a537..b55a818f 100644 --- a/.doc/2/controllers/collection/search-specifications/index.md +++ b/.doc/3/controllers/collection/search-specifications/index.md @@ -52,7 +52,7 @@ An empty body matches all documents in the queried collection. ## Return -Returns a [types.SearchResult](/sdk/go/1/core-structs/search-result) struct +Returns a [types.SearchResult](/sdk/go/3/core-structs/search-result) struct ## Usage diff --git a/.doc/2/controllers/collection/search-specifications/snippets/search-specifications.go b/.doc/3/controllers/collection/search-specifications/snippets/search-specifications.go similarity index 100% rename from .doc/2/controllers/collection/search-specifications/snippets/search-specifications.go rename to .doc/3/controllers/collection/search-specifications/snippets/search-specifications.go diff --git a/.doc/2/controllers/collection/search-specifications/snippets/search-specifications.test.yml b/.doc/3/controllers/collection/search-specifications/snippets/search-specifications.test.yml similarity index 98% rename from .doc/2/controllers/collection/search-specifications/snippets/search-specifications.test.yml rename to .doc/3/controllers/collection/search-specifications/snippets/search-specifications.test.yml index 08f95744..b07ed2ef 100644 --- a/.doc/2/controllers/collection/search-specifications/snippets/search-specifications.test.yml +++ b/.doc/3/controllers/collection/search-specifications/snippets/search-specifications.test.yml @@ -21,4 +21,4 @@ hooks: template: default expected: Successfully retrieved 1 specifications sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/truncate/index.md b/.doc/3/controllers/collection/truncate/index.md similarity index 100% rename from .doc/2/controllers/collection/truncate/index.md rename to .doc/3/controllers/collection/truncate/index.md diff --git a/.doc/2/controllers/collection/truncate/snippets/truncate.go b/.doc/3/controllers/collection/truncate/snippets/truncate.go similarity index 100% rename from .doc/2/controllers/collection/truncate/snippets/truncate.go rename to .doc/3/controllers/collection/truncate/snippets/truncate.go diff --git a/.doc/2/controllers/collection/truncate/snippets/truncate.test.yml b/.doc/3/controllers/collection/truncate/snippets/truncate.test.yml similarity index 95% rename from .doc/2/controllers/collection/truncate/snippets/truncate.test.yml rename to .doc/3/controllers/collection/truncate/snippets/truncate.test.yml index 65e8665c..4f01d1dd 100644 --- a/.doc/2/controllers/collection/truncate/snippets/truncate.test.yml +++ b/.doc/3/controllers/collection/truncate/snippets/truncate.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/update-mapping/index.md b/.doc/3/controllers/collection/update-mapping/index.md similarity index 94% rename from .doc/2/controllers/collection/update-mapping/index.md rename to .doc/3/controllers/collection/update-mapping/index.md index 706b9e45..3c231746 100644 --- a/.doc/2/controllers/collection/update-mapping/index.md +++ b/.doc/3/controllers/collection/update-mapping/index.md @@ -43,7 +43,7 @@ The mapping must have a root field `properties` that contain the mapping definit } ``` -More informations about database mappings [here](/core/1/guides/essentials/database-mappings). +More informations about database mappings [here](/core/2/guides/main-concepts/data-storage). ### **options** diff --git a/.doc/2/controllers/collection/update-mapping/snippets/update-mapping.go b/.doc/3/controllers/collection/update-mapping/snippets/update-mapping.go similarity index 100% rename from .doc/2/controllers/collection/update-mapping/snippets/update-mapping.go rename to .doc/3/controllers/collection/update-mapping/snippets/update-mapping.go diff --git a/.doc/2/controllers/collection/update-mapping/snippets/update-mapping.test.yml b/.doc/3/controllers/collection/update-mapping/snippets/update-mapping.test.yml similarity index 95% rename from .doc/2/controllers/collection/update-mapping/snippets/update-mapping.test.yml rename to .doc/3/controllers/collection/update-mapping/snippets/update-mapping.test.yml index 899d4a6b..71b145f0 100644 --- a/.doc/2/controllers/collection/update-mapping/snippets/update-mapping.test.yml +++ b/.doc/3/controllers/collection/update-mapping/snippets/update-mapping.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/update-specifications/index.md b/.doc/3/controllers/collection/update-specifications/index.md similarity index 94% rename from .doc/2/controllers/collection/update-specifications/index.md rename to .doc/3/controllers/collection/update-specifications/index.md index 8b3b5ca8..9f38b423 100644 --- a/.doc/2/controllers/collection/update-specifications/index.md +++ b/.doc/3/controllers/collection/update-specifications/index.md @@ -28,7 +28,7 @@ UpdateSpecifications(index string, collection string, specifications json.RawMes A JSON representation of the specifications. -The JSON must follow the [Specification Structure](/core/1/guides/cookbooks/datavalidation): +The JSON must follow the [Specification Structure](/core/2/guides/advanced/data-validation): ```json { diff --git a/.doc/2/controllers/collection/update-specifications/snippets/update-specifications.go b/.doc/3/controllers/collection/update-specifications/snippets/update-specifications.go similarity index 100% rename from .doc/2/controllers/collection/update-specifications/snippets/update-specifications.go rename to .doc/3/controllers/collection/update-specifications/snippets/update-specifications.go diff --git a/.doc/2/controllers/collection/update-specifications/snippets/update-specifications.test.yml b/.doc/3/controllers/collection/update-specifications/snippets/update-specifications.test.yml similarity index 55% rename from .doc/2/controllers/collection/update-specifications/snippets/update-specifications.test.yml rename to .doc/3/controllers/collection/update-specifications/snippets/update-specifications.test.yml index 0dfcb58b..948ac0b9 100644 --- a/.doc/2/controllers/collection/update-specifications/snippets/update-specifications.test.yml +++ b/.doc/3/controllers/collection/update-specifications/snippets/update-specifications.test.yml @@ -1,10 +1,13 @@ name: collection#updateSpecifications description: Update the validation specifications hooks: - before: curl -X POST kuzzle:7512/nyc-open-data/_create && curl -X PUT kuzzle:7512/nyc-open-data/green-taxi + before: | + curl -X DELETE kuzzle:7512:/nyc-open-data + curl -X POST kuzzle:7512/nyc-open-data/_create + curl -X PUT kuzzle:7512/nyc-open-data/green-taxi after: curl -X DELETE kuzzle:7512/nyc-open-data/yellow-taxi/_specifications template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/collection/validate-specifications/index.md b/.doc/3/controllers/collection/validate-specifications/index.md similarity index 95% rename from .doc/2/controllers/collection/validate-specifications/index.md rename to .doc/3/controllers/collection/validate-specifications/index.md index 828a3eea..9fd400a7 100644 --- a/.doc/2/controllers/collection/validate-specifications/index.md +++ b/.doc/3/controllers/collection/validate-specifications/index.md @@ -28,7 +28,7 @@ ValidateSpecifications(index string, collection string, specifications json.RawM A JSON representation of the specifications. -The JSON must follow the [Specification Structure](/core/1/guides/cookbooks/datavalidation): +The JSON must follow the [Specification Structure](/core/2/guides/advanced/data-validation): ```json { diff --git a/.doc/2/controllers/collection/validate-specifications/snippets/validate-specifications.go b/.doc/3/controllers/collection/validate-specifications/snippets/validate-specifications.go similarity index 100% rename from .doc/2/controllers/collection/validate-specifications/snippets/validate-specifications.go rename to .doc/3/controllers/collection/validate-specifications/snippets/validate-specifications.go diff --git a/.doc/2/controllers/collection/validate-specifications/snippets/validate-specifications.test.yml b/.doc/3/controllers/collection/validate-specifications/snippets/validate-specifications.test.yml similarity index 95% rename from .doc/2/controllers/collection/validate-specifications/snippets/validate-specifications.test.yml rename to .doc/3/controllers/collection/validate-specifications/snippets/validate-specifications.test.yml index a0e2f0e2..f76fbef4 100644 --- a/.doc/2/controllers/collection/validate-specifications/snippets/validate-specifications.test.yml +++ b/.doc/3/controllers/collection/validate-specifications/snippets/validate-specifications.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/count/index.md b/.doc/3/controllers/document/count/index.md similarity index 100% rename from .doc/2/controllers/document/count/index.md rename to .doc/3/controllers/document/count/index.md diff --git a/.doc/2/controllers/document/count/snippets/count.go b/.doc/3/controllers/document/count/snippets/count.go similarity index 100% rename from .doc/2/controllers/document/count/snippets/count.go rename to .doc/3/controllers/document/count/snippets/count.go diff --git a/.doc/2/controllers/document/count/snippets/count.test.yml b/.doc/3/controllers/document/count/snippets/count.test.yml similarity index 89% rename from .doc/2/controllers/document/count/snippets/count.test.yml rename to .doc/3/controllers/document/count/snippets/count.test.yml index 2b495e5e..0320d932 100644 --- a/.doc/2/controllers/document/count/snippets/count.test.yml +++ b/.doc/3/controllers/document/count/snippets/count.test.yml @@ -12,11 +12,11 @@ hooks: for i in 1 2 3 4 5; do curl -H "Content-type: application/json" -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done - curl -XPOST kuzzle:7512/nyc-open-data/_refresh + curl -X POST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh after: | curl -XDELETE kuzzle:7512/nyc-open-data template: default expected: Found 5 documents matching licence:valid sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/create/index.md b/.doc/3/controllers/document/create/index.md similarity index 100% rename from .doc/2/controllers/document/create/index.md rename to .doc/3/controllers/document/create/index.md diff --git a/.doc/2/controllers/document/create/snippets/create.go b/.doc/3/controllers/document/create/snippets/create.go similarity index 100% rename from .doc/2/controllers/document/create/snippets/create.go rename to .doc/3/controllers/document/create/snippets/create.go diff --git a/.doc/2/controllers/document/create/snippets/create.test.yml b/.doc/3/controllers/document/create/snippets/create.test.yml similarity index 96% rename from .doc/2/controllers/document/create/snippets/create.test.yml rename to .doc/3/controllers/document/create/snippets/create.test.yml index 0222d9c0..b776ba5b 100644 --- a/.doc/2/controllers/document/create/snippets/create.test.yml +++ b/.doc/3/controllers/document/create/snippets/create.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/createOrReplace/index.md b/.doc/3/controllers/document/createOrReplace/index.md similarity index 100% rename from .doc/2/controllers/document/createOrReplace/index.md rename to .doc/3/controllers/document/createOrReplace/index.md diff --git a/.doc/2/controllers/document/createOrReplace/snippets/create-or-replace.go b/.doc/3/controllers/document/createOrReplace/snippets/create-or-replace.go similarity index 100% rename from .doc/2/controllers/document/createOrReplace/snippets/create-or-replace.go rename to .doc/3/controllers/document/createOrReplace/snippets/create-or-replace.go diff --git a/.doc/2/controllers/document/createOrReplace/snippets/create-or-replace.test.yml b/.doc/3/controllers/document/createOrReplace/snippets/create-or-replace.test.yml similarity index 96% rename from .doc/2/controllers/document/createOrReplace/snippets/create-or-replace.test.yml rename to .doc/3/controllers/document/createOrReplace/snippets/create-or-replace.test.yml index 158e88fb..7a8bfbf2 100644 --- a/.doc/2/controllers/document/createOrReplace/snippets/create-or-replace.test.yml +++ b/.doc/3/controllers/document/createOrReplace/snippets/create-or-replace.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/delete/index.md b/.doc/3/controllers/document/delete/index.md similarity index 100% rename from .doc/2/controllers/document/delete/index.md rename to .doc/3/controllers/document/delete/index.md diff --git a/.doc/2/controllers/document/delete/snippets/delete.go b/.doc/3/controllers/document/delete/snippets/delete.go similarity index 100% rename from .doc/2/controllers/document/delete/snippets/delete.go rename to .doc/3/controllers/document/delete/snippets/delete.go diff --git a/.doc/2/controllers/document/delete/snippets/delete.test.yml b/.doc/3/controllers/document/delete/snippets/delete.test.yml similarity index 95% rename from .doc/2/controllers/document/delete/snippets/delete.test.yml rename to .doc/3/controllers/document/delete/snippets/delete.test.yml index 36f943d8..f82544a2 100644 --- a/.doc/2/controllers/document/delete/snippets/delete.test.yml +++ b/.doc/3/controllers/document/delete/snippets/delete.test.yml @@ -10,6 +10,3 @@ hooks: curl -XDELETE kuzzle:7512/nyc-open-data template: default expected: Success - -sdk: go -version: 1 diff --git a/.doc/2/controllers/document/deleteByQuery/index.md b/.doc/3/controllers/document/deleteByQuery/index.md similarity index 100% rename from .doc/2/controllers/document/deleteByQuery/index.md rename to .doc/3/controllers/document/deleteByQuery/index.md diff --git a/.doc/2/controllers/document/deleteByQuery/snippets/delete-by-query.go b/.doc/3/controllers/document/deleteByQuery/snippets/delete-by-query.go similarity index 100% rename from .doc/2/controllers/document/deleteByQuery/snippets/delete-by-query.go rename to .doc/3/controllers/document/deleteByQuery/snippets/delete-by-query.go diff --git a/.doc/2/controllers/document/deleteByQuery/snippets/delete-by-query.test.yml b/.doc/3/controllers/document/deleteByQuery/snippets/delete-by-query.test.yml similarity index 90% rename from .doc/2/controllers/document/deleteByQuery/snippets/delete-by-query.test.yml rename to .doc/3/controllers/document/deleteByQuery/snippets/delete-by-query.test.yml index 80d68a77..069e274a 100644 --- a/.doc/2/controllers/document/deleteByQuery/snippets/delete-by-query.test.yml +++ b/.doc/3/controllers/document/deleteByQuery/snippets/delete-by-query.test.yml @@ -14,11 +14,11 @@ hooks: curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done - curl -XPOST kuzzle:7512/nyc-open-data/_refresh + curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh after: | curl -XDELETE kuzzle:7512/nyc-open-data template: default expected: Successfully deleted 5 documents sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/get/index.md b/.doc/3/controllers/document/get/index.md similarity index 100% rename from .doc/2/controllers/document/get/index.md rename to .doc/3/controllers/document/get/index.md diff --git a/.doc/2/controllers/document/get/snippets/get.go b/.doc/3/controllers/document/get/snippets/get.go similarity index 100% rename from .doc/2/controllers/document/get/snippets/get.go rename to .doc/3/controllers/document/get/snippets/get.go diff --git a/.doc/2/controllers/document/get/snippets/get.test.yml b/.doc/3/controllers/document/get/snippets/get.test.yml similarity index 96% rename from .doc/2/controllers/document/get/snippets/get.test.yml rename to .doc/3/controllers/document/get/snippets/get.test.yml index d620e4f6..2c2d2ae5 100644 --- a/.doc/2/controllers/document/get/snippets/get.test.yml +++ b/.doc/3/controllers/document/get/snippets/get.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/index.md b/.doc/3/controllers/document/index.md similarity index 100% rename from .doc/2/controllers/document/index.md rename to .doc/3/controllers/document/index.md diff --git a/.doc/2/controllers/document/mCreate/index.md b/.doc/3/controllers/document/mCreate/index.md similarity index 57% rename from .doc/2/controllers/document/mCreate/index.md rename to .doc/3/controllers/document/mCreate/index.md index 6bc05dde..177dbff3 100644 --- a/.doc/2/controllers/document/mCreate/index.md +++ b/.doc/3/controllers/document/mCreate/index.md @@ -41,7 +41,21 @@ Additional query options ## Return -Returns an json.RawMessage containing the created documents. +Returns a json.RawMessage containing two arrays, successes and errors. + +Each created document is an object of the `successes` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `_id` |
string
| Document ID | +| `_version` |
int
| Version of the document in the persistent data storage | +| `_source` |
json.RawMessage
| Document content | + +Each errored document is an object of the `errors` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ----------------------------- | +| `document` |
json.RawMessage
| Document that caused the error | +| `status` |
int
| HTTP error status | +| `reason` |
string
| Human readable reason | ## Usage diff --git a/.doc/3/controllers/document/mCreate/snippets/m-create.go b/.doc/3/controllers/document/mCreate/snippets/m-create.go new file mode 100644 index 00000000..c89fce00 --- /dev/null +++ b/.doc/3/controllers/document/mCreate/snippets/m-create.go @@ -0,0 +1,78 @@ +documents := json.RawMessage(`[ + { + "_id": "some-id", + "body": { "capacity": 4 } + }, + { + "body": { "this": "document id is auto-computed" } + } + ]`) +response, err := kuzzle.Document.MCreate( + "nyc-open-data", + "yellow-taxi", + documents, + nil) + +if err != nil { + log.Fatal(err) +} else { + fmt.Println(string(response)) + /* + { + "successes": [ + { + "_id":"some-id", + "_source":{ + "_kuzzle_info":{ + "active":true, + "author":"-1", + "updater":null, + "updatedAt":null, + "deletedAt":null, + "createdAt":1538484279484 + }, + "capacity":4 + }, + "_index":"nyc-open-data", + "_type":"yellow-taxi", + "_version":1, + "result":"created", + "_shards":{ + "total":2, + "successful":1, + "failed":0 + }, + "created":true, + "status":201 + }, + { + "_id":"AWY0zxi_7XvER2v0e9xR", + "_source":{ + "_kuzzle_info":{ + "active":true, + "author":"-1", + "updater":null, + "updatedAt":null, + "deletedAt":null, + "createdAt":1538484279484 + }, + "this":"document id is auto-computed" + }, + "_index":"nyc-open-data", + "_type":"yellow-taxi", + "_version":1, + "result":"created", + "_shards":{ + "total":2, + "successful":1, + "failed":0 + }, + "created":true, + "status":201 + } + ], + errors: [] + } + */ + fmt.Println("Success") +} \ No newline at end of file diff --git a/.doc/2/controllers/document/mCreate/snippets/m-create.test.yml b/.doc/3/controllers/document/mCreate/snippets/m-create.test.yml similarity index 96% rename from .doc/2/controllers/document/mCreate/snippets/m-create.test.yml rename to .doc/3/controllers/document/mCreate/snippets/m-create.test.yml index 5ca9676b..46256ded 100644 --- a/.doc/2/controllers/document/mCreate/snippets/m-create.test.yml +++ b/.doc/3/controllers/document/mCreate/snippets/m-create.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/mCreateOrReplace/index.md b/.doc/3/controllers/document/mCreateOrReplace/index.md similarity index 55% rename from .doc/2/controllers/document/mCreateOrReplace/index.md rename to .doc/3/controllers/document/mCreateOrReplace/index.md index d4c234d6..7ecd501d 100644 --- a/.doc/2/controllers/document/mCreateOrReplace/index.md +++ b/.doc/3/controllers/document/mCreateOrReplace/index.md @@ -41,7 +41,22 @@ Additional query options ## Return -Returns an json.RawMessage containing the created documents. +Returns a json.RawMessage containing two arrays, successes and errors. + +Each created or replaced document is an object of the `successes` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `_id` |
string
| Document ID | +| `_version` |
int
| Version of the document in the persistent data storage | +| `_source` |
json.RawMessage
| Document content | +| `created` |
bool
| True if the document was created | + +Each errored document is an object of the `errors` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ----------------------------- | +| `document` |
json.RawMessage
| Document that caused the error | +| `status` |
int
| HTTP error status | +| `reason` |
string
| Human readable reason | ## Usage diff --git a/.doc/3/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.go b/.doc/3/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.go new file mode 100644 index 00000000..7e0113ae --- /dev/null +++ b/.doc/3/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.go @@ -0,0 +1,95 @@ +body := json.RawMessage(`[ + { + "_id": "some-id", + "body": { "capacity": 4 } + }, + { + "_id": "some-other-id", + "body": { "capacity": 4 } + } + ]`) +response, err := kuzzle.Document.MCreateOrReplace( + "nyc-open-data", + "yellow-taxi", + body, + nil) + +if err != nil { + log.Fatal(err) +} else { + fmt.Println(string(response)) + /* + { + "successes": [ + { + "_id":"some-id", + "_source":{ + "_kuzzle_info":{ + "active":true, + "author":"-1", + "updater":null, + "updatedAt":null, + "deletedAt":null, + "createdAt":1538552685790 + }, + "capacity":4 + }, + "_index":"nyc-open-data", + "_type":"yellow-taxi", + "_version":1, + "result":"created", + "_shards":{ + "total":2, + "successful":1, + "failed":0 + }, + "created":true, + "status":201, + "_meta":{ + "active":true, + "author":"-1", + "updater":null, + "updatedAt":null, + "deletedAt":null, + "createdAt":1538552685790 + } + }, + { + "_id":"some-other-id", + "_source":{ + "_kuzzle_info":{ + "active":true, + "author":"-1", + "updater":null, + "updatedAt":null, + "deletedAt":null, + "createdAt":1538552685790 + }, + "capacity":4 + }, + "_index":"nyc-open-data", + "_type":"yellow-taxi", + "_version":1, + "result":"created", + "_shards":{ + "total":2, + "successful":1, + "failed":0 + }, + "created":true, + "status":201, + "_meta":{ + "active":true, + "author":"-1", + "updater":null, + "updatedAt":null, + "deletedAt":null, + "createdAt":1538552685790 + } + } + ], + "errors": [] + } + */ + fmt.Println("Success") +} \ No newline at end of file diff --git a/.doc/2/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.test.yml b/.doc/3/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.test.yml similarity index 96% rename from .doc/2/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.test.yml rename to .doc/3/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.test.yml index bf840cb6..394c0c9e 100644 --- a/.doc/2/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.test.yml +++ b/.doc/3/controllers/document/mCreateOrReplace/snippets/m-create-or-replace.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/mDelete/index.md b/.doc/3/controllers/document/mDelete/index.md similarity index 78% rename from .doc/2/controllers/document/mDelete/index.md rename to .doc/3/controllers/document/mDelete/index.md index d87853d8..c67c8c39 100644 --- a/.doc/2/controllers/document/mDelete/index.md +++ b/.doc/3/controllers/document/mDelete/index.md @@ -43,7 +43,16 @@ Additional query options ## Return -Returns an array of strings containing the ids of the deleted documents. +Returns a json.RawMessage containing two arrays, successes and errors. + +The `successes` array contain the successfuly deleted document IDs. + +Each deletion error is an object of the `errors` array with the following properties: +| Name | Type | Description | +| -------- | ----------------- | --------------------- | +| `_id` |
string
| Document ID | +| `reason` |
string
| Human readable reason | + ## Usage diff --git a/.doc/3/controllers/document/mDelete/snippets/m-delete.go b/.doc/3/controllers/document/mDelete/snippets/m-delete.go new file mode 100644 index 00000000..72ea16b1 --- /dev/null +++ b/.doc/3/controllers/document/mDelete/snippets/m-delete.go @@ -0,0 +1,30 @@ +ids := []string{"some-id", "some-other-id"} + +kuzzle.Document.Create( + "nyc-open-data", + "yellow-taxi", + "some-id", + json.RawMessage(`{}`), + nil) + +kuzzle.Document.Create( + "nyc-open-data", + "yellow-taxi", + "some-other-id", + json.RawMessage(`{}`), + nil) + + +deletedJSON, err := kuzzle.Document.MDelete("nyc-open-data", "yellow-taxi", ids, nil) + +if err != nil { + log.Fatal(err) +} else { + type deletedResult struct { + Successes []json.RawMessage `json:"successes"` + Errors []json.RawMessage `json:"errors"` + } + var deleted deletedResult + json.Unmarshal(deletedJSON, &deleted) + fmt.Printf("Successfully deleted %d documents", len(deleted.Successes)) +} diff --git a/.doc/2/controllers/document/mDelete/snippets/m-delete.test.yml b/.doc/3/controllers/document/mDelete/snippets/m-delete.test.yml similarity index 96% rename from .doc/2/controllers/document/mDelete/snippets/m-delete.test.yml rename to .doc/3/controllers/document/mDelete/snippets/m-delete.test.yml index c53d50de..78412daf 100644 --- a/.doc/2/controllers/document/mDelete/snippets/m-delete.test.yml +++ b/.doc/3/controllers/document/mDelete/snippets/m-delete.test.yml @@ -11,4 +11,4 @@ template: default expected: Successfully deleted 2 documents sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/mGet/index.md b/.doc/3/controllers/document/mGet/index.md similarity index 63% rename from .doc/2/controllers/document/mGet/index.md rename to .doc/3/controllers/document/mGet/index.md index c1b4a904..3e608684 100644 --- a/.doc/2/controllers/document/mGet/index.md +++ b/.doc/3/controllers/document/mGet/index.md @@ -40,7 +40,18 @@ Additional query options ## Return -Returns a json.RawMessage containing the retrieved documents. +Returns a json.RawMessage containing two arrays, successes and errors. + +The `successes` array contain the list of retrieved documents. + +Each document have the the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `_id` |
string
| Document ID | +| `_version` |
int
| Version of the document in the persistent data storage | +| `_source` |
json.RawMessage
| Document content | + +The `errors` array contain the IDs of not found documents. ## Usage diff --git a/.doc/2/controllers/document/mGet/snippets/m-get.go b/.doc/3/controllers/document/mGet/snippets/m-get.go similarity index 100% rename from .doc/2/controllers/document/mGet/snippets/m-get.go rename to .doc/3/controllers/document/mGet/snippets/m-get.go diff --git a/.doc/2/controllers/document/mGet/snippets/m-get.test.yml b/.doc/3/controllers/document/mGet/snippets/m-get.test.yml similarity index 96% rename from .doc/2/controllers/document/mGet/snippets/m-get.test.yml rename to .doc/3/controllers/document/mGet/snippets/m-get.test.yml index e51e921e..00abfe66 100644 --- a/.doc/2/controllers/document/mGet/snippets/m-get.test.yml +++ b/.doc/3/controllers/document/mGet/snippets/m-get.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/mReplace/index.md b/.doc/3/controllers/document/mReplace/index.md similarity index 56% rename from .doc/2/controllers/document/mReplace/index.md rename to .doc/3/controllers/document/mReplace/index.md index 503d330e..2cb25a3b 100644 --- a/.doc/2/controllers/document/mReplace/index.md +++ b/.doc/3/controllers/document/mReplace/index.md @@ -41,7 +41,21 @@ Additional query options ## Return -Returns a json.RawMessage containing the updated documents. +Returns a json.RawMessage containing two arrays, successes and errors. + +Each replaced document is an object of the `successes` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `_id` |
string
| Document ID | +| `_version` |
int
| Version of the document in the persistent data storage | +| `_source` |
json.RawMessage
| Document content | + +Each errored document is an object of the `errors` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ----------------------------- | +| `document` |
json.RawMessage
| Document that caused the error | +| `status` |
int
| HTTP error status | +| `reason` |
string
| Human readable reason | ## Usage diff --git a/.doc/2/controllers/document/mReplace/snippets/m-replace.go b/.doc/3/controllers/document/mReplace/snippets/m-replace.go similarity index 100% rename from .doc/2/controllers/document/mReplace/snippets/m-replace.go rename to .doc/3/controllers/document/mReplace/snippets/m-replace.go diff --git a/.doc/2/controllers/document/mReplace/snippets/m-replace.test.yml b/.doc/3/controllers/document/mReplace/snippets/m-replace.test.yml similarity index 96% rename from .doc/2/controllers/document/mReplace/snippets/m-replace.test.yml rename to .doc/3/controllers/document/mReplace/snippets/m-replace.test.yml index 3db7d560..2dd793f8 100644 --- a/.doc/2/controllers/document/mReplace/snippets/m-replace.test.yml +++ b/.doc/3/controllers/document/mReplace/snippets/m-replace.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/mUpdate/index.md b/.doc/3/controllers/document/mUpdate/index.md similarity index 63% rename from .doc/2/controllers/document/mUpdate/index.md rename to .doc/3/controllers/document/mUpdate/index.md index 8961639d..edc53a95 100644 --- a/.doc/2/controllers/document/mUpdate/index.md +++ b/.doc/3/controllers/document/mUpdate/index.md @@ -46,7 +46,21 @@ Additional query options ## Return -Returns a json.RawMessage containing the update documetns. +Returns a json.RawMessage containing two arrays, successes and errors. + +Each updated document is an object of the `successes` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `_id` |
string
| Document ID | +| `_version` |
int
| Version of the document in the persistent data storage | +| `_source` |
json.RawMessage
| Document content | + +Each errored document is an object of the `errors` array with the following properties: +| Name | Type | Description | +| ---------- | -------------------------- | ----------------------------- | +| `document` |
json.RawMessage
| Document that caused the error | +| `status` |
int
| HTTP error status | +| `reason` |
string
| Human readable reason | ## Usage diff --git a/.doc/2/controllers/document/mUpdate/snippets/m-update.go b/.doc/3/controllers/document/mUpdate/snippets/m-update.go similarity index 100% rename from .doc/2/controllers/document/mUpdate/snippets/m-update.go rename to .doc/3/controllers/document/mUpdate/snippets/m-update.go diff --git a/.doc/2/controllers/document/mUpdate/snippets/m-update.test.yml b/.doc/3/controllers/document/mUpdate/snippets/m-update.test.yml similarity index 96% rename from .doc/2/controllers/document/mUpdate/snippets/m-update.test.yml rename to .doc/3/controllers/document/mUpdate/snippets/m-update.test.yml index 49a07737..df5309e2 100644 --- a/.doc/2/controllers/document/mUpdate/snippets/m-update.test.yml +++ b/.doc/3/controllers/document/mUpdate/snippets/m-update.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/replace/index.md b/.doc/3/controllers/document/replace/index.md similarity index 100% rename from .doc/2/controllers/document/replace/index.md rename to .doc/3/controllers/document/replace/index.md diff --git a/.doc/2/controllers/document/replace/snippets/replace.go b/.doc/3/controllers/document/replace/snippets/replace.go similarity index 100% rename from .doc/2/controllers/document/replace/snippets/replace.go rename to .doc/3/controllers/document/replace/snippets/replace.go diff --git a/.doc/2/controllers/document/replace/snippets/replace.test.yml b/.doc/3/controllers/document/replace/snippets/replace.test.yml similarity index 96% rename from .doc/2/controllers/document/replace/snippets/replace.test.yml rename to .doc/3/controllers/document/replace/snippets/replace.test.yml index bc50b790..cb0ca109 100644 --- a/.doc/2/controllers/document/replace/snippets/replace.test.yml +++ b/.doc/3/controllers/document/replace/snippets/replace.test.yml @@ -10,4 +10,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/search/index.md b/.doc/3/controllers/document/search/index.md similarity index 98% rename from .doc/2/controllers/document/search/index.md rename to .doc/3/controllers/document/search/index.md index 90a4b656..8de1f572 100644 --- a/.doc/2/controllers/document/search/index.md +++ b/.doc/3/controllers/document/search/index.md @@ -58,7 +58,7 @@ An empty body matches all documents in the queried collection. ## Return -Returns a pointer on [types.SearchResult](/sdk/go/1/core-structs/search-result) struct +Returns a pointer on [types.SearchResult](/sdk/go/3/core-structs/search-result) struct ## Usage diff --git a/.doc/2/controllers/document/search/snippets/search.go b/.doc/3/controllers/document/search/snippets/search.go similarity index 91% rename from .doc/2/controllers/document/search/snippets/search.go rename to .doc/3/controllers/document/search/snippets/search.go index 1b15e99d..857ffd38 100644 --- a/.doc/2/controllers/document/search/snippets/search.go +++ b/.doc/3/controllers/document/search/snippets/search.go @@ -8,7 +8,7 @@ for i := 5; i < 15; i++ { "category": "limousine" }`), nil) } -kuzzle.Index.Refresh("nyc-open-data", nil) +kuzzle.Collection.Refresh("nyc-open-data", "yellow-taxi", nil) options := types.NewQueryOptions() options.SetFrom(0) diff --git a/.doc/2/controllers/document/search/snippets/search.test.yml b/.doc/3/controllers/document/search/snippets/search.test.yml similarity index 55% rename from .doc/2/controllers/document/search/snippets/search.test.yml rename to .doc/3/controllers/document/search/snippets/search.test.yml index 8d28c304..0e0939e4 100644 --- a/.doc/2/controllers/document/search/snippets/search.test.yml +++ b/.doc/3/controllers/document/search/snippets/search.test.yml @@ -2,13 +2,13 @@ name: document#search description: Search documents hooks: before: | - curl -XDELETE kuzzle:7512/nyc-open-data - curl -XPOST kuzzle:7512/nyc-open-data/_create - curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi + curl -X DELETE kuzzle:7512/nyc-open-data + curl -X POST kuzzle:7512/nyc-open-data/_create + curl -X PUT kuzzle:7512/nyc-open-data/yellow-taxi after: | curl -XDELETE kuzzle:7512/nyc-open-data template: default expected: ^Successfully retrieved 5 documents$ sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/update/index.md b/.doc/3/controllers/document/update/index.md similarity index 100% rename from .doc/2/controllers/document/update/index.md rename to .doc/3/controllers/document/update/index.md diff --git a/.doc/2/controllers/document/update/snippets/update.go b/.doc/3/controllers/document/update/snippets/update.go similarity index 100% rename from .doc/2/controllers/document/update/snippets/update.go rename to .doc/3/controllers/document/update/snippets/update.go diff --git a/.doc/2/controllers/document/update/snippets/update.test.yml b/.doc/3/controllers/document/update/snippets/update.test.yml similarity index 71% rename from .doc/2/controllers/document/update/snippets/update.test.yml rename to .doc/3/controllers/document/update/snippets/update.test.yml index ea5ca64c..c254a860 100644 --- a/.doc/2/controllers/document/update/snippets/update.test.yml +++ b/.doc/3/controllers/document/update/snippets/update.test.yml @@ -8,7 +8,7 @@ hooks: after: | curl -XDELETE kuzzle:7512/nyc-open-data template: default -expected: '{"_index":"nyc-open-data","_type":"yellow-taxi","_id":"some-id","_version":2,"result":"updated","' +expected: {"_id":"some-id","_source":{.*}, "_version":2} sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/document/validate/index.md b/.doc/3/controllers/document/validate/index.md similarity index 100% rename from .doc/2/controllers/document/validate/index.md rename to .doc/3/controllers/document/validate/index.md diff --git a/.doc/2/controllers/document/validate/snippets/validate.go b/.doc/3/controllers/document/validate/snippets/validate.go similarity index 100% rename from .doc/2/controllers/document/validate/snippets/validate.go rename to .doc/3/controllers/document/validate/snippets/validate.go diff --git a/.doc/2/controllers/document/validate/snippets/validate.test.yml b/.doc/3/controllers/document/validate/snippets/validate.test.yml similarity index 96% rename from .doc/2/controllers/document/validate/snippets/validate.test.yml rename to .doc/3/controllers/document/validate/snippets/validate.test.yml index d3dcc0f3..76a106f6 100644 --- a/.doc/2/controllers/document/validate/snippets/validate.test.yml +++ b/.doc/3/controllers/document/validate/snippets/validate.test.yml @@ -11,4 +11,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/index.md b/.doc/3/controllers/index.md similarity index 100% rename from .doc/2/controllers/index.md rename to .doc/3/controllers/index.md diff --git a/.doc/2/controllers/index/create/index.md b/.doc/3/controllers/index/create/index.md similarity index 100% rename from .doc/2/controllers/index/create/index.md rename to .doc/3/controllers/index/create/index.md diff --git a/.doc/2/controllers/index/create/snippets/create.go b/.doc/3/controllers/index/create/snippets/create.go similarity index 100% rename from .doc/2/controllers/index/create/snippets/create.go rename to .doc/3/controllers/index/create/snippets/create.go diff --git a/.doc/2/controllers/index/create/snippets/create.test.yml b/.doc/3/controllers/index/create/snippets/create.test.yml similarity index 94% rename from .doc/2/controllers/index/create/snippets/create.test.yml rename to .doc/3/controllers/index/create/snippets/create.test.yml index e984d053..b8d7bf2e 100644 --- a/.doc/2/controllers/index/create/snippets/create.test.yml +++ b/.doc/3/controllers/index/create/snippets/create.test.yml @@ -8,4 +8,4 @@ template: default expected: index created sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/index/delete/index.md b/.doc/3/controllers/index/delete/index.md similarity index 100% rename from .doc/2/controllers/index/delete/index.md rename to .doc/3/controllers/index/delete/index.md diff --git a/.doc/2/controllers/index/delete/snippets/delete.go b/.doc/3/controllers/index/delete/snippets/delete.go similarity index 100% rename from .doc/2/controllers/index/delete/snippets/delete.go rename to .doc/3/controllers/index/delete/snippets/delete.go diff --git a/.doc/2/controllers/index/delete/snippets/delete.test.yml b/.doc/3/controllers/index/delete/snippets/delete.test.yml similarity index 94% rename from .doc/2/controllers/index/delete/snippets/delete.test.yml rename to .doc/3/controllers/index/delete/snippets/delete.test.yml index cd1b7543..4135543b 100644 --- a/.doc/2/controllers/index/delete/snippets/delete.test.yml +++ b/.doc/3/controllers/index/delete/snippets/delete.test.yml @@ -8,4 +8,4 @@ template: default expected: index deleted sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/index/exists/index.md b/.doc/3/controllers/index/exists/index.md similarity index 100% rename from .doc/2/controllers/index/exists/index.md rename to .doc/3/controllers/index/exists/index.md diff --git a/.doc/2/controllers/index/exists/snippets/exists.go b/.doc/3/controllers/index/exists/snippets/exists.go similarity index 100% rename from .doc/2/controllers/index/exists/snippets/exists.go rename to .doc/3/controllers/index/exists/snippets/exists.go diff --git a/.doc/2/controllers/index/exists/snippets/exists.test.yml b/.doc/3/controllers/index/exists/snippets/exists.test.yml similarity index 94% rename from .doc/2/controllers/index/exists/snippets/exists.test.yml rename to .doc/3/controllers/index/exists/snippets/exists.test.yml index 831d5585..644eac12 100644 --- a/.doc/2/controllers/index/exists/snippets/exists.test.yml +++ b/.doc/3/controllers/index/exists/snippets/exists.test.yml @@ -8,4 +8,4 @@ template: default expected: index exists sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/index/index.md b/.doc/3/controllers/index/index.md similarity index 100% rename from .doc/2/controllers/index/index.md rename to .doc/3/controllers/index/index.md diff --git a/.doc/2/controllers/index/list/index.md b/.doc/3/controllers/index/list/index.md similarity index 100% rename from .doc/2/controllers/index/list/index.md rename to .doc/3/controllers/index/list/index.md diff --git a/.doc/2/controllers/index/list/snippets/list.go b/.doc/3/controllers/index/list/snippets/list.go similarity index 100% rename from .doc/2/controllers/index/list/snippets/list.go rename to .doc/3/controllers/index/list/snippets/list.go diff --git a/.doc/2/controllers/index/list/snippets/list.test.yml b/.doc/3/controllers/index/list/snippets/list.test.yml similarity index 95% rename from .doc/2/controllers/index/list/snippets/list.test.yml rename to .doc/3/controllers/index/list/snippets/list.test.yml index 46eda29f..ec225b85 100644 --- a/.doc/2/controllers/index/list/snippets/list.test.yml +++ b/.doc/3/controllers/index/list/snippets/list.test.yml @@ -8,4 +8,4 @@ template: default expected: Kuzzle contains 1 indexes sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/index/m-delete/index.md b/.doc/3/controllers/index/m-delete/index.md similarity index 100% rename from .doc/2/controllers/index/m-delete/index.md rename to .doc/3/controllers/index/m-delete/index.md diff --git a/.doc/2/controllers/index/m-delete/snippets/mDelete.go b/.doc/3/controllers/index/m-delete/snippets/mDelete.go similarity index 100% rename from .doc/2/controllers/index/m-delete/snippets/mDelete.go rename to .doc/3/controllers/index/m-delete/snippets/mDelete.go diff --git a/.doc/2/controllers/index/m-delete/snippets/mDelete.test.yml b/.doc/3/controllers/index/m-delete/snippets/mDelete.test.yml similarity index 53% rename from .doc/2/controllers/index/m-delete/snippets/mDelete.test.yml rename to .doc/3/controllers/index/m-delete/snippets/mDelete.test.yml index 9a364e19..08dd5ca8 100644 --- a/.doc/2/controllers/index/m-delete/snippets/mDelete.test.yml +++ b/.doc/3/controllers/index/m-delete/snippets/mDelete.test.yml @@ -2,10 +2,12 @@ name: index#mDelete description: Delete multiple indexes hooks: - before: curl -X POST kuzzle:7512/nyc-open-data/_create ; curl -X POST kuzzle:7512/mtp-open-data/_create + before: | + curl -X POST kuzzle:7512/nyc-open-data/_create + curl -X POST kuzzle:7512/mtp-open-data/_create after: template: default expected: Successfully deleted 2 indexes sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/count/index.md b/.doc/3/controllers/realtime/count/index.md similarity index 100% rename from .doc/2/controllers/realtime/count/index.md rename to .doc/3/controllers/realtime/count/index.md diff --git a/.doc/2/controllers/realtime/count/snippets/count.go b/.doc/3/controllers/realtime/count/snippets/count.go similarity index 100% rename from .doc/2/controllers/realtime/count/snippets/count.go rename to .doc/3/controllers/realtime/count/snippets/count.go diff --git a/.doc/2/controllers/realtime/count/snippets/count.test.yml b/.doc/3/controllers/realtime/count/snippets/count.test.yml similarity index 93% rename from .doc/2/controllers/realtime/count/snippets/count.test.yml rename to .doc/3/controllers/realtime/count/snippets/count.test.yml index ee607191..04af999d 100644 --- a/.doc/2/controllers/realtime/count/snippets/count.test.yml +++ b/.doc/3/controllers/realtime/count/snippets/count.test.yml @@ -7,4 +7,4 @@ template: default expected: Currently 1 active subscription sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/index.md b/.doc/3/controllers/realtime/index.md similarity index 100% rename from .doc/2/controllers/realtime/index.md rename to .doc/3/controllers/realtime/index.md diff --git a/.doc/2/controllers/realtime/publish/index.md b/.doc/3/controllers/realtime/publish/index.md similarity index 100% rename from .doc/2/controllers/realtime/publish/index.md rename to .doc/3/controllers/realtime/publish/index.md diff --git a/.doc/2/controllers/realtime/publish/snippets/publish.go b/.doc/3/controllers/realtime/publish/snippets/publish.go similarity index 100% rename from .doc/2/controllers/realtime/publish/snippets/publish.go rename to .doc/3/controllers/realtime/publish/snippets/publish.go diff --git a/.doc/2/controllers/realtime/publish/snippets/publish.test.yml b/.doc/3/controllers/realtime/publish/snippets/publish.test.yml similarity index 92% rename from .doc/2/controllers/realtime/publish/snippets/publish.test.yml rename to .doc/3/controllers/realtime/publish/snippets/publish.test.yml index 41722359..99f209fd 100644 --- a/.doc/2/controllers/realtime/publish/snippets/publish.test.yml +++ b/.doc/3/controllers/realtime/publish/snippets/publish.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/subscribe/index.md b/.doc/3/controllers/realtime/subscribe/index.md similarity index 91% rename from .doc/2/controllers/realtime/subscribe/index.md rename to .doc/3/controllers/realtime/subscribe/index.md index 02e57073..963aaee4 100644 --- a/.doc/2/controllers/realtime/subscribe/index.md +++ b/.doc/3/controllers/realtime/subscribe/index.md @@ -7,7 +7,7 @@ description: Subscribes to real-time notifications # Subscribe -Subscribes by providing a set of filters: messages, document changes and, optionally, user events matching the provided filters will generate [real-time notifications](/core/1/api/essentials/notifications), sent to you in real-time by Kuzzle. +Subscribes by providing a set of filters: messages, document changes and, optionally, user events matching the provided filters will generate [real-time notifications](/core/2/api/payloads/notifications), sent to you in real-time by Kuzzle. ## Arguments @@ -27,13 +27,13 @@ func (r *Realtime) Subscribe( | ------------ | ------------------------------------------ | --------------------------------------------------------------- | | `index` |
string
| Index name | | `collection` |
string
| Collection name | -| `filters` |
json.RawMessage
| A set of filters following [Koncorde syntax](/core/1/guides/cookbooks/realtime-api) | +| `filters` |
json.RawMessage
| A set of filters following [Koncorde syntax](/core/2/api/koncorde-filters-syntax) | | `listener` |
chan<- types.NotificationResult
| Channel receiving the notification | | `options` |
types.RoomOptions
| A struct containing subscription options | ### listener -A channel for [types.NotificationResult](/sdk/go/1/essentials/realtime-notifications) objects. +A channel for [types.NotificationResult](/sdk/go/3/essentials/realtime-notifications) objects. The channel will receive an object each time a new notifications is received. ### options @@ -45,7 +45,7 @@ Additional subscription options. | `scope` |
string

(`all`) | Subscribe to document entering or leaving the scope
Possible values: `all`, `in`, `out`, `none` | | `users` |
string

(`none`) | Subscribe to users entering or leaving the room
Possible values: `all`, `in`, `out`, `none` | | `subscribeToSelf` |
bool

(`true`) | Subscribe to notifications fired by our own queries | -| `volatile` |
json.RawMessage

(`{}`) | subscription information, used in [user join/leave notifications](/core/1/api/essentials/volatile-data) | +| `volatile` |
json.RawMessage

(`{}`) | subscription information, used in [user join/leave notifications](/core/2/guides/main-concepts/api#volatile-data) | ## Return diff --git a/.doc/2/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.go b/.doc/3/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.go similarity index 100% rename from .doc/2/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.go rename to .doc/3/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.go diff --git a/.doc/2/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.test.yml b/.doc/3/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.test.yml similarity index 97% rename from .doc/2/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.test.yml rename to .doc/3/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.test.yml index 0d145198..eb142af9 100644 --- a/.doc/2/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.test.yml +++ b/.doc/3/controllers/realtime/subscribe/snippets/document-notifications-leave-scope.test.yml @@ -7,4 +7,4 @@ template: realtime expected: Document moved out from the scope sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/subscribe/snippets/document-notifications.go b/.doc/3/controllers/realtime/subscribe/snippets/document-notifications.go similarity index 100% rename from .doc/2/controllers/realtime/subscribe/snippets/document-notifications.go rename to .doc/3/controllers/realtime/subscribe/snippets/document-notifications.go diff --git a/.doc/2/controllers/realtime/subscribe/snippets/document-notifications.test.yml b/.doc/3/controllers/realtime/subscribe/snippets/document-notifications.test.yml similarity index 97% rename from .doc/2/controllers/realtime/subscribe/snippets/document-notifications.test.yml rename to .doc/3/controllers/realtime/subscribe/snippets/document-notifications.test.yml index 825a7f3e..6c013997 100644 --- a/.doc/2/controllers/realtime/subscribe/snippets/document-notifications.test.yml +++ b/.doc/3/controllers/realtime/subscribe/snippets/document-notifications.test.yml @@ -7,4 +7,4 @@ template: realtime expected: Document nina-vkote enter the scope sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/subscribe/snippets/message-notifications.go b/.doc/3/controllers/realtime/subscribe/snippets/message-notifications.go similarity index 100% rename from .doc/2/controllers/realtime/subscribe/snippets/message-notifications.go rename to .doc/3/controllers/realtime/subscribe/snippets/message-notifications.go diff --git a/.doc/2/controllers/realtime/subscribe/snippets/message-notifications.test.yml b/.doc/3/controllers/realtime/subscribe/snippets/message-notifications.test.yml similarity index 94% rename from .doc/2/controllers/realtime/subscribe/snippets/message-notifications.test.yml rename to .doc/3/controllers/realtime/subscribe/snippets/message-notifications.test.yml index 80761808..1e8973ce 100644 --- a/.doc/2/controllers/realtime/subscribe/snippets/message-notifications.test.yml +++ b/.doc/3/controllers/realtime/subscribe/snippets/message-notifications.test.yml @@ -7,4 +7,4 @@ template: realtime expected: Message notification received sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/subscribe/snippets/user-notifications.go b/.doc/3/controllers/realtime/subscribe/snippets/user-notifications.go similarity index 95% rename from .doc/2/controllers/realtime/subscribe/snippets/user-notifications.go rename to .doc/3/controllers/realtime/subscribe/snippets/user-notifications.go index 3f75da7f..80d39855 100644 --- a/.doc/2/controllers/realtime/subscribe/snippets/user-notifications.go +++ b/.doc/3/controllers/realtime/subscribe/snippets/user-notifications.go @@ -8,7 +8,7 @@ go func() { if notification.Type == "user" { fmt.Printf("Volatile data: %s\n", notification.Volatile) - // Volatile data: {"sdkVersion":"1.0.0","username":"nina vkote"} + // Volatile data: {"sdkName":"go@1.0.0","username":"nina vkote"} fmt.Printf("Currently %d users in the room\n", notification.Result.Count) } }() diff --git a/.doc/2/controllers/realtime/subscribe/snippets/user-notifications.test.yml b/.doc/3/controllers/realtime/subscribe/snippets/user-notifications.test.yml similarity index 96% rename from .doc/2/controllers/realtime/subscribe/snippets/user-notifications.test.yml rename to .doc/3/controllers/realtime/subscribe/snippets/user-notifications.test.yml index ef150d53..4d5b48f6 100644 --- a/.doc/2/controllers/realtime/subscribe/snippets/user-notifications.test.yml +++ b/.doc/3/controllers/realtime/subscribe/snippets/user-notifications.test.yml @@ -6,4 +6,4 @@ hooks: template: realtime expected: "\"username\":\"nina vkote\"" sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/realtime/unsubscribe/index.md b/.doc/3/controllers/realtime/unsubscribe/index.md similarity index 100% rename from .doc/2/controllers/realtime/unsubscribe/index.md rename to .doc/3/controllers/realtime/unsubscribe/index.md diff --git a/.doc/2/controllers/realtime/unsubscribe/snippets/unsubscribe.go b/.doc/3/controllers/realtime/unsubscribe/snippets/unsubscribe.go similarity index 100% rename from .doc/2/controllers/realtime/unsubscribe/snippets/unsubscribe.go rename to .doc/3/controllers/realtime/unsubscribe/snippets/unsubscribe.go diff --git a/.doc/2/controllers/realtime/unsubscribe/snippets/unsubscribe.test.yml b/.doc/3/controllers/realtime/unsubscribe/snippets/unsubscribe.test.yml similarity index 92% rename from .doc/2/controllers/realtime/unsubscribe/snippets/unsubscribe.test.yml rename to .doc/3/controllers/realtime/unsubscribe/snippets/unsubscribe.test.yml index 7e41bce4..ae570bbf 100644 --- a/.doc/2/controllers/realtime/unsubscribe/snippets/unsubscribe.test.yml +++ b/.doc/3/controllers/realtime/unsubscribe/snippets/unsubscribe.test.yml @@ -7,4 +7,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/server/admin-exists/index.md b/.doc/3/controllers/server/admin-exists/index.md similarity index 96% rename from .doc/2/controllers/server/admin-exists/index.md rename to .doc/3/controllers/server/admin-exists/index.md index 7347234d..950e60dd 100644 --- a/.doc/2/controllers/server/admin-exists/index.md +++ b/.doc/3/controllers/server/admin-exists/index.md @@ -29,7 +29,7 @@ Additional query options ## Return -Returns a `bool` set to `true` if an admin exists and `false` if it does not, or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns a `bool` set to `true` if an admin exists and `false` if it does not, or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Usage diff --git a/.doc/2/controllers/server/admin-exists/snippets/admin-exists.go b/.doc/3/controllers/server/admin-exists/snippets/admin-exists.go similarity index 100% rename from .doc/2/controllers/server/admin-exists/snippets/admin-exists.go rename to .doc/3/controllers/server/admin-exists/snippets/admin-exists.go diff --git a/.doc/2/controllers/server/admin-exists/snippets/admin-exists.test.yml b/.doc/3/controllers/server/admin-exists/snippets/admin-exists.test.yml similarity index 94% rename from .doc/2/controllers/server/admin-exists/snippets/admin-exists.test.yml rename to .doc/3/controllers/server/admin-exists/snippets/admin-exists.test.yml index 712fab93..c2a6b09a 100644 --- a/.doc/2/controllers/server/admin-exists/snippets/admin-exists.test.yml +++ b/.doc/3/controllers/server/admin-exists/snippets/admin-exists.test.yml @@ -7,4 +7,4 @@ template: default expected: ^(Admin exists\?) (true|false)$ sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/server/get-all-stats/index.md b/.doc/3/controllers/server/get-all-stats/index.md similarity index 95% rename from .doc/2/controllers/server/get-all-stats/index.md rename to .doc/3/controllers/server/get-all-stats/index.md index e1607f46..208aadab 100644 --- a/.doc/2/controllers/server/get-all-stats/index.md +++ b/.doc/3/controllers/server/get-all-stats/index.md @@ -37,7 +37,7 @@ Additional query options ## Return -Returns all stored internal statistic snapshots as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns all stored internal statistic snapshots as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Usage diff --git a/.doc/3/controllers/server/get-all-stats/snippets/get-all-stats.go b/.doc/3/controllers/server/get-all-stats/snippets/get-all-stats.go new file mode 100644 index 00000000..9589516f --- /dev/null +++ b/.doc/3/controllers/server/get-all-stats/snippets/get-all-stats.go @@ -0,0 +1,7 @@ +_, err := kuzzle.Server.GetAllStats(nil) + +if err != nil { + log.Fatal(err) +} else { + fmt.Println("Success") +} diff --git a/.doc/3/controllers/server/get-all-stats/snippets/get-all-stats.test.yml b/.doc/3/controllers/server/get-all-stats/snippets/get-all-stats.test.yml new file mode 100644 index 00000000..98d9f8f8 --- /dev/null +++ b/.doc/3/controllers/server/get-all-stats/snippets/get-all-stats.test.yml @@ -0,0 +1,10 @@ +name: server#getAllStats +description: Gets all stored internal statistic snapshots. +hooks: + before: + after: +template: default +expected: Success + +sdk: go +version: 3 diff --git a/.doc/2/controllers/server/get-config/index.md b/.doc/3/controllers/server/get-config/index.md similarity index 94% rename from .doc/2/controllers/server/get-config/index.md rename to .doc/3/controllers/server/get-config/index.md index 40a8508c..31dbc8d9 100644 --- a/.doc/2/controllers/server/get-config/index.md +++ b/.doc/3/controllers/server/get-config/index.md @@ -33,7 +33,7 @@ Additional query options ## Return -Returns server configuration as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns server configuration as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Usage diff --git a/.doc/2/controllers/server/get-config/snippets/get-config.go b/.doc/3/controllers/server/get-config/snippets/get-config.go similarity index 100% rename from .doc/2/controllers/server/get-config/snippets/get-config.go rename to .doc/3/controllers/server/get-config/snippets/get-config.go diff --git a/.doc/2/controllers/server/get-config/snippets/get-config.test.yml b/.doc/3/controllers/server/get-config/snippets/get-config.test.yml similarity index 64% rename from .doc/2/controllers/server/get-config/snippets/get-config.test.yml rename to .doc/3/controllers/server/get-config/snippets/get-config.test.yml index 66aa0958..47ba4a7d 100644 --- a/.doc/2/controllers/server/get-config/snippets/get-config.test.yml +++ b/.doc/3/controllers/server/get-config/snippets/get-config.test.yml @@ -4,7 +4,6 @@ hooks: before: after: template: default -expected: ^(Kuzzle Server configuration as JSON string:) - +expected: ^(Kuzzle Server configuration as JSON string:) .*$ sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/server/get-last-stats/index.md b/.doc/3/controllers/server/get-last-stats/index.md similarity index 95% rename from .doc/2/controllers/server/get-last-stats/index.md rename to .doc/3/controllers/server/get-last-stats/index.md index aefb8b4c..669f6dce 100644 --- a/.doc/2/controllers/server/get-last-stats/index.md +++ b/.doc/3/controllers/server/get-last-stats/index.md @@ -37,7 +37,7 @@ Additional query options ## Return -Returns the most recent statistics snapshot as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns the most recent statistics snapshot as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Return diff --git a/.doc/2/controllers/server/get-last-stats/snippets/get-last-stats.go b/.doc/3/controllers/server/get-last-stats/snippets/get-last-stats.go similarity index 100% rename from .doc/2/controllers/server/get-last-stats/snippets/get-last-stats.go rename to .doc/3/controllers/server/get-last-stats/snippets/get-last-stats.go diff --git a/.doc/2/controllers/server/get-last-stats/snippets/get-last-stats.test.yml b/.doc/3/controllers/server/get-last-stats/snippets/get-last-stats.test.yml similarity index 68% rename from .doc/2/controllers/server/get-last-stats/snippets/get-last-stats.test.yml rename to .doc/3/controllers/server/get-last-stats/snippets/get-last-stats.test.yml index 0ae319da..24ca30a0 100644 --- a/.doc/2/controllers/server/get-last-stats/snippets/get-last-stats.test.yml +++ b/.doc/3/controllers/server/get-last-stats/snippets/get-last-stats.test.yml @@ -4,7 +4,7 @@ hooks: before: after: template: default -expected: ^(Last Kuzzle Stats as JSON string:) +expected: ^(Last Kuzzle Stats as JSON string:) {.*}$ sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/server/get-stats/index.md b/.doc/3/controllers/server/get-stats/index.md similarity index 98% rename from .doc/2/controllers/server/get-stats/index.md rename to .doc/3/controllers/server/get-stats/index.md index 368e8096..459a556a 100644 --- a/.doc/2/controllers/server/get-stats/index.md +++ b/.doc/3/controllers/server/get-stats/index.md @@ -43,7 +43,7 @@ Additional query options ## Return -Returns snapshots within the provided timestamp range as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns snapshots within the provided timestamp range as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Usage diff --git a/.doc/2/controllers/server/get-stats/snippets/get-stats.go b/.doc/3/controllers/server/get-stats/snippets/get-stats.go similarity index 100% rename from .doc/2/controllers/server/get-stats/snippets/get-stats.go rename to .doc/3/controllers/server/get-stats/snippets/get-stats.go diff --git a/.doc/2/controllers/server/get-stats/snippets/get-stats.test.yml b/.doc/3/controllers/server/get-stats/snippets/get-stats.test.yml similarity index 64% rename from .doc/2/controllers/server/get-stats/snippets/get-stats.test.yml rename to .doc/3/controllers/server/get-stats/snippets/get-stats.test.yml index 65b871c2..cf5fb3e7 100644 --- a/.doc/2/controllers/server/get-stats/snippets/get-stats.test.yml +++ b/.doc/3/controllers/server/get-stats/snippets/get-stats.test.yml @@ -4,7 +4,7 @@ hooks: before: after: template: default -expected: ^(Kuzzle Stats as JSON string:) +expected: ^(Kuzzle Stats as JSON string:) {"hits":\[.*],"total":[0-9]+}$ sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/server/index.md b/.doc/3/controllers/server/index.md similarity index 100% rename from .doc/2/controllers/server/index.md rename to .doc/3/controllers/server/index.md diff --git a/.doc/2/controllers/server/info/index.md b/.doc/3/controllers/server/info/index.md similarity index 94% rename from .doc/2/controllers/server/info/index.md rename to .doc/3/controllers/server/info/index.md index 5251992e..933c3571 100644 --- a/.doc/2/controllers/server/info/index.md +++ b/.doc/3/controllers/server/info/index.md @@ -29,7 +29,7 @@ Additional query options ## Return -Returns server informations as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns server informations as a `json.RawMessage` or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Usage diff --git a/.doc/2/controllers/server/info/snippets/info.go b/.doc/3/controllers/server/info/snippets/info.go similarity index 100% rename from .doc/2/controllers/server/info/snippets/info.go rename to .doc/3/controllers/server/info/snippets/info.go diff --git a/.doc/2/controllers/server/info/snippets/info.test.yml b/.doc/3/controllers/server/info/snippets/info.test.yml similarity index 60% rename from .doc/2/controllers/server/info/snippets/info.test.yml rename to .doc/3/controllers/server/info/snippets/info.test.yml index 6f0951bd..169767be 100644 --- a/.doc/2/controllers/server/info/snippets/info.test.yml +++ b/.doc/3/controllers/server/info/snippets/info.test.yml @@ -4,7 +4,6 @@ hooks: before: after: template: default -expected: ^(Kuzzle Server information as JSON string:) - +expected: 'Kuzzle Server information as JSON string: {"serverInfo":{"kuzzle":{.*}}}' sdk: go -version: 1 +version: 3 diff --git a/.doc/2/controllers/server/now/index.md b/.doc/3/controllers/server/now/index.md similarity index 93% rename from .doc/2/controllers/server/now/index.md rename to .doc/3/controllers/server/now/index.md index a26d45f3..6003af05 100644 --- a/.doc/2/controllers/server/now/index.md +++ b/.doc/3/controllers/server/now/index.md @@ -29,7 +29,7 @@ Additional query options ## Return -Returns current server timestamp as `int64` or a `KuzzleError`. See how to [handle error](/sdk/go/1/essentials/error-handling). +Returns current server timestamp as `int64` or a `KuzzleError`. See how to [handle error](/sdk/go/3/essentials/error-handling). ## Usage diff --git a/.doc/2/controllers/server/now/snippets/now.go b/.doc/3/controllers/server/now/snippets/now.go similarity index 100% rename from .doc/2/controllers/server/now/snippets/now.go rename to .doc/3/controllers/server/now/snippets/now.go diff --git a/.doc/2/controllers/server/now/snippets/now.test.yml b/.doc/3/controllers/server/now/snippets/now.test.yml similarity index 94% rename from .doc/2/controllers/server/now/snippets/now.test.yml rename to .doc/3/controllers/server/now/snippets/now.test.yml index f61df8d2..f373cd7a 100644 --- a/.doc/2/controllers/server/now/snippets/now.test.yml +++ b/.doc/3/controllers/server/now/snippets/now.test.yml @@ -7,4 +7,4 @@ template: default expected: ^(Epoch-millis timestamp:) [0-9]{13}$ sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/index.md b/.doc/3/core-structs/index.md similarity index 100% rename from .doc/2/core-structs/index.md rename to .doc/3/core-structs/index.md diff --git a/.doc/2/core-structs/kuzzle-event-emitter/add-listener/index.md b/.doc/3/core-structs/kuzzle-event-emitter/add-listener/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/add-listener/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/add-listener/index.md diff --git a/.doc/2/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.go b/.doc/3/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.go similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.go rename to .doc/3/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.go diff --git a/.doc/2/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.test.yml b/.doc/3/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.test.yml similarity index 94% rename from .doc/2/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.test.yml rename to .doc/3/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.test.yml index a4fd843c..947f3431 100644 --- a/.doc/2/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.test.yml +++ b/.doc/3/core-structs/kuzzle-event-emitter/add-listener/snippets/add-listener.test.yml @@ -6,4 +6,4 @@ hooks: template: before-connect expected: "Connected to Kuzzle" sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle-event-emitter/index.md b/.doc/3/core-structs/kuzzle-event-emitter/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/index.md diff --git a/.doc/2/core-structs/kuzzle-event-emitter/introduction/index.md b/.doc/3/core-structs/kuzzle-event-emitter/introduction/index.md similarity index 76% rename from .doc/2/core-structs/kuzzle-event-emitter/introduction/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/introduction/index.md index 775020c6..ca44173c 100644 --- a/.doc/2/core-structs/kuzzle-event-emitter/introduction/index.md +++ b/.doc/3/core-structs/kuzzle-event-emitter/introduction/index.md @@ -10,4 +10,4 @@ order: 0 An interface standardizing the listening of events. -The [Kuzzle](/sdk/go/1/core-structs/kuzzle) class implements the `KuzzleEventEmitter` interface. +The [Kuzzle](/sdk/go/3/core-structs/kuzzle) class implements the `KuzzleEventEmitter` interface. diff --git a/.doc/2/interfaces/protocol/on/index.md b/.doc/3/core-structs/kuzzle-event-emitter/on/index.md similarity index 61% rename from .doc/2/interfaces/protocol/on/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/on/index.md index 7a1e47cd..c4d9c98f 100644 --- a/.doc/2/interfaces/protocol/on/index.md +++ b/.doc/3/core-structs/kuzzle-event-emitter/on/index.md @@ -7,4 +7,4 @@ description: Alias for addListener # On -Alias for [AddListener](/sdk/go/1/core-structs/kuzzle-event-emitter/add-listener). +Alias for [AddListener](/sdk/go/3/core-structs/kuzzle-event-emitter/add-listener). diff --git a/.doc/2/core-structs/kuzzle-event-emitter/once/index.md b/.doc/3/core-structs/kuzzle-event-emitter/once/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/once/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/once/index.md diff --git a/.doc/2/core-structs/kuzzle-event-emitter/once/snippets/once.go b/.doc/3/core-structs/kuzzle-event-emitter/once/snippets/once.go similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/once/snippets/once.go rename to .doc/3/core-structs/kuzzle-event-emitter/once/snippets/once.go diff --git a/.doc/2/core-structs/kuzzle-event-emitter/once/snippets/once.test.yml b/.doc/3/core-structs/kuzzle-event-emitter/once/snippets/once.test.yml similarity index 94% rename from .doc/2/core-structs/kuzzle-event-emitter/once/snippets/once.test.yml rename to .doc/3/core-structs/kuzzle-event-emitter/once/snippets/once.test.yml index 42720913..8184ed7c 100644 --- a/.doc/2/core-structs/kuzzle-event-emitter/once/snippets/once.test.yml +++ b/.doc/3/core-structs/kuzzle-event-emitter/once/snippets/once.test.yml @@ -6,4 +6,4 @@ hooks: template: before-connect expected: "Connected to Kuzzle" sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/index.md b/.doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/index.md diff --git a/.doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.go b/.doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.go similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.go rename to .doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.go diff --git a/.doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.test.yml b/.doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.test.yml similarity index 94% rename from .doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.test.yml rename to .doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.test.yml index 2d86f178..afd81dd3 100644 --- a/.doc/2/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.test.yml +++ b/.doc/3/core-structs/kuzzle-event-emitter/remove-all-listener/snippets/remove-all-listeners.test.yml @@ -6,4 +6,4 @@ hooks: template: before-connect expected: Stopped listening sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle-event-emitter/remove-listener/index.md b/.doc/3/core-structs/kuzzle-event-emitter/remove-listener/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/remove-listener/index.md rename to .doc/3/core-structs/kuzzle-event-emitter/remove-listener/index.md diff --git a/.doc/2/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.go b/.doc/3/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.go similarity index 100% rename from .doc/2/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.go rename to .doc/3/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.go diff --git a/.doc/2/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.test.yml b/.doc/3/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.test.yml similarity index 94% rename from .doc/2/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.test.yml rename to .doc/3/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.test.yml index bb4be75d..5585e223 100644 --- a/.doc/2/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.test.yml +++ b/.doc/3/core-structs/kuzzle-event-emitter/remove-listener/snippets/remove-listener.test.yml @@ -6,4 +6,4 @@ hooks: template: before-connect expected: Stopped listening sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/connect/index.md b/.doc/3/core-structs/kuzzle/connect/index.md similarity index 75% rename from .doc/2/core-structs/kuzzle/connect/index.md rename to .doc/3/core-structs/kuzzle/connect/index.md index 400c48fd..10ada0d6 100644 --- a/.doc/2/core-structs/kuzzle/connect/index.md +++ b/.doc/3/core-structs/kuzzle/connect/index.md @@ -7,7 +7,7 @@ description: Connects the SDK to Kuzzle # Connect -Connects to Kuzzle using the `host` argument provided to the `connection.Connection` (see [Kuzzle constructor](/sdk/go/1/core-structs/kuzzle/constructor#usage-go)). +Connects to Kuzzle using the `host` argument provided to the `connection.Connection` (see [Kuzzle constructor](/sdk/go/3/core-structs/kuzzle/constructor#usage-go)). Subsequent call have no effect if the SDK is already connected. ## Arguments @@ -18,7 +18,7 @@ Connect() error ## Return -Return a [Kuzzle error](/sdk/go/1/essentials/error-handling) if the SDK can not connect to Kuzzle. +Return a [Kuzzle error](/sdk/go/3/essentials/error-handling) if the SDK can not connect to Kuzzle. ## Usage diff --git a/.doc/2/core-structs/kuzzle/connect/snippets/connect.go b/.doc/3/core-structs/kuzzle/connect/snippets/connect.go similarity index 100% rename from .doc/2/core-structs/kuzzle/connect/snippets/connect.go rename to .doc/3/core-structs/kuzzle/connect/snippets/connect.go diff --git a/.doc/2/core-structs/kuzzle/connect/snippets/connect.test.yml b/.doc/3/core-structs/kuzzle/connect/snippets/connect.test.yml similarity index 93% rename from .doc/2/core-structs/kuzzle/connect/snippets/connect.test.yml rename to .doc/3/core-structs/kuzzle/connect/snippets/connect.test.yml index edbe1c44..8cf38de6 100644 --- a/.doc/2/core-structs/kuzzle/connect/snippets/connect.test.yml +++ b/.doc/3/core-structs/kuzzle/connect/snippets/connect.test.yml @@ -8,4 +8,4 @@ template: without-connect expected: Successfully connected sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/constructor/index.md b/.doc/3/core-structs/kuzzle/constructor/index.md similarity index 96% rename from .doc/2/core-structs/kuzzle/constructor/index.md rename to .doc/3/core-structs/kuzzle/constructor/index.md index a9954930..152f8f3b 100644 --- a/.doc/2/core-structs/kuzzle/constructor/index.md +++ b/.doc/3/core-structs/kuzzle/constructor/index.md @@ -11,7 +11,7 @@ order: 100 This is the main entry point to communicate with Kuzzle. Each instance represents a connection to Kuzzle with specific options. -This interface implements the [KuzzleEventEmitter](/sdk/go/1/core-structs/kuzzle-event-emitter) interface +This interface implements the [KuzzleEventEmitter](/sdk/go/3/core-structs/kuzzle-event-emitter) interface ## Arguments @@ -25,7 +25,7 @@ NewKuzzle(protocol protocol.Protocol) (*Kuzzle, error) ### **protocol** -A [Protocol](/sdk/go/1/protocols) is a structure implementing the `protocol.Protocol` interface. +A [Protocol](/sdk/go/3/interfaces/protocol/add-listener) is a structure implementing the `protocol.Protocol` interface. The available protocols are: - `websocket.Websocket` @@ -83,7 +83,7 @@ For example, you can read the `volatile` property via `getVolatile()` and set it **Notes:** - multiple methods allow passing specific `volatile` data. These `volatile` data will be merged with the global Kuzzle `volatile` object when sending the request, with the request specific `volatile` taking priority over the global ones. -- the `queueFilter` property is a function taking a `QueryObject` as an argument. This object is the request sent to Kuzzle, following the [Kuzzle API](/core/1/api/essentials/query-syntax) format +- the `queueFilter` property is a function taking a `QueryObject` as an argument. This object is the request sent to Kuzzle, following the [Kuzzle API](/core/2/guides/main-concepts/querying) format - if `queueTTL` is set to `0`, requests are kept indefinitely - The offline buffer acts like a first-in first-out (FIFO) queue, meaning that if the `queueMaxSize` limit is reached, older requests are discarded to make room for new requests - if `queueMaxSize` is set to `0`, an unlimited number of requests is kept until the buffer is flushed @@ -92,7 +92,7 @@ For example, you can read the `volatile` property via `getVolatile()` and set it ## Return -A `Kuzzle` struct and an [error struct](/sdk/go/1/essentials/error-handling). +A `Kuzzle` struct and an [error struct](/sdk/go/3/essentials/error-handling). The `error` struct is nil if everything was ok. ## Usage diff --git a/.doc/2/core-structs/kuzzle/constructor/snippets/constructor.go b/.doc/3/core-structs/kuzzle/constructor/snippets/constructor.go similarity index 100% rename from .doc/2/core-structs/kuzzle/constructor/snippets/constructor.go rename to .doc/3/core-structs/kuzzle/constructor/snippets/constructor.go diff --git a/.doc/2/core-structs/kuzzle/constructor/snippets/constructor.test.yml b/.doc/3/core-structs/kuzzle/constructor/snippets/constructor.test.yml similarity index 93% rename from .doc/2/core-structs/kuzzle/constructor/snippets/constructor.test.yml rename to .doc/3/core-structs/kuzzle/constructor/snippets/constructor.test.yml index 13d9a79a..28a8c460 100644 --- a/.doc/2/core-structs/kuzzle/constructor/snippets/constructor.test.yml +++ b/.doc/3/core-structs/kuzzle/constructor/snippets/constructor.test.yml @@ -8,4 +8,4 @@ template: blank expected: Everything is ok sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/disconnect/index.md b/.doc/3/core-structs/kuzzle/disconnect/index.md similarity index 86% rename from .doc/2/core-structs/kuzzle/disconnect/index.md rename to .doc/3/core-structs/kuzzle/disconnect/index.md index f07c349c..cb85700b 100644 --- a/.doc/2/core-structs/kuzzle/disconnect/index.md +++ b/.doc/3/core-structs/kuzzle/disconnect/index.md @@ -19,7 +19,7 @@ Disconnect() error ## Return -Return a [Kuzzle error](/sdk/go/1/essentials/error-handling) if the connection can't be closed. +Return a [Kuzzle error](/sdk/go/3/essentials/error-handling) if the connection can't be closed. ## Usage diff --git a/.doc/2/core-structs/kuzzle/disconnect/snippets/disconnect.go b/.doc/3/core-structs/kuzzle/disconnect/snippets/disconnect.go similarity index 100% rename from .doc/2/core-structs/kuzzle/disconnect/snippets/disconnect.go rename to .doc/3/core-structs/kuzzle/disconnect/snippets/disconnect.go diff --git a/.doc/2/core-structs/kuzzle/disconnect/snippets/disconnect.test.yml b/.doc/3/core-structs/kuzzle/disconnect/snippets/disconnect.test.yml similarity index 92% rename from .doc/2/core-structs/kuzzle/disconnect/snippets/disconnect.test.yml rename to .doc/3/core-structs/kuzzle/disconnect/snippets/disconnect.test.yml index 83c43ab1..277a578e 100644 --- a/.doc/2/core-structs/kuzzle/disconnect/snippets/disconnect.test.yml +++ b/.doc/3/core-structs/kuzzle/disconnect/snippets/disconnect.test.yml @@ -8,4 +8,4 @@ template: default expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/flush-queue/index.md b/.doc/3/core-structs/kuzzle/flush-queue/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle/flush-queue/index.md rename to .doc/3/core-structs/kuzzle/flush-queue/index.md diff --git a/.doc/2/core-structs/kuzzle/flush-queue/snippets/flush-queue.go b/.doc/3/core-structs/kuzzle/flush-queue/snippets/flush-queue.go similarity index 100% rename from .doc/2/core-structs/kuzzle/flush-queue/snippets/flush-queue.go rename to .doc/3/core-structs/kuzzle/flush-queue/snippets/flush-queue.go diff --git a/.doc/2/core-structs/kuzzle/flush-queue/snippets/flush-queue.test.yml b/.doc/3/core-structs/kuzzle/flush-queue/snippets/flush-queue.test.yml similarity index 93% rename from .doc/2/core-structs/kuzzle/flush-queue/snippets/flush-queue.test.yml rename to .doc/3/core-structs/kuzzle/flush-queue/snippets/flush-queue.test.yml index 80636c9e..2ea32e8c 100644 --- a/.doc/2/core-structs/kuzzle/flush-queue/snippets/flush-queue.test.yml +++ b/.doc/3/core-structs/kuzzle/flush-queue/snippets/flush-queue.test.yml @@ -8,4 +8,4 @@ template: without-connect expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/index.md b/.doc/3/core-structs/kuzzle/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle/index.md rename to .doc/3/core-structs/kuzzle/index.md diff --git a/.doc/2/core-structs/kuzzle/play-queue/index.md b/.doc/3/core-structs/kuzzle/play-queue/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle/play-queue/index.md rename to .doc/3/core-structs/kuzzle/play-queue/index.md diff --git a/.doc/2/core-structs/kuzzle/play-queue/snippets/play-queue.go b/.doc/3/core-structs/kuzzle/play-queue/snippets/play-queue.go similarity index 100% rename from .doc/2/core-structs/kuzzle/play-queue/snippets/play-queue.go rename to .doc/3/core-structs/kuzzle/play-queue/snippets/play-queue.go diff --git a/.doc/2/core-structs/kuzzle/play-queue/snippets/play-queue.test.yml b/.doc/3/core-structs/kuzzle/play-queue/snippets/play-queue.test.yml similarity index 92% rename from .doc/2/core-structs/kuzzle/play-queue/snippets/play-queue.test.yml rename to .doc/3/core-structs/kuzzle/play-queue/snippets/play-queue.test.yml index b8db0e92..4f7095f0 100644 --- a/.doc/2/core-structs/kuzzle/play-queue/snippets/play-queue.test.yml +++ b/.doc/3/core-structs/kuzzle/play-queue/snippets/play-queue.test.yml @@ -8,4 +8,4 @@ template: without-connect expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/query/index.md b/.doc/3/core-structs/kuzzle/query/index.md similarity index 98% rename from .doc/2/core-structs/kuzzle/query/index.md rename to .doc/3/core-structs/kuzzle/query/index.md index eabd9df6..7f7c5622 100644 --- a/.doc/2/core-structs/kuzzle/query/index.md +++ b/.doc/3/core-structs/kuzzle/query/index.md @@ -7,7 +7,7 @@ description: Base method to send API query to Kuzzle # Query -Base method used to send queries to Kuzzle, following the [API Documentation](/core/1/api). +Base method used to send queries to Kuzzle, following the [API Documentation](/core/2/api). :::warning This is a low-level method, exposed to allow advanced SDK users to bypass high-level methods. diff --git a/.doc/2/core-structs/kuzzle/query/snippets/query.go b/.doc/3/core-structs/kuzzle/query/snippets/query.go similarity index 100% rename from .doc/2/core-structs/kuzzle/query/snippets/query.go rename to .doc/3/core-structs/kuzzle/query/snippets/query.go diff --git a/.doc/2/core-structs/kuzzle/query/snippets/query.test.yml b/.doc/3/core-structs/kuzzle/query/snippets/query.test.yml similarity index 96% rename from .doc/2/core-structs/kuzzle/query/snippets/query.test.yml rename to .doc/3/core-structs/kuzzle/query/snippets/query.test.yml index fbaa696c..1304345a 100644 --- a/.doc/2/core-structs/kuzzle/query/snippets/query.test.yml +++ b/.doc/3/core-structs/kuzzle/query/snippets/query.test.yml @@ -9,4 +9,4 @@ template: default expected: Document created sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/start-queuing/index.md b/.doc/3/core-structs/kuzzle/start-queuing/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle/start-queuing/index.md rename to .doc/3/core-structs/kuzzle/start-queuing/index.md diff --git a/.doc/2/core-structs/kuzzle/start-queuing/snippets/start-queuing.go b/.doc/3/core-structs/kuzzle/start-queuing/snippets/start-queuing.go similarity index 100% rename from .doc/2/core-structs/kuzzle/start-queuing/snippets/start-queuing.go rename to .doc/3/core-structs/kuzzle/start-queuing/snippets/start-queuing.go diff --git a/.doc/2/core-structs/kuzzle/start-queuing/snippets/start-queuing.test.yml b/.doc/3/core-structs/kuzzle/start-queuing/snippets/start-queuing.test.yml similarity index 93% rename from .doc/2/core-structs/kuzzle/start-queuing/snippets/start-queuing.test.yml rename to .doc/3/core-structs/kuzzle/start-queuing/snippets/start-queuing.test.yml index 7e52ab27..40cb8513 100644 --- a/.doc/2/core-structs/kuzzle/start-queuing/snippets/start-queuing.test.yml +++ b/.doc/3/core-structs/kuzzle/start-queuing/snippets/start-queuing.test.yml @@ -8,4 +8,4 @@ template: without-connect expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/kuzzle/stop-queuing/index.md b/.doc/3/core-structs/kuzzle/stop-queuing/index.md similarity index 100% rename from .doc/2/core-structs/kuzzle/stop-queuing/index.md rename to .doc/3/core-structs/kuzzle/stop-queuing/index.md diff --git a/.doc/2/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.go b/.doc/3/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.go similarity index 100% rename from .doc/2/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.go rename to .doc/3/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.go diff --git a/.doc/2/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.test.yml b/.doc/3/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.test.yml similarity index 93% rename from .doc/2/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.test.yml rename to .doc/3/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.test.yml index ad669afe..123c46d4 100644 --- a/.doc/2/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.test.yml +++ b/.doc/3/core-structs/kuzzle/stop-queuing/snippets/stop-queuing.test.yml @@ -8,4 +8,4 @@ template: without-connect expected: Success sdk: go -version: 1 +version: 3 diff --git a/.doc/2/core-structs/search-result/index.md b/.doc/3/core-structs/search-result/index.md similarity index 98% rename from .doc/2/core-structs/search-result/index.md rename to .doc/3/core-structs/search-result/index.md index 6d3d4c43..43878a77 100644 --- a/.doc/2/core-structs/search-result/index.md +++ b/.doc/3/core-structs/search-result/index.md @@ -8,7 +8,7 @@ order: 600 # SearchResult -When performing a [search](/sdk/go/1/controllers/document/search), Kuzzle returns an `SearchResult` struct, which holds the items matching the given query and allows to drill through next result pages if applicable. +When performing a [search](/sdk/go/3/controllers/document/search), Kuzzle returns an `SearchResult` struct, which holds the items matching the given query and allows to drill through next result pages if applicable. ## Properties diff --git a/.doc/2/core-structs/search-result/snippets/search-result.go b/.doc/3/core-structs/search-result/snippets/search-result.go similarity index 89% rename from .doc/2/core-structs/search-result/snippets/search-result.go rename to .doc/3/core-structs/search-result/snippets/search-result.go index 7f313f35..5b7c16d3 100644 --- a/.doc/2/core-structs/search-result/snippets/search-result.go +++ b/.doc/3/core-structs/search-result/snippets/search-result.go @@ -8,11 +8,11 @@ for i := 5; i < 15; i++ { "category": "limousine" }`), nil) } -kuzzle.Index.Refresh("nyc-open-data", nil) +kuzzle.Collection.Refresh("nyc-open-data", "yellow-taxi", nil) options := types.NewQueryOptions() options.SetScroll("1m") -options.SetSize(2) +options.SetSize(4) response, err := kuzzle.Document.Search("nyc-open-data", "yellow-taxi", json.RawMessage(`{ "query": { diff --git a/.doc/2/core-structs/search-result/snippets/search-result.test.yml b/.doc/3/core-structs/search-result/snippets/search-result.test.yml similarity index 97% rename from .doc/2/core-structs/search-result/snippets/search-result.test.yml rename to .doc/3/core-structs/search-result/snippets/search-result.test.yml index 235290ad..f23db4d7 100644 --- a/.doc/2/core-structs/search-result/snippets/search-result.test.yml +++ b/.doc/3/core-structs/search-result/snippets/search-result.test.yml @@ -10,4 +10,4 @@ hooks: template: default expected: Successfully retrieved 4 documents sdk: go -version: 1 +version: 3 diff --git a/.doc/2/essentials/error-handling/index.md b/.doc/3/essentials/error-handling/index.md similarity index 93% rename from .doc/2/essentials/error-handling/index.md rename to .doc/3/essentials/error-handling/index.md index 3a19330a..085a1d39 100644 --- a/.doc/2/essentials/error-handling/index.md +++ b/.doc/3/essentials/error-handling/index.md @@ -18,7 +18,7 @@ The `KuzzleError` type implements the standard `error` interface, and adds the f | `Status` | int | Status following [HTTP Standards](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) | | `Stack` | string | Error stacktrace (Only in development mode) | -You can find a detailed list of possible errors messages and statuses in the [documentation API](/core/1/api/essentials/errors). +You can find a detailed list of possible errors messages and statuses in the [documentation API](/core/2/api/errors/types). #### Example diff --git a/.doc/2/essentials/error-handling/snippets/error-handling.go b/.doc/3/essentials/error-handling/snippets/error-handling.go similarity index 80% rename from .doc/2/essentials/error-handling/snippets/error-handling.go rename to .doc/3/essentials/error-handling/snippets/error-handling.go index aae0e4e0..c8fb1acc 100644 --- a/.doc/2/essentials/error-handling/snippets/error-handling.go +++ b/.doc/3/essentials/error-handling/snippets/error-handling.go @@ -4,7 +4,7 @@ if err != nil { fmt.Println(err.Error()) // Type assertion of error to KuzzleError - if err.(types.KuzzleError).Status == 400 { + if err.(types.KuzzleError).Status == 412 { fmt.Println("Try with another name!") } } diff --git a/.doc/2/essentials/error-handling/snippets/error-handling.test.yml b/.doc/3/essentials/error-handling/snippets/error-handling.test.yml similarity index 54% rename from .doc/2/essentials/error-handling/snippets/error-handling.test.yml rename to .doc/3/essentials/error-handling/snippets/error-handling.test.yml index 93f469c6..338fd83c 100644 --- a/.doc/2/essentials/error-handling/snippets/error-handling.test.yml +++ b/.doc/3/essentials/error-handling/snippets/error-handling.test.yml @@ -1,10 +1,12 @@ name: essentials#errorHandling description: How to handle SDK errors hooks: - before: curl -X POST kuzzle:7512/nyc-open-data/_create + before: | + curl -X DELETE kuzzle:7512/nyc-open-data + curl -X POST kuzzle:7512/nyc-open-data/_create after: template: default expected: Try with another name! sdk: go -version: 1 +version: 3 diff --git a/.doc/2/essentials/events/index.md b/.doc/3/essentials/events/index.md similarity index 93% rename from .doc/2/essentials/events/index.md rename to .doc/3/essentials/events/index.md index a1658862..7b139675 100644 --- a/.doc/2/essentials/events/index.md +++ b/.doc/3/essentials/events/index.md @@ -8,9 +8,9 @@ order: 100 # Events -An event system allows to be notified when the SDK status changes. These events are issued by the [Kuzzle](/sdk/go/1/core-structs/kuzzle) interface. +An event system allows to be notified when the SDK status changes. These events are issued by the [Kuzzle](/sdk/go/3/core-structs/kuzzle) interface. -The API for interacting with events is described by our [KuzzleEventEmitter](/sdk/go/1/core-structs/kuzzle-event-emitter) interface documentation. +The API for interacting with events is described by our [KuzzleEventEmitter](/sdk/go/3/core-structs/kuzzle-event-emitter) interface documentation. # Emitted Events diff --git a/.doc/2/essentials/getting-started/index.md b/.doc/3/essentials/getting-started/index.md similarity index 80% rename from .doc/2/essentials/getting-started/index.md rename to .doc/3/essentials/getting-started/index.md index 73f5b3e7..67a20b47 100644 --- a/.doc/2/essentials/getting-started/index.md +++ b/.doc/3/essentials/getting-started/index.md @@ -15,7 +15,7 @@ This page shows examples of scripts that **store** documents in Kuzzle, and of s Before proceeding, please make sure your system meets the following requirements: - **Go** version 1.9 or higher ([Go installation instructions](https://golang.org/doc/install)) -- A running Kuzzle server ([Kuzzle installation guide](/core/1/guides/essentials/installing-kuzzle)) +- A running Kuzzle server ([Kuzzle installation guide](core/2/guides/getting-started/run-kuzzle)) ::: ::: info @@ -78,8 +78,8 @@ Connected! New document added to yellow-taxi collection! ``` -You can perform other actions such as [delete](/sdk/go/1/controllers/document/delete), -[replace](/sdk/go/1/controllers/document/replace) or [search](/sdk/go/1/controllers/document/search) documents. There are also other ways to interact with Kuzzle like our [Admin Console](/core/1/guides/essentials/admin-console), the [Kuzzle HTTP API](/core/1/api/essentials/connecting-to-kuzzle) or by using your [own protocol](/core/1/protocols/essentials/getting-started). +You can perform other actions such as [delete](/sdk/go/3/controllers/document/delete), +[replace](/sdk/go/3/controllers/document/replace) or [search](/sdk/go/3/controllers/document/search) documents. There are also other ways to interact with Kuzzle like our [Admin Console](http://console.kuzzle.io), the [Kuzzle HTTP API](/core/2/api/protocols/http) or by using your [own protocol](/core/2/guides/write-protocols/start-writing-protocols). Now you know how to: @@ -112,6 +112,6 @@ Now, you know how to: Now that you're more familiar with the Go SDK, you can dive even deeper to learn how to leverage its full capabilities: - discover what this SDK has to offer by browsing other sections of this documentation -- learn how to use [Koncorde](/core/1/guides/cookbooks/realtime-api) to create incredibly fine-grained and blazing-fast subscriptions -- follow our guide to learn how to perform [basic authentication](/core/1/guides/essentials/user-authentication#local-strategy) -- follow our guide to learn how to [manage users and how to set up fine-grained access control](/core/1/guides/essentials/security) +- learn how to use [Koncorde](/core/2/api/koncorde-filters-syntax) to create incredibly fine-grained and blazing-fast subscriptions +- follow our guide to learn how to perform [basic authentication](/core/2/guides/main-concepts/authentication#local-strategy) +- follow our guide to learn how to [manage users and how to set up fine-grained access control](/core/2/guides/main-concepts/permissions) diff --git a/.doc/2/essentials/getting-started/snippets/document.go b/.doc/3/essentials/getting-started/snippets/document.go similarity index 100% rename from .doc/2/essentials/getting-started/snippets/document.go rename to .doc/3/essentials/getting-started/snippets/document.go diff --git a/.doc/2/essentials/getting-started/snippets/document.test.yml b/.doc/3/essentials/getting-started/snippets/document.test.yml similarity index 96% rename from .doc/2/essentials/getting-started/snippets/document.test.yml rename to .doc/3/essentials/getting-started/snippets/document.test.yml index 950aabfb..634cd8c3 100644 --- a/.doc/2/essentials/getting-started/snippets/document.test.yml +++ b/.doc/3/essentials/getting-started/snippets/document.test.yml @@ -9,5 +9,5 @@ expected: - New document added to the yellow-taxi collection! sdk: go -version: 1 +version: 3 diff --git a/.doc/2/essentials/getting-started/snippets/init.go b/.doc/3/essentials/getting-started/snippets/init.go similarity index 95% rename from .doc/2/essentials/getting-started/snippets/init.go rename to .doc/3/essentials/getting-started/snippets/init.go index 341fa174..55fa78b9 100644 --- a/.doc/2/essentials/getting-started/snippets/init.go +++ b/.doc/3/essentials/getting-started/snippets/init.go @@ -2,14 +2,14 @@ package main import ( "fmt" - "os" "log" + "os" - "github.com/kuzzleio/sdk-go/protocol/websocket" "github.com/kuzzleio/sdk-go/kuzzle" + "github.com/kuzzleio/sdk-go/protocol/websocket" ) -func main() { +func main() { // Creates a WebSocket connection. // Replace "kuzzle" with // your Kuzzle hostname like "localhost" @@ -33,7 +33,7 @@ func main() { } fmt.Println("Index nyc-open-data created!") - // Creates a collection + // Creates a collection if err := kuzzle.Collection.Create( "nyc-open-data", "yellow-taxi", diff --git a/.doc/2/essentials/getting-started/snippets/init.test.yml b/.doc/3/essentials/getting-started/snippets/init.test.yml similarity index 95% rename from .doc/2/essentials/getting-started/snippets/init.test.yml rename to .doc/3/essentials/getting-started/snippets/init.test.yml index b580a726..4f835434 100644 --- a/.doc/2/essentials/getting-started/snippets/init.test.yml +++ b/.doc/3/essentials/getting-started/snippets/init.test.yml @@ -10,5 +10,5 @@ expected: - Collection yellow-taxi created! sdk: go -version: 1 +version: 3 diff --git a/.doc/2/essentials/getting-started/snippets/realtime.go b/.doc/3/essentials/getting-started/snippets/realtime.go similarity index 100% rename from .doc/2/essentials/getting-started/snippets/realtime.go rename to .doc/3/essentials/getting-started/snippets/realtime.go diff --git a/.doc/2/essentials/getting-started/snippets/realtime.test.yml b/.doc/3/essentials/getting-started/snippets/realtime.test.yml similarity index 96% rename from .doc/2/essentials/getting-started/snippets/realtime.test.yml rename to .doc/3/essentials/getting-started/snippets/realtime.test.yml index 0fe5e4db..78f59c1d 100644 --- a/.doc/2/essentials/getting-started/snippets/realtime.test.yml +++ b/.doc/3/essentials/getting-started/snippets/realtime.test.yml @@ -10,5 +10,5 @@ expected: - Driver John born on 1995-11-27 got a B license. sdk: go -version: 1 +version: 3 diff --git a/.doc/2/essentials/index.md b/.doc/3/essentials/index.md similarity index 100% rename from .doc/2/essentials/index.md rename to .doc/3/essentials/index.md diff --git a/.doc/2/essentials/offline-tools/index.md b/.doc/3/essentials/offline-tools/index.md similarity index 100% rename from .doc/2/essentials/offline-tools/index.md rename to .doc/3/essentials/offline-tools/index.md diff --git a/.doc/2/essentials/realtime-notifications/index.md b/.doc/3/essentials/realtime-notifications/index.md similarity index 92% rename from .doc/2/essentials/realtime-notifications/index.md rename to .doc/3/essentials/realtime-notifications/index.md index 980ad07e..cd522a0c 100644 --- a/.doc/2/essentials/realtime-notifications/index.md +++ b/.doc/3/essentials/realtime-notifications/index.md @@ -8,11 +8,11 @@ order: 100 # Notifications -The [Realtime.Subscribe](/sdk/go/1/controllers/realtime/subscribe) method takes a channel for `types.NotificationResult` objects, whose content depend on the type of notification received. +The [Realtime.Subscribe](/sdk/go/3/controllers/realtime/subscribe) method takes a channel for `types.NotificationResult` objects, whose content depend on the type of notification received. ## Document & messages -These notifications represent [documents changes & messages](/core/1/api/essentials/notifications#documents-changes-messages). +These notifications represent [documents changes & messages](/core/2/api/payloads/notifications#document-notification). | Property | Type | Description | | ------------ | -------------------------- | ----------------------------------------------------------------------------------------------------- | @@ -26,7 +26,7 @@ These notifications represent [documents changes & messages](/core/1/api/essenti | `Scope` | string | `in`: document enters (or stays) in the scope
`out`: document leaves the scope | | `Timestamp` | int | Timestamp of the event, in Epoch-millis format | | `Type` | string | `document`: the notification type | -| `Volatile` | json.RawMessage | Request [volatile data](/core/1/api/essentials/volatile-data) | +| `Volatile` | json.RawMessage | Request [volatile data](/core/2/guides/main-concepts/api#volatile-data) | The `Result` property has the following structure for document notifications & messages: @@ -37,7 +37,7 @@ The `Result` property has the following structure for document notifications & m ## User -These notifications represent [user events](/core/1/api/essentials/notifications#user-notification). +These notifications represent [user events](/core/2/api/payloads/notifications#user-notification). | Property | Type | Description | | ------------ | -------------------------- | ----------------------------------------------------------------------------------------------------- | @@ -51,7 +51,7 @@ These notifications represent [user events](/core/1/api/essentials/notifications | `Timestamp` | int | Timestamp of the event, in Epoch-millis format | | `Type` | string | `user`: the notification type | | `User` | string | `in`: a new user has subscribed to the same filters
`out`: a user cancelled a shared subscription | -| `Volatile` | json.RawMessage | Request [volatile data](/core/1/api/essentials/volatile-data) | +| `Volatile` | json.RawMessage | Request [volatile data](/core/2/guides/main-concepts/api#volatile-data) | The `Result` property has the following structure for user events: diff --git a/.doc/3/index.md b/.doc/3/index.md new file mode 100644 index 00000000..00db87ec --- /dev/null +++ b/.doc/3/index.md @@ -0,0 +1,9 @@ +--- +code: false +type: root +order: 1 +title: GOLANG SDK v3.x +description: GOLANG SDK v3.x +--- + + \ No newline at end of file diff --git a/.doc/2/interfaces/index.md b/.doc/3/interfaces/index.md similarity index 100% rename from .doc/2/interfaces/index.md rename to .doc/3/interfaces/index.md diff --git a/.doc/2/interfaces/protocol/add-listener/index.md b/.doc/3/interfaces/protocol/add-listener/index.md similarity index 100% rename from .doc/2/interfaces/protocol/add-listener/index.md rename to .doc/3/interfaces/protocol/add-listener/index.md diff --git a/.doc/2/interfaces/protocol/add-listener/snippets/.keep b/.doc/3/interfaces/protocol/add-listener/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/add-listener/snippets/.keep rename to .doc/3/interfaces/protocol/add-listener/snippets/.keep diff --git a/.doc/2/interfaces/protocol/cancel-subs/index.md b/.doc/3/interfaces/protocol/cancel-subs/index.md similarity index 100% rename from .doc/2/interfaces/protocol/cancel-subs/index.md rename to .doc/3/interfaces/protocol/cancel-subs/index.md diff --git a/.doc/2/interfaces/protocol/cancel-subs/snippets/.keep b/.doc/3/interfaces/protocol/cancel-subs/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/cancel-subs/snippets/.keep rename to .doc/3/interfaces/protocol/cancel-subs/snippets/.keep diff --git a/.doc/2/interfaces/protocol/close/index.md b/.doc/3/interfaces/protocol/close/index.md similarity index 76% rename from .doc/2/interfaces/protocol/close/index.md rename to .doc/3/interfaces/protocol/close/index.md index f035a94e..a41794fe 100644 --- a/.doc/2/interfaces/protocol/close/index.md +++ b/.doc/3/interfaces/protocol/close/index.md @@ -17,4 +17,4 @@ Close() error ## Return -Return a [Kuzzle error](/sdk/go/1/essentials/error-handling) if the SDK can not connect to Kuzzle. \ No newline at end of file +Return a [Kuzzle error](/sdk/go/3/essentials/error-handling) if the SDK can not connect to Kuzzle. \ No newline at end of file diff --git a/.doc/2/interfaces/protocol/close/snippets/.keep b/.doc/3/interfaces/protocol/close/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/close/snippets/.keep rename to .doc/3/interfaces/protocol/close/snippets/.keep diff --git a/.doc/2/interfaces/protocol/connect/index.md b/.doc/3/interfaces/protocol/connect/index.md similarity index 100% rename from .doc/2/interfaces/protocol/connect/index.md rename to .doc/3/interfaces/protocol/connect/index.md diff --git a/.doc/2/interfaces/protocol/connect/snippets/.keep b/.doc/3/interfaces/protocol/connect/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/connect/snippets/.keep rename to .doc/3/interfaces/protocol/connect/snippets/.keep diff --git a/.doc/2/interfaces/protocol/emit-event/index.md b/.doc/3/interfaces/protocol/emit-event/index.md similarity index 100% rename from .doc/2/interfaces/protocol/emit-event/index.md rename to .doc/3/interfaces/protocol/emit-event/index.md diff --git a/.doc/2/interfaces/protocol/emit-event/snippets/.keep b/.doc/3/interfaces/protocol/emit-event/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/emit-event/snippets/.keep rename to .doc/3/interfaces/protocol/emit-event/snippets/.keep diff --git a/.doc/2/interfaces/protocol/host/index.md b/.doc/3/interfaces/protocol/host/index.md similarity index 100% rename from .doc/2/interfaces/protocol/host/index.md rename to .doc/3/interfaces/protocol/host/index.md diff --git a/.doc/2/interfaces/protocol/host/snippets/.keep b/.doc/3/interfaces/protocol/host/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/host/snippets/.keep rename to .doc/3/interfaces/protocol/host/snippets/.keep diff --git a/.doc/2/interfaces/protocol/index.md b/.doc/3/interfaces/protocol/index.md similarity index 100% rename from .doc/2/interfaces/protocol/index.md rename to .doc/3/interfaces/protocol/index.md diff --git a/.doc/2/interfaces/protocol/is-ready/index.md b/.doc/3/interfaces/protocol/is-ready/index.md similarity index 100% rename from .doc/2/interfaces/protocol/is-ready/index.md rename to .doc/3/interfaces/protocol/is-ready/index.md diff --git a/.doc/2/interfaces/protocol/is-ready/snippets/.keep b/.doc/3/interfaces/protocol/is-ready/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/is-ready/snippets/.keep rename to .doc/3/interfaces/protocol/is-ready/snippets/.keep diff --git a/.doc/2/interfaces/protocol/listener-count/index.md b/.doc/3/interfaces/protocol/listener-count/index.md similarity index 100% rename from .doc/2/interfaces/protocol/listener-count/index.md rename to .doc/3/interfaces/protocol/listener-count/index.md diff --git a/.doc/2/interfaces/protocol/listener-count/snippets/.keep b/.doc/3/interfaces/protocol/listener-count/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/listener-count/snippets/.keep rename to .doc/3/interfaces/protocol/listener-count/snippets/.keep diff --git a/.doc/2/core-structs/kuzzle-event-emitter/on/index.md b/.doc/3/interfaces/protocol/on/index.md similarity index 61% rename from .doc/2/core-structs/kuzzle-event-emitter/on/index.md rename to .doc/3/interfaces/protocol/on/index.md index 7a1e47cd..c4d9c98f 100644 --- a/.doc/2/core-structs/kuzzle-event-emitter/on/index.md +++ b/.doc/3/interfaces/protocol/on/index.md @@ -7,4 +7,4 @@ description: Alias for addListener # On -Alias for [AddListener](/sdk/go/1/core-structs/kuzzle-event-emitter/add-listener). +Alias for [AddListener](/sdk/go/3/core-structs/kuzzle-event-emitter/add-listener). diff --git a/.doc/2/interfaces/protocol/once/index.md b/.doc/3/interfaces/protocol/once/index.md similarity index 100% rename from .doc/2/interfaces/protocol/once/index.md rename to .doc/3/interfaces/protocol/once/index.md diff --git a/.doc/2/interfaces/protocol/once/snippets/.keep b/.doc/3/interfaces/protocol/once/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/once/snippets/.keep rename to .doc/3/interfaces/protocol/once/snippets/.keep diff --git a/.doc/2/interfaces/protocol/port/index.md b/.doc/3/interfaces/protocol/port/index.md similarity index 100% rename from .doc/2/interfaces/protocol/port/index.md rename to .doc/3/interfaces/protocol/port/index.md diff --git a/.doc/2/interfaces/protocol/port/snippets/.keep b/.doc/3/interfaces/protocol/port/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/port/snippets/.keep rename to .doc/3/interfaces/protocol/port/snippets/.keep diff --git a/.doc/2/interfaces/protocol/register-sub/index.md b/.doc/3/interfaces/protocol/register-sub/index.md similarity index 100% rename from .doc/2/interfaces/protocol/register-sub/index.md rename to .doc/3/interfaces/protocol/register-sub/index.md diff --git a/.doc/2/interfaces/protocol/register-sub/snippets/.keep b/.doc/3/interfaces/protocol/register-sub/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/register-sub/snippets/.keep rename to .doc/3/interfaces/protocol/register-sub/snippets/.keep diff --git a/.doc/2/interfaces/protocol/remove-all-listeners/index.md b/.doc/3/interfaces/protocol/remove-all-listeners/index.md similarity index 100% rename from .doc/2/interfaces/protocol/remove-all-listeners/index.md rename to .doc/3/interfaces/protocol/remove-all-listeners/index.md diff --git a/.doc/2/interfaces/protocol/remove-all-listeners/snippets/.keep b/.doc/3/interfaces/protocol/remove-all-listeners/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/remove-all-listeners/snippets/.keep rename to .doc/3/interfaces/protocol/remove-all-listeners/snippets/.keep diff --git a/.doc/2/interfaces/protocol/remove-listener/index.md b/.doc/3/interfaces/protocol/remove-listener/index.md similarity index 100% rename from .doc/2/interfaces/protocol/remove-listener/index.md rename to .doc/3/interfaces/protocol/remove-listener/index.md diff --git a/.doc/2/interfaces/protocol/remove-listener/snippets/.keep b/.doc/3/interfaces/protocol/remove-listener/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/remove-listener/snippets/.keep rename to .doc/3/interfaces/protocol/remove-listener/snippets/.keep diff --git a/.doc/2/interfaces/protocol/request-history/index.md b/.doc/3/interfaces/protocol/request-history/index.md similarity index 100% rename from .doc/2/interfaces/protocol/request-history/index.md rename to .doc/3/interfaces/protocol/request-history/index.md diff --git a/.doc/2/interfaces/protocol/request-history/snippets/.keep b/.doc/3/interfaces/protocol/request-history/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/request-history/snippets/.keep rename to .doc/3/interfaces/protocol/request-history/snippets/.keep diff --git a/.doc/2/interfaces/protocol/send/index.md b/.doc/3/interfaces/protocol/send/index.md similarity index 95% rename from .doc/2/interfaces/protocol/send/index.md rename to .doc/3/interfaces/protocol/send/index.md index bb457f93..1fb5b079 100644 --- a/.doc/2/interfaces/protocol/send/index.md +++ b/.doc/3/interfaces/protocol/send/index.md @@ -7,7 +7,7 @@ description: Sends a query to the Kuzzle API # Send -Sends a query to the [Kuzzle API](/core/1/api). +Sends a query to the [Kuzzle API](/core/2/api). ## Signature @@ -56,4 +56,4 @@ This channel will receive a [KuzzleResponse](https://github.com/kuzzleio/sdk-go/ ## Return -Return a [Kuzzle error](/sdk/go/1/essentials/error-handling) if the SDK can not connect to Kuzzle. \ No newline at end of file +Return a [Kuzzle error](/sdk/go/3/essentials/error-handling) if the SDK can not connect to Kuzzle. \ No newline at end of file diff --git a/.doc/2/interfaces/protocol/send/snippets/.keep b/.doc/3/interfaces/protocol/send/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/send/snippets/.keep rename to .doc/3/interfaces/protocol/send/snippets/.keep diff --git a/.doc/2/interfaces/protocol/ssl-connection/index.md b/.doc/3/interfaces/protocol/ssl-connection/index.md similarity index 100% rename from .doc/2/interfaces/protocol/ssl-connection/index.md rename to .doc/3/interfaces/protocol/ssl-connection/index.md diff --git a/.doc/2/interfaces/protocol/ssl-connection/snippets/.keep b/.doc/3/interfaces/protocol/ssl-connection/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/ssl-connection/snippets/.keep rename to .doc/3/interfaces/protocol/ssl-connection/snippets/.keep diff --git a/.doc/2/interfaces/protocol/state/index.md b/.doc/3/interfaces/protocol/state/index.md similarity index 100% rename from .doc/2/interfaces/protocol/state/index.md rename to .doc/3/interfaces/protocol/state/index.md diff --git a/.doc/2/interfaces/protocol/state/snippets/.keep b/.doc/3/interfaces/protocol/state/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/state/snippets/.keep rename to .doc/3/interfaces/protocol/state/snippets/.keep diff --git a/.doc/2/interfaces/protocol/unregister-sub/index.md b/.doc/3/interfaces/protocol/unregister-sub/index.md similarity index 100% rename from .doc/2/interfaces/protocol/unregister-sub/index.md rename to .doc/3/interfaces/protocol/unregister-sub/index.md diff --git a/.doc/2/interfaces/protocol/unregister-sub/snippets/.keep b/.doc/3/interfaces/protocol/unregister-sub/snippets/.keep similarity index 100% rename from .doc/2/interfaces/protocol/unregister-sub/snippets/.keep rename to .doc/3/interfaces/protocol/unregister-sub/snippets/.keep diff --git a/.github/actions/dead-links/action.yml b/.github/actions/dead-links/action.yml new file mode 100644 index 00000000..4e035d7e --- /dev/null +++ b/.github/actions/dead-links/action.yml @@ -0,0 +1,17 @@ +name: Dead Links +description: Run Dead Links Tests +runs: + using: "composite" + steps: + - name: Prepare kuzdoc + run: | + npm ci + npm run doc-prepare + $(npm bin)/kuzdoc iterate-repos:install --repos_path .doc/framework/.repos/ + $(npm bin)/kuzdoc framework:link -d /sdk/go/3 -v 3 --base_root .doc/ + shell: bash + - name: Run Dead Links + run: | + sudo gem install typhoeus + cd .doc/framework/ && HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/sdk/go/3 + shell: bash diff --git a/.github/actions/doc-deploy/action.yml b/.github/actions/doc-deploy/action.yml new file mode 100644 index 00000000..0570d8f1 --- /dev/null +++ b/.github/actions/doc-deploy/action.yml @@ -0,0 +1,53 @@ +name: Deploy Documentation +description: Build doc, upload it to S3 and invalidate Cloudfront cache + +inputs: + AWS_ACCESS_KEY_ID: + description: AWS Access key ID + required: true + AWS_SECRET_ACCESS_KEY: + description: AWS secret key + required: true + S3_BUCKET: + description: S3 bucket name + required: true + CLOUDFRONT_ID: + description: Cloudfront distribution ID + required: true + REGION: + description: AWS default region + required: true + FRAMEWORK_BRANCH: + description: Documentation framework branch to use + required: true + +runs: + using: "composite" + steps: + - name: Install AWS CLI + run: | + sudo apt-get update + sudo apt-get install python python-pip + pip install awscli --upgrade --user + shell: bash + - name: Build documentation + run: | + rm -fr doc/framework + npm install --production=false + npm run doc-prepare + npm run doc-build + env: + NODE_ENV: production + FRAMEWORK_BRANCH: ${{ inputs.FRAMEWORK_BRANCH }} + shell: bash + - name: Deploy documentation + run: | + npm run doc-upload + npm run doc-cloudfront + env: + AWS_DEFAULT_REGION: ${{ inputs.REGION }} + AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }} + S3_BUCKET: ${{ inputs.S3_BUCKET }} + CLOUDFRONT_DISTRIBUTION_ID: ${{ inputs.CLOUDFRONT_ID }} + shell: bash diff --git a/.github/workflows/pull_request.workflow.yml b/.github/workflows/pull_request.workflow.yml new file mode 100644 index 00000000..70b8bc44 --- /dev/null +++ b/.github/workflows/pull_request.workflow.yml @@ -0,0 +1,134 @@ +name: Pull request checks + +on: [pull_request] + +jobs: + documentation-snippet-tests: + name: Documentation - Snippet Tests + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - run: docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index + + documentation-dead-links: + name: Documentation - Dead Links check + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + - uses: actions/setup-node@v1 + with: + node-version: "12" + - uses: ./.github/actions/dead-links + + lint: + name: Linters + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Install dependencies + run: | + go version + go get -u golang.org/x/lint/golint + # Uncomment following lines when https://github.com/kuzzleio/sdk-go/issues/288 is fixed + # - name: Run Vet + # run: go vet ./... + # - name: Run Lint + # run: golint ./... + - name: Run Fmt (format also documentation snippets) + run: gofmt -l ./**/*.go + + build: + name: Build with ${{ matrix.goVersion }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + needs: [lint] + strategy: + matrix: + goVersion: [1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-18.04, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVersion }} + - name: Build + run: go build -v ./... + + coverage: + name: Tests on latest Go version with coverage + runs-on: ubuntu-18.04 + timeout-minutes: 30 + needs: [build] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Test With Coverage + run: go test -v -coverprofile=coverage.txt -covermode=atomic ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + + test: + name: Test with ${{ matrix.goVersion }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + needs: [build] + strategy: + matrix: + goVersion: [1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-18.04, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVersion }} + - name: Test + run: go test -v ./... diff --git a/.github/workflows/push_dev.workflow.yml b/.github/workflows/push_dev.workflow.yml new file mode 100644 index 00000000..3778d878 --- /dev/null +++ b/.github/workflows/push_dev.workflow.yml @@ -0,0 +1,168 @@ +name: Dev branche checks + +on: + push: + branches: + - 3-dev + +jobs: + documentation-snippet-tests: + name: Documentation - Snippet Tests + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - run: docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index + + documentation-dead-links: + name: Documentation - Dead Links check + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + - uses: actions/setup-node@v1 + with: + node-version: "12" + - uses: ./.github/actions/dead-links + + lint: + name: Linters + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Install dependencies + run: | + go version + go get -u golang.org/x/lint/golint + # Uncomment following lines when https://github.com/kuzzleio/sdk-go/issues/288 is fixed + # - name: Run Vet + # run: go vet ./... + # - name: Run Lint + # run: golint ./... + - name: Run Fmt (format also documentation snippets) + run: gofmt -l ./**/*.go + + build: + name: Build with ${{ matrix.goVersion }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + needs: [lint] + strategy: + matrix: + goVersion: [1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-18.04, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVersion }} + - name: Build + run: go build -v ./... + + coverage: + name: Tests on latest Go version with coverage + runs-on: ubuntu-18.04 + timeout-minutes: 30 + needs: [build] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Test With Coverage + run: go test -v -coverprofile=coverage.txt -covermode=atomic ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + + test: + name: Test with ${{ matrix.goVersion }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + needs: [build] + strategy: + matrix: + goVersion: [1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-18.04, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVersion }} + - name: Test + run: go test -v ./... + + documentation-staging: + name: Documentation - Deploy to staging + runs-on: ubuntu-18.04 + timeout-minutes: 30 + needs: + [documentation-dead-links, documentation-snippet-tests, test, coverage] + steps: + - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - uses: actions/setup-node@v1 + with: + node-version: "12" + - uses: ./.github/actions/doc-deploy + with: + REGION: us-west-2 + S3_BUCKET: docs-next.kuzzle.io + CLOUDFRONT_ID: E2ZCCEK9GRB49U + FRAMEWORK_BRANCH: develop + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/push_master.workflow.yml b/.github/workflows/push_master.workflow.yml new file mode 100644 index 00000000..353a8fcc --- /dev/null +++ b/.github/workflows/push_master.workflow.yml @@ -0,0 +1,169 @@ +name: Main branches checks + +on: + push: + branches: + - master + - 2-stable + +jobs: + documentation-snippet-tests: + name: Documentation - Snippet Tests + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - run: docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index + + documentation-dead-links: + name: Documentation - Dead Links check + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + - uses: actions/setup-node@v1 + with: + node-version: "12" + - uses: ./.github/actions/dead-links + + lint: + name: Linters + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Install dependencies + run: | + go version + go get -u golang.org/x/lint/golint + # Uncomment following lines when https://github.com/kuzzleio/sdk-go/issues/288 is fixed + # - name: Run Vet + # run: go vet ./... + # - name: Run Lint + # run: golint ./... + - name: Run Fmt (format also documentation snippets) + run: gofmt -l ./**/*.go + + build: + name: Build with ${{ matrix.goVersion }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + needs: [lint] + strategy: + matrix: + goVersion: [1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-18.04, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVersion }} + - name: Build + run: go build -v ./... + + coverage: + name: Tests on latest Go version with coverage + runs-on: ubuntu-18.04 + timeout-minutes: 30 + needs: [build] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Test With Coverage + run: go test -v -coverprofile=coverage.txt -covermode=atomic ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + + test: + name: Test with ${{ matrix.goVersion }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + needs: [build] + strategy: + matrix: + goVersion: [1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-18.04, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVersion }} + - name: Test + run: go test -v ./... + + documentation-production: + name: Documentation - Deploy to production + runs-on: ubuntu-18.04 + timeout-minutes: 30 + needs: + [documentation-dead-links, documentation-snippet-tests, test, coverage] + steps: + - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - uses: actions/setup-node@v1 + with: + node-version: "10" + - uses: ./.github/actions/doc-deploy + with: + REGION: us-west-2 + S3_BUCKET: docs.kuzzle.io + CLOUDFRONT_ID: E3D6RP0POLCJMM + FRAMEWORK_BRANCH: master + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.travis.old.yml b/.travis.old.yml new file mode 100644 index 00000000..f5ebd7a6 --- /dev/null +++ b/.travis.old.yml @@ -0,0 +1,440 @@ +# ----------------- +# YAML Templates +# ----------------- +# Cross-plateform +_cross_tests: &cross_tests + stage: Cross-platform tests + language: go + go: 1.12.x + env: + - GO111MODULE=on + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + script: + - go test -mod=vendor -v ./... + +# Documentation deployment +_doc-deploy: &doc-deploy + stage: Deployments + language: node_js + node_js: 10 + env: &doc-deploy-env + - NODE_ENV=production + - AWS_DEFAULT_REGION=us-west-2 + - AWS_ACCESS_KEY_ID=AKIAIYAXFUAHXOWP2MJA + # AWS_SECRET_ACCESS_KEY + - secure: qzj0owa1ZC74eg3BBox1FWCBtDs7Xald1sfCjR52tV4/mpFu1sv5sSemzSzBfI0GYn5jAbPpm7DacmR8Y5mTxaIUXGi7mT041stjEEW3snubnsOLWxkGWpFpEZa2b8qlIxl/hzhv4wJ2rxxYCAwA9khOAc6uYunilL4yV0KCPoBD3fRYOktCNxaEbGCaFmlSphPBQYh867izCjSGNpn3kxst3+VuLE3RCikbZCuJvAZMSra4WxBcFqs6WytC5zykdkipb6O5US8koljqSdJgD1MOc0p4VrDmXum9IzBiK0omXbep3BPsorQBEvPCuHQQDk1HqJ+psKgLdwGX/nbaXHQ93smAMhUQOfF7rriYe7VeSrbHlVx/j/U7FMBoYG02efXOHH1jwO4njhQRNvbEAQnmky6my87NlCGnIUzkYeXogt+9/+MvkTDvfhYI6tVXEvoM/GSH7f12kr9gG4LSsI6PzJr8FPnp5+n+ZhqvqyEAJ3LUd/pTxAzNM+w405YeR29aeUdMkuhXHlM/lMfUR9RlnM216EM+fZH7lB2ueZV3m6AqDlIh29DRao9g6M3dkeWdtzFzZgVSrWtwhwZhmHTx6RXbz+SPDrwjQcEPuwMq8RIu9L+9/DW52vXv2u5VKHbszDWoelYza7EUbKcQ4y7NXaJV1+GfrJrpotQEScg= + cache: + npm: true + directories: + - $HOME/.cache/pip + addons: + apt: + packages: + - python + - python-pip + install: + - pip install awscli --upgrade --user + - npm ci + script: + - npm run doc-prepare + - npm run doc-build + deploy: + provider: script + script: + - npm run doc-upload + skip_cleanup: true + on: + all_branches: true + after_deploy: + - npm run doc-cloudfront + +# ------------------------ +# Jobs configuration +# ------------------------ +jobs: + include: + - name: Documentation test + language: go + go: 1.15.x + script: + - docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index + +# ----------------------------------------------- +# Linux amd64 +# ----------------------------------------------- + + - name: Linux amd64 - Go 1.15.x (with coverage) + os: linux + dist: xenial + sudo: true + language: go + go: 1.15.x + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + env: + - GOOS=linux + - GOARCH=amd64 + - GO111MODULE=on + script: + - bash .ci/test_with_coverage.sh + after_success: + - bash <(curl -s https://codecov.io/bash) + +# ----------------------------------------------- +# Linux i386 +# ----------------------------------------------- + + - name: Linux i386 - Go 1.15.x + os: linux + dist: xenial + sudo: true + language: go + go: 1.15.x + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=linux + - export GOARCH=386 + - go test -v ./... + + - name: Linux i386 - Go 1.11.x + if: type = cron OR branch = master + os: linux + dist: xenial + sudo: true + language: go + go: 1.11.x + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=linux + - export GOARCH=386 + - go test -v ./... + + - name: Linux i386 - Go 1.10.x + if: type = cron OR branch = master + os: linux + dist: xenial + sudo: true + language: go + go: 1.10.x + cache: + directories: + - "$HOME/.gem/specs" + before_script: + - npm ci + - npm run doc-prepare + - $(npm bin)/kuzdoc iterate-repos:install --repos_path .doc/framework/.repos/ + - $(npm bin)/kuzdoc framework:link -d /sdk/go/2/ -v 2 -b .doc/ + script: + - gem install typhoeus + - cd .doc/framework/ && HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/sdk/go/2/ + + - name: Linux arm64 - Go 1.15.x + os: linux + dist: xenial + sudo: true + addons: + apt: + packages: + - qemu-user-static + language: go + go: 1.15.x + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + script: + - docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index + + - name: Linux armhf - Go 1.15.x + os: linux + dist: xenial + sudo: true + addons: + apt: + packages: + - qemu-user-static + language: go + go: 1.15.x + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=linux + - export GOARCH=arm + - export GOARM=7 + - taskset -c 1 go test -v -exec "qemu-arm-static" ./... + + - <<: *cross_tests + name: Linux arm64 + addons: + apt: + packages: + - qemu-user-static + env: + - GOOS=linux + - GOARCH=arm64 + script: + - taskset -c 1 go test -mod=vendor -exec "qemu-aarch64-static" ./... + + - <<: *cross_tests + name: Linux armhf + addons: + apt: + packages: + - qemu-user-static + language: go + go: 1.10.x + cache: + directories: + - "$HOME/.cache/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=linux + - export GOARCH=arm + - export GOARM=7 + - taskset -c 1 go test -v -exec "qemu-arm-static" ./... + +# ----------------------------------------------- +# MacOS amd64 +# ----------------------------------------------- + + - name: MacOS amd64 - Go 1.15.x + if: type = cron OR branch = master + os: osx + language: go + go: 1.15.x + cache: + directories: + - "$HOME/Library/Caches/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=darwin + - export GOARCH=amd64 + - go test -v ./... + + - name: MacOS amd64 - Go 1.11.x + if: type = cron OR branch = master + os: osx + language: go + go: 1.11.x + cache: + directories: + - "$HOME/Library/Caches/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=darwin + - export GOARCH=amd64 + - go test -v ./... + + - name: MacOS amd64 - Go 1.10.x + if: type = cron OR branch = master + os: osx + language: go + go: 1.10.x + cache: + directories: + - "$HOME/Library/Caches/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=darwin + - export GOARCH=amd64 + - go test -v ./... + +# ----------------------------------------------- +# MacOS i386 +# ----------------------------------------------- + + - name: MacOS i386 - Go 1.15.x + if: type = cron OR branch = master + os: osx + language: go + go: 1.15.x + cache: + directories: + - "$HOME/Library/Caches/go-build" + - "$HOME/gopath/pkg" + script: + - taskset -c 1 go test -mod=vendor -exec "qemu-arm-static" ./... + + - <<: *cross_tests + name: MacOS amd64 + os: osx + cache: + directories: + - "$HOME/Library/Caches/go-build" + - "$HOME/gopath/pkg" + env: + - GOOS=darwin + - GOARCH=amd64 + - GO111MODULE=on + + - <<: *cross_tests + name: Windows amd64 + os: windows + cache: + directories: + - "$HOME/Library/Caches/go-build" + - "$HOME/gopath/pkg" + script: + - export GOOS=darwin + - export GOARCH=386 + - go test -v ./... + +# ----------------------------------------------- +# Windows amd64 +# ----------------------------------------------- + + - name: Windows amd64 - Go 1.15.x + if: type = cron OR branch = master + os: windows + language: go + go: 1.15.x + script: + - GOOS=windows + - GOARCH=amd64 + - go test -v ./... + - name: Windows amd64 - Go 1.11.x + if: type = cron OR branch = master + os: windows + language: go + go: 1.11.x + script: + - GOOS=windows + - GOARCH=amd64 + - go test -v ./... + +# ----------------------------------------------- +# Windows i386 +# ----------------------------------------------- + + - name: Windows i386 - Go 1.15.x + if: type = cron OR branch = master + os: windows + language: go + go: 1.15.x + script: + - GOOS=windows + - GOARCH=386 + - go test -v ./... + + - name: Windows i386 - Go 1.11.x + if: type = cron OR branch = master + os: windows + language: go + go: 1.11.x + script: + - GOOS=windows + - GOARCH=386 + - go test -v ./... + + - name: Windows i386 - Go 1.10.x + if: type = cron OR branch = master + os: windows + language: go + go: 1.10.x + script: + - GOOS=windows + - GOARCH=386 + - go test -v ./... + +# ----------------------------------------------- +# Documentation +# ----------------------------------------------- + + - stage: Tests + name: Dead link check + if: type = pull_request OR type = push AND branch =~ /^master|[0-9]+-(dev|stable)$/ OR type = cron + language: node_js + node_js: 12 + install: + - gem install typhoeus + - npm ci + before_script: + - npm run doc-prepare + - $(npm bin)/kuzdoc iterate-repos:install --repos_path .doc/framework/.repos/ + - $(npm bin)/kuzdoc framework:link -d /sdk/go/3 -v 3 --base_root .doc/ + script: + - cd .doc/framework/ + - HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/sdk/go/3 + + - stage: Tests + name: Documentation test + language: go + go: 1.15.x + script: + - docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index + + + - stage: Deployment Doc Dev + name: Deploy next-docs.kuzzle.io + if: type = push AND branch =~ .*-dev + language: node_js + node_js: 10 + env: + - *doc-deploy-env + - S3_BUCKET=docs-next.kuzzle.io + - CLOUDFRONT_DISTRIBUTION_ID=E2ZCCEK9GRB49U + + addons: + apt: + packages: + - python + - python-pip + + install: + - pip install awscli --upgrade --user + - npm ci + + script: + - npm run doc-prepare + - npm run doc-build + + deploy: + provider: script + script: + - npm run doc-upload + skip_cleanup: true + + after_deploy: + - npm run doc-cloudfront + + - stage: Deployment Doc Prod + name: Deploy docs.kuzzle.io + if: branch =~ /^master|[0-9]+-stable$/ + env: + - *doc-deploy-env + - S3_BUCKET=docs.kuzzle.io + - CLOUDFRONT_DISTRIBUTION_ID=E3D6RP0POLCJMM + +# ------------------------ +# Stages configuration +# ------------------------ +stages: + - name: Unit Tests & Linters + if: type =~ /(cron|push|pull_request)/ AND branch =~ /^master|[0-9]+-(dev|stable)$/ + - name: Cross-platform tests + if: type = cron + - name: Deployments + if: type = push AND branch =~ /^master|[0-9]+-(dev|stable)$/ + +# --------------------------------------- +# Notifications +# --------------------------------------- +notifications: + slack: + rooms: + - secure: "th1UK1PSRYsPG0TrrWFP0fRm/ClTQP/oxG52QxryaZHx3QnWiexrzgs+llv5I0wNcegFxPRgndcqMNFelodgxRWGIproiTQDfftCYXdNdJKTYtWYc6gzlPtqQkk36PH96Tq3tMPA/S0rhiGHQyUrh+R14vkVZJrD3W1fWzN/BqIJkWlXNIoDg98pD3l0nUoOY1s+3vWW7BZdzzMfvNEjF7Q+7DARd+F/pxsqiaUDrNV+EGG10y42/XxEpo4CfkNPqu2ArQRSW7BRoWdpNKVb+f7+nrhfVLr12LA9fcSYyXG0LWQ8vsZZaq8QHU4zImcydTElgryfliaWAFNTQ9KKQN+wjLPEhXyp6dRIET/ThqBxWCuL8pdJqNTqBfsYKp60VKt/jTa/BGwPBuWFwCSYP+/daTsoSK5qPF3A05K0xtSMAPJbylxahtZnqon6gFeuRJeeMtbGHfxNfdCRZXvBtv5txQn+szXDnZtNU2eYZ6uY47cc2VqQ/nx82u9a2vch6M9Hu6x05seYjVJZ50Nyh8kV4KFVpR82rXUb+ZDZ01bXV2MDm1Elo7NiVIByZ4PaI9tlkrlBcs6IRXULvE0+syxa/lwgHSO0NysyUjHPy46+c3VKtNVnu54oBkmEug1GEt+sq0TItqZG7d3COoolOvu+zQjROCzue/0p+1B7mu8=" + on_success: never + on_failure: always diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8875b1f6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,207 +0,0 @@ -# ----------------- -# YAML Templates -# ----------------- -# Cross-plateform -_cross_tests: &cross_tests - stage: Cross-platform tests - language: go - go: 1.12.x - env: - - GO111MODULE=on - cache: - directories: - - "$HOME/.cache/go-build" - - "$HOME/gopath/pkg" - script: - - go test -mod=vendor -v ./... - -# Documentation deployment -_doc-deploy: &doc-deploy - stage: Deployments - language: node_js - node_js: 10 - env: &doc-deploy-env - - NODE_ENV=production - - AWS_DEFAULT_REGION=us-west-2 - - AWS_ACCESS_KEY_ID=AKIAIYAXFUAHXOWP2MJA - # AWS_SECRET_ACCESS_KEY - - secure: qzj0owa1ZC74eg3BBox1FWCBtDs7Xald1sfCjR52tV4/mpFu1sv5sSemzSzBfI0GYn5jAbPpm7DacmR8Y5mTxaIUXGi7mT041stjEEW3snubnsOLWxkGWpFpEZa2b8qlIxl/hzhv4wJ2rxxYCAwA9khOAc6uYunilL4yV0KCPoBD3fRYOktCNxaEbGCaFmlSphPBQYh867izCjSGNpn3kxst3+VuLE3RCikbZCuJvAZMSra4WxBcFqs6WytC5zykdkipb6O5US8koljqSdJgD1MOc0p4VrDmXum9IzBiK0omXbep3BPsorQBEvPCuHQQDk1HqJ+psKgLdwGX/nbaXHQ93smAMhUQOfF7rriYe7VeSrbHlVx/j/U7FMBoYG02efXOHH1jwO4njhQRNvbEAQnmky6my87NlCGnIUzkYeXogt+9/+MvkTDvfhYI6tVXEvoM/GSH7f12kr9gG4LSsI6PzJr8FPnp5+n+ZhqvqyEAJ3LUd/pTxAzNM+w405YeR29aeUdMkuhXHlM/lMfUR9RlnM216EM+fZH7lB2ueZV3m6AqDlIh29DRao9g6M3dkeWdtzFzZgVSrWtwhwZhmHTx6RXbz+SPDrwjQcEPuwMq8RIu9L+9/DW52vXv2u5VKHbszDWoelYza7EUbKcQ4y7NXaJV1+GfrJrpotQEScg= - cache: - npm: true - directories: - - $HOME/.cache/pip - addons: - apt: - packages: - - python - - python-pip - install: - - pip install awscli --upgrade --user - - npm ci - script: - - npm run doc-prepare - - npm run doc-build - deploy: - provider: script - script: - - npm run doc-upload - skip_cleanup: true - on: - all_branches: true - after_deploy: - - npm run doc-cloudfront - -# ------------------------ -# Jobs configuration -# ------------------------ -jobs: - include: - # --------------------------------------- - # Unit Tests & Linters - # --------------------------------------- - - name: Linux amd64 (with coverage) - stage: Unit Tests & Linters - language: go - go: 1.12.x - cache: - directories: - - "$HOME/.cache/go-build" - - "$HOME/gopath/pkg" - env: - - GOOS=linux - - GOARCH=amd64 - - GO111MODULE=on - script: - - bash .ci/test_with_coverage.sh - after_success: - - bash <(curl -s https://codecov.io/bash) - - - name: Dead link check - stage: Unit Tests & Linters - language: node_js - node_js: 12 - cache: - directories: - - "$HOME/.gem/specs" - before_script: - - npm ci - - npm run doc-prepare - - $(npm bin)/kuzdoc iterate-repos:install --repos_path .doc/framework/.repos/ - - $(npm bin)/kuzdoc framework:link -d /sdk/go/2/ -v 2 -b .doc/ - script: - - gem install typhoeus - - cd .doc/framework/ && HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/sdk/go/2/ - - - name: Documentation test - stage: Unit Tests & Linters - language: go - go: 1.12.x - env: - - GO111MODULE=on - cache: - directories: - - "$HOME/.cache/go-build" - - "$HOME/gopath/pkg" - script: - - docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index - - # ----------------------------------------------- - # Cross-platform tests - # ----------------------------------------------- - - <<: *cross_tests - name: Linux i386 - os: linux - env: - - GOOS=linux - - GOARCH=386 - - GO111MODULE=on - - - <<: *cross_tests - name: Linux arm64 - addons: - apt: - packages: - - qemu-user-static - env: - - GOOS=linux - - GOARCH=arm64 - script: - - taskset -c 1 go test -mod=vendor -exec "qemu-aarch64-static" ./... - - - <<: *cross_tests - name: Linux armhf - addons: - apt: - packages: - - qemu-user-static - env: - - GOOS=linux - - GOARCH=arm - - GOARM=7 - - GO111MODULE=on - script: - - taskset -c 1 go test -mod=vendor -exec "qemu-arm-static" ./... - - - <<: *cross_tests - name: MacOS amd64 - os: osx - cache: - directories: - - "$HOME/Library/Caches/go-build" - - "$HOME/gopath/pkg" - env: - - GOOS=darwin - - GOARCH=amd64 - - GO111MODULE=on - - - <<: *cross_tests - name: Windows amd64 - os: windows - cache: - directories: - - "$HOME/Library/Caches/go-build" - - "/c/Users/travis/gopath/pkg" - env: - - GOOS=windows - - GOARCH=amd64 - - GO111MODULE=on - - # ----------------------------------------------- - # Deployments - # ----------------------------------------------- - - <<: *doc-deploy - name: Documentation to next-docs.kuzzle.io - if: branch =~ /^[0-9]+-dev$/ - env: - - *doc-deploy-env - - S3_BUCKET=docs-next.kuzzle.io - - CLOUDFRONT_DISTRIBUTION_ID=E2ZCCEK9GRB49U - - - <<: *doc-deploy - name: Deploy docs.kuzzle.io - if: branch =~ /^master|[0-9]+-stable$/ - env: - - *doc-deploy-env - - S3_BUCKET=docs.kuzzle.io - - CLOUDFRONT_DISTRIBUTION_ID=E3D6RP0POLCJMM - -# ------------------------ -# Stages configuration -# ------------------------ -stages: - - name: Unit Tests & Linters - if: type =~ /(cron|push|pull_request)/ AND branch =~ /^master|[0-9]+-(dev|stable)$/ - - name: Cross-platform tests - if: type = cron - - name: Deployments - if: type = push AND branch =~ /^master|[0-9]+-(dev|stable)$/ - -# --------------------------------------- -# Notifications -# --------------------------------------- -notifications: - slack: - rooms: - - secure: "th1UK1PSRYsPG0TrrWFP0fRm/ClTQP/oxG52QxryaZHx3QnWiexrzgs+llv5I0wNcegFxPRgndcqMNFelodgxRWGIproiTQDfftCYXdNdJKTYtWYc6gzlPtqQkk36PH96Tq3tMPA/S0rhiGHQyUrh+R14vkVZJrD3W1fWzN/BqIJkWlXNIoDg98pD3l0nUoOY1s+3vWW7BZdzzMfvNEjF7Q+7DARd+F/pxsqiaUDrNV+EGG10y42/XxEpo4CfkNPqu2ArQRSW7BRoWdpNKVb+f7+nrhfVLr12LA9fcSYyXG0LWQ8vsZZaq8QHU4zImcydTElgryfliaWAFNTQ9KKQN+wjLPEhXyp6dRIET/ThqBxWCuL8pdJqNTqBfsYKp60VKt/jTa/BGwPBuWFwCSYP+/daTsoSK5qPF3A05K0xtSMAPJbylxahtZnqon6gFeuRJeeMtbGHfxNfdCRZXvBtv5txQn+szXDnZtNU2eYZ6uY47cc2VqQ/nx82u9a2vch6M9Hu6x05seYjVJZ50Nyh8kV4KFVpR82rXUb+ZDZ01bXV2MDm1Elo7NiVIByZ4PaI9tlkrlBcs6IRXULvE0+syxa/lwgHSO0NysyUjHPy46+c3VKtNVnu54oBkmEug1GEt+sq0TItqZG7d3COoolOvu+zQjROCzue/0p+1B7mu8=" - on_success: never - on_failure: always diff --git a/README.md b/README.md index ea81a19d..27bc00c8 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,7 @@

- - - + GitHub branch checks state @@ -28,7 +26,7 @@ This is the official Go SDK for the free and open-source backend Kuzzle. It prov The SDK provides a native __WebSocket__ support. You can add your own network protocol by implementing the Protocol interface.

- :books: Documentation + :books: Documentation

### Kuzzle diff --git a/index/refresh.go b/collection/delete.go similarity index 71% rename from index/refresh.go rename to collection/delete.go index 27e27c09..854c36aa 100644 --- a/index/refresh.go +++ b/collection/delete.go @@ -12,31 +12,30 @@ // See the License for the specific language governing permissions and // limitations under the License. -package index +package collection import ( "github.com/kuzzleio/sdk-go/types" ) -// Refresh forces the provided data index to refresh on each modification -func (i *Index) Refresh(index string, options types.QueryOptions) error { - if index == "" { - return types.NewError("Index.Refresh: index required", 400) - } - +// Delete a collection +func (dc *Collection) Delete(index string, collection string, options types.QueryOptions) error { result := make(chan *types.KuzzleResponse) query := &types.KuzzleRequest{ - Controller: "index", - Action: "refresh", + Controller: "collection", + Action: "delete", Index: index, + Collection: collection, } - go i.kuzzle.Query(query, options, result) + + go dc.Kuzzle.Query(query, options, result) res := <-result if res.Error.Error() != "" { return res.Error } + return nil } diff --git a/index/refreshInternal_test.go b/collection/delete_test.go similarity index 56% rename from index/refreshInternal_test.go rename to collection/delete_test.go index 3e9f11fd..e075d43b 100644 --- a/index/refreshInternal_test.go +++ b/collection/delete_test.go @@ -12,63 +12,54 @@ // See the License for the specific language governing permissions and // limitations under the License. -package index_test +package collection_test import ( - "encoding/json" "fmt" "testing" - "github.com/kuzzleio/sdk-go/index" + "github.com/kuzzleio/sdk-go/collection" "github.com/kuzzleio/sdk-go/internal" "github.com/kuzzleio/sdk-go/kuzzle" - "github.com/kuzzleio/sdk-go/protocol/websocket" "github.com/kuzzleio/sdk-go/types" "github.com/stretchr/testify/assert" ) -func TestRefreshInternalQueryError(t *testing.T) { +func TestDeleteError(t *testing.T) { c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - return &types.KuzzleResponse{Error: types.KuzzleError{Message: "error"}} + return &types.KuzzleResponse{Error: types.NewError("Unit test error")} }, } k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - err := i.RefreshInternal(nil) + + nc := collection.NewCollection(k) + err := nc.Delete("index", "collection", nil) assert.NotNil(t, err) + assert.Equal(t, "Unit test error", err.(types.KuzzleError).Message) } -func TestRefreshInternal(t *testing.T) { - type ackResult struct { - Acknowledged bool - ShardsAcknowledged bool - } - +func TestDelete(t *testing.T) { c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - q := &types.KuzzleRequest{} - json.Unmarshal(query, q) - - assert.Equal(t, "index", q.Controller) - assert.Equal(t, "refreshInternal", q.Action) - - return &types.KuzzleResponse{Result: []byte(`"result":true`)} + return &types.KuzzleResponse{Result: []byte(`null`)} }, } k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - err := i.RefreshInternal(nil) + nc := collection.NewCollection(k) + err := nc.Delete("index", "collection", nil) assert.Nil(t, err) } -func ExampleIndex_RefreshInternal() { - conn := websocket.NewWebSocket("localhost:7512", nil) - k, _ := kuzzle.NewKuzzle(conn, nil) - i := index.NewIndex(k) - err := i.RefreshInternal(nil) - if err.Error() != "" { +func ExampleCollection_Delete() { + c := &internal.MockedConnection{} + k, _ := kuzzle.NewKuzzle(c, nil) + + nc := collection.NewCollection(k) + err := nc.Delete("index", "collection", nil) + + if err != nil { fmt.Println(err.Error()) return } diff --git a/collection/get_mapping_test.go b/collection/get_mapping_test.go index d0928360..708192ec 100644 --- a/collection/get_mapping_test.go +++ b/collection/get_mapping_test.go @@ -67,16 +67,10 @@ func TestGetMapping(t *testing.T) { res := types.KuzzleResponse{Result: []byte(` { - "index":{ - "mappings":{ - "collection":{ - "properties":{ - "foo":{ - "type":"text", - "ignore_above":255 - } - } - } + "properties":{ + "foo":{ + "type":"text", + "ignore_above":255 } } }`), diff --git a/collection/get_specifications_test.go b/collection/get_specifications_test.go index 358331c5..f5976041 100644 --- a/collection/get_specifications_test.go +++ b/collection/get_specifications_test.go @@ -70,7 +70,7 @@ func TestGetSpecifications(t *testing.T) { "collection": "collection", "index": "index", "validation": { - "fields": { + "properties": { "myField": { "defaultValue": 42, "mandatory": true, diff --git a/index/setAutoRefresh.go b/collection/refresh.go similarity index 59% rename from index/setAutoRefresh.go rename to collection/refresh.go index d428df70..10f183ad 100644 --- a/index/setAutoRefresh.go +++ b/collection/refresh.go @@ -12,30 +12,34 @@ // See the License for the specific language governing permissions and // limitations under the License. -package index +package collection -import "github.com/kuzzleio/sdk-go/types" +import ( + "github.com/kuzzleio/sdk-go/types" +) -// SetAutoRefresh is an autorefresh status setter for the provided data index name -func (i *Index) SetAutoRefresh(index string, autoRefresh bool, options types.QueryOptions) error { +// Refresh force an immediate reindexation of the provided collection +func (dc *Collection) Refresh(index string, collection string, options types.QueryOptions) error { if index == "" { - return types.NewError("Index.SetAutoRefresh: index required", 400) + return types.NewError("Collection.Create: index required", 400) } - result := make(chan *types.KuzzleResponse) + if collection == "" { + return types.NewError("Collection.Create: collection required", 400) + } + + ch := make(chan *types.KuzzleResponse) query := &types.KuzzleRequest{ - Controller: "index", - Action: "setAutoRefresh", + Collection: collection, Index: index, - Body: struct { - AutoRefresh bool `json:"autoRefresh"` - }{autoRefresh}, + Controller: "collection", + Action: "refresh", } - go i.kuzzle.Query(query, options, result) + go dc.Kuzzle.Query(query, options, ch) - res := <-result + res := <-ch if res.Error.Error() != "" { return res.Error diff --git a/index/refresh_test.go b/collection/refresh_test.go similarity index 53% rename from index/refresh_test.go rename to collection/refresh_test.go index f4be8bd5..4acb0954 100644 --- a/index/refresh_test.go +++ b/collection/refresh_test.go @@ -12,73 +12,61 @@ // See the License for the specific language governing permissions and // limitations under the License. -package index_test +package collection_test import ( - "encoding/json" - "fmt" "testing" - "github.com/kuzzleio/sdk-go/index" + "github.com/kuzzleio/sdk-go/collection" "github.com/kuzzleio/sdk-go/internal" "github.com/kuzzleio/sdk-go/kuzzle" - "github.com/kuzzleio/sdk-go/protocol/websocket" "github.com/kuzzleio/sdk-go/types" "github.com/stretchr/testify/assert" ) -func TestRefreshNull(t *testing.T) { +func TestRefreshIndexNull(t *testing.T) { k, _ := kuzzle.NewKuzzle(&internal.MockedConnection{}, nil) - i := index.NewIndex(k) - err := i.Refresh("", nil) + nc := collection.NewCollection(k) + err := nc.Refresh("", "collection", nil) assert.NotNil(t, err) } -func TestRefreshQueryError(t *testing.T) { +func TestRefreshCollectionNull(t *testing.T) { + k, _ := kuzzle.NewKuzzle(&internal.MockedConnection{}, nil) + nc := collection.NewCollection(k) + err := nc.Refresh("index", "", nil) + assert.NotNil(t, err) +} +func TestRefreshError(t *testing.T) { c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - return &types.KuzzleResponse{Error: types.KuzzleError{Message: "error"}} + return &types.KuzzleResponse{Error: types.NewError("Unit test error")} }, } k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - err := i.Refresh("index", nil) + + nc := collection.NewCollection(k) + err := nc.Refresh("index", "collection", nil) assert.NotNil(t, err) + assert.Equal(t, "Unit test error", err.(types.KuzzleError).Message) } func TestRefresh(t *testing.T) { - type ackResult struct { - Acknowledged bool - ShardsAcknowledged bool - } - c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - q := &types.KuzzleRequest{} - json.Unmarshal(query, q) - - assert.Equal(t, "index", q.Controller) - assert.Equal(t, "refresh", q.Action) - assert.Equal(t, "index", q.Index) - - return &types.KuzzleResponse{Result: []byte(`"_shards": {"failed": 0,"succressful": 5,"total": 10}`)} + return &types.KuzzleResponse{Result: []byte(`{ + "status":200, + "error": null, + "index": "index", + "collection": "collection", + "action": "refresh", + "result": null + }`)} }, } k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - err := i.Refresh("index", nil) + nc := collection.NewCollection(k) + err := nc.Refresh("index", "collection", nil) assert.Nil(t, err) } - -func ExampleIndex_Refresh() { - conn := websocket.NewWebSocket("localhost:7512", nil) - k, _ := kuzzle.NewKuzzle(conn, nil) - i := index.NewIndex(k) - i.Create("index", nil) - err := i.Refresh("index", nil) - if err.Error() != "" { - fmt.Println(err.Error()) - return - } -} diff --git a/collection/update_specifications.go b/collection/update_specifications.go index 8b97e319..9740596c 100644 --- a/collection/update_specifications.go +++ b/collection/update_specifications.go @@ -16,7 +16,6 @@ package collection import ( "encoding/json" - "fmt" "github.com/kuzzleio/sdk-go/types" ) @@ -37,20 +36,12 @@ func (dc *Collection) UpdateSpecifications(index string, collection string, spec ch := make(chan *types.KuzzleResponse) - body := make(map[string]map[string]json.RawMessage) - body[index] = make(map[string]json.RawMessage) - body[index][collection] = specifications - - jsonBody, err := json.Marshal(body) - - if err != nil { - return nil, types.NewError(fmt.Sprintf("Unable to construct body: %s\n", err.Error()), 500) - } - query := &types.KuzzleRequest{ Controller: "collection", Action: "updateSpecifications", - Body: json.RawMessage(jsonBody), + Index: index, + Collection: collection, + Body: specifications, } go dc.Kuzzle.Query(query, options, ch) diff --git a/collection/update_specifications_test.go b/collection/update_specifications_test.go index 556e2d05..e1e0bb47 100644 --- a/collection/update_specifications_test.go +++ b/collection/update_specifications_test.go @@ -63,7 +63,7 @@ func TestUpdateSpecificationsError(t *testing.T) { func TestUpdateSpecifications(t *testing.T) { c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - return &types.KuzzleResponse{Result: []byte(`{ "myindex": { "mycollection": { "strict": false, "fields": {} } }}`)} + return &types.KuzzleResponse{Result: []byte(`{ "strict": false, "fields": {} }`)} }, } k, _ := kuzzle.NewKuzzle(c, nil) diff --git a/collection/validate_specifications.go b/collection/validate_specifications.go index 0bcefdc7..7b9f5d9f 100644 --- a/collection/validate_specifications.go +++ b/collection/validate_specifications.go @@ -16,7 +16,6 @@ package collection import ( "encoding/json" - "fmt" "github.com/kuzzleio/sdk-go/types" ) @@ -37,20 +36,12 @@ func (dc *Collection) ValidateSpecifications(index string, collection string, sp ch := make(chan *types.KuzzleResponse) - body := make(map[string]map[string]json.RawMessage) - body[index] = make(map[string]json.RawMessage) - body[index][collection] = specifications - - jsonBody, err := json.Marshal(body) - - if err != nil { - return nil, types.NewError(fmt.Sprintf("Unable to construct body: %s\n", err.Error()), 500) - } - query := &types.KuzzleRequest{ Controller: "collection", Action: "validateSpecifications", - Body: json.RawMessage(jsonBody), + Index: index, + Collection: collection, + Body: specifications, } go dc.Kuzzle.Query(query, options, ch) diff --git a/document/mCreate.go b/document/mCreate.go index 1732c01c..c1913132 100644 --- a/document/mCreate.go +++ b/document/mCreate.go @@ -56,11 +56,5 @@ func (d *Document) MCreate(index string, collection string, documents json.RawMe return nil, res.Error } - type r struct { - Hits json.RawMessage `json:"hits"` - } - var docs r - json.Unmarshal(res.Result, &docs) - - return docs.Hits, nil + return res.Result, nil } diff --git a/document/mCreateOrReplace.go b/document/mCreateOrReplace.go index 4ddfa295..a7362209 100644 --- a/document/mCreateOrReplace.go +++ b/document/mCreateOrReplace.go @@ -56,11 +56,5 @@ func (d *Document) MCreateOrReplace(index string, collection string, documents j return nil, res.Error } - type r struct { - Hits json.RawMessage `json:"hits"` - } - var docs r - json.Unmarshal(res.Result, &docs) - - return docs.Hits, nil + return res.Result, nil } diff --git a/document/mCreateOrReplace_test.go b/document/mCreateOrReplace_test.go index 3e874506..bf189be5 100644 --- a/document/mCreateOrReplace_test.go +++ b/document/mCreateOrReplace_test.go @@ -76,7 +76,7 @@ func TestMCreateOrReplaceDocument(t *testing.T) { assert.Equal(t, "collection", parsedQuery.Collection) return &types.KuzzleResponse{Result: []byte(`{ - "hits": [ + "successes": [ { "_id": "id1", "_index": "index", @@ -102,7 +102,7 @@ func TestMCreateOrReplaceDocument(t *testing.T) { "result": "created" } ], - "total": "1" + "errors": [] }`), } }, diff --git a/document/mCreate_test.go b/document/mCreate_test.go index 853b2eeb..9dce1d75 100644 --- a/document/mCreate_test.go +++ b/document/mCreate_test.go @@ -76,7 +76,7 @@ func TestMCreateDocument(t *testing.T) { assert.Equal(t, "collection", parsedQuery.Collection) return &types.KuzzleResponse{Result: []byte(`{ - "hits": [ + "successes": [ { "_id": "id1", "_index": "index", @@ -102,7 +102,7 @@ func TestMCreateDocument(t *testing.T) { "result": "created" } ], - "total": "1" + "errors": [] }`), } }, diff --git a/document/mDelete.go b/document/mDelete.go index f540e5bc..91e8361c 100644 --- a/document/mDelete.go +++ b/document/mDelete.go @@ -21,7 +21,7 @@ import ( ) // MDelete deletes multiple documents at once -func (d *Document) MDelete(index string, collection string, ids []string, options types.QueryOptions) ([]string, error) { +func (d *Document) MDelete(index string, collection string, ids []string, options types.QueryOptions) (json.RawMessage, error) { if index == "" { return nil, types.NewError("Document.MDelete: index required", 400) } @@ -56,8 +56,5 @@ func (d *Document) MDelete(index string, collection string, ids []string, option return nil, res.Error } - var mDeleted []string - json.Unmarshal(res.Result, &mDeleted) - - return mDeleted, nil + return res.Result, nil } diff --git a/document/mDelete_test.go b/document/mDelete_test.go index 92fa579e..0594d5ac 100644 --- a/document/mDelete_test.go +++ b/document/mDelete_test.go @@ -84,7 +84,8 @@ func TestMDeleteDocument(t *testing.T) { return &types.KuzzleResponse{Result: []byte(` { - "ids": ["id1", "id2"] + "successes": ["id1", "id2"], + "errors": [] }`), } }, diff --git a/document/mGet.go b/document/mGet.go index b221e7df..efc7761a 100644 --- a/document/mGet.go +++ b/document/mGet.go @@ -59,11 +59,5 @@ func (d *Document) MGet(index string, collection string, ids []string, options t return nil, res.Error } - type r struct { - Hits json.RawMessage `json:"hits"` - } - var docs r - json.Unmarshal(res.Result, &docs) - - return docs.Hits, nil + return res.Result, nil } diff --git a/document/mGet_test.go b/document/mGet_test.go index d7486d23..7a28c447 100644 --- a/document/mGet_test.go +++ b/document/mGet_test.go @@ -80,7 +80,7 @@ func TestMGetDocument(t *testing.T) { return &types.KuzzleResponse{Result: []byte(` { - "hits": [ + "successes": [ { "_id": "id1", "_index": "index", @@ -106,7 +106,7 @@ func TestMGetDocument(t *testing.T) { "result": "created" } ], - "total": "1" + "errors": [] }`), } }, diff --git a/document/mReplace.go b/document/mReplace.go index b6628055..54adf8f7 100644 --- a/document/mReplace.go +++ b/document/mReplace.go @@ -56,11 +56,5 @@ func (d *Document) MReplace(index string, collection string, documents json.RawM return nil, res.Error } - type r struct { - Hits json.RawMessage `json:"hits"` - } - var docs r - json.Unmarshal(res.Result, &docs) - - return docs.Hits, nil + return res.Result, nil } diff --git a/document/mReplace_test.go b/document/mReplace_test.go index bcf12e2b..77f2d325 100644 --- a/document/mReplace_test.go +++ b/document/mReplace_test.go @@ -77,7 +77,7 @@ func TestMReplaceDocument(t *testing.T) { return &types.KuzzleResponse{Result: []byte(` { - "hits": [ + "successes": [ { "_id": "id1", "_index": "index", @@ -103,7 +103,7 @@ func TestMReplaceDocument(t *testing.T) { "result": "created" } ], - "total": "1" + "errors": [] }`), } }, diff --git a/document/mUpdate.go b/document/mUpdate.go index 3853eadd..93bd251e 100644 --- a/document/mUpdate.go +++ b/document/mUpdate.go @@ -56,11 +56,5 @@ func (d *Document) MUpdate(index string, collection string, documents json.RawMe return nil, res.Error } - type r struct { - Hits json.RawMessage `json:"hits"` - } - var docs r - json.Unmarshal(res.Result, &docs) - - return docs.Hits, nil + return res.Result, nil } diff --git a/document/mUpdate_test.go b/document/mUpdate_test.go index deb5be41..8aaac31c 100644 --- a/document/mUpdate_test.go +++ b/document/mUpdate_test.go @@ -77,7 +77,7 @@ func TestMUpdateDocument(t *testing.T) { return &types.KuzzleResponse{Result: []byte(` { - "hits": [ + "successes": [ { "_id": "id1", "_index": "index", @@ -103,7 +103,7 @@ func TestMUpdateDocument(t *testing.T) { "result": "created" } ], - "total": "1" + "errors": [] }`), } }, diff --git a/document/update.go b/document/update.go index 19a3d8c3..cd62510c 100644 --- a/document/update.go +++ b/document/update.go @@ -23,7 +23,7 @@ import ( // Update updates a document in Kuzzle. func (d *Document) Update(index string, collection string, id string, body json.RawMessage, options types.QueryOptions) (json.RawMessage, error) { if id == "" { - return nil, types.NewError("Document.update: id required", 400) + return nil, types.NewError("Document.Update: id required", 400) } if index == "" { diff --git a/go.mod b/go.mod index 5fb3d43c..c2560499 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/kuzzleio/sdk-go -go 1.12 +go 1.14 require ( github.com/google/uuid v1.1.2 github.com/gorilla/websocket v1.4.2 - github.com/stretchr/testify v1.4.0 + github.com/stretchr/testify v1.6.1 ) diff --git a/go.sum b/go.sum index 0aa4e448..de5dc8bf 100644 --- a/go.sum +++ b/go.sum @@ -2,17 +2,15 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/index/get_auto_refresh.go b/index/get_auto_refresh.go deleted file mode 100644 index e52bbb15..00000000 --- a/index/get_auto_refresh.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2015-2018 Kuzzle -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package index - -import ( - "encoding/json" - "fmt" - - "github.com/kuzzleio/sdk-go/types" -) - -// GetAutoRefresh returns the current autoRefresh status for the given index. -func (i *Index) GetAutoRefresh(index string, options types.QueryOptions) (bool, error) { - if index == "" { - return false, types.NewError("Index.GetAutoRefresh: index required", 400) - } - - result := make(chan *types.KuzzleResponse) - - query := &types.KuzzleRequest{ - Index: index, - Controller: "index", - Action: "getAutoRefresh", - } - - go i.kuzzle.Query(query, nil, result) - - res := <-result - - if res.Error.Error() != "" { - return false, res.Error - } - - var autoR bool - - err := json.Unmarshal(res.Result, &autoR) - if err != nil { - return false, types.NewError(fmt.Sprintf("Unable to parse response: %s\n%s", err.Error(), res.Result), 500) - } - return autoR, nil - -} diff --git a/index/get_auto_refresh_test.go b/index/get_auto_refresh_test.go deleted file mode 100644 index 315fc65f..00000000 --- a/index/get_auto_refresh_test.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2015-2018 Kuzzle -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package index_test - -import ( - "encoding/json" - "fmt" - "testing" - - "github.com/kuzzleio/sdk-go/index" - "github.com/kuzzleio/sdk-go/internal" - "github.com/kuzzleio/sdk-go/kuzzle" - "github.com/kuzzleio/sdk-go/protocol/websocket" - "github.com/kuzzleio/sdk-go/types" - "github.com/stretchr/testify/assert" -) - -func TestGetAutoRefreshNull(t *testing.T) { - k, _ := kuzzle.NewKuzzle(&internal.MockedConnection{}, nil) - i := index.NewIndex(k) - _, err := i.GetAutoRefresh("", nil) - assert.NotNil(t, err) -} - -func TestGetAutoRefreshQueryError(t *testing.T) { - c := &internal.MockedConnection{ - MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - return &types.KuzzleResponse{Error: types.KuzzleError{Message: "error"}} - }, - } - k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - _, err := i.GetAutoRefresh("index", nil) - assert.NotNil(t, err) -} - -func TestGetAutoRefresh(t *testing.T) { - type ackResult struct { - Acknowledged bool - ShardsAcknowledged bool - } - - c := &internal.MockedConnection{ - MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - q := &types.KuzzleRequest{} - json.Unmarshal(query, q) - - assert.Equal(t, "index", q.Controller) - assert.Equal(t, "getAutoRefresh", q.Action) - assert.Equal(t, "index", q.Index) - - return &types.KuzzleResponse{Result: []byte(`true`)} - }, - } - - k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - _, err := i.GetAutoRefresh("index", nil) - - assert.Nil(t, err) -} - -func ExampleIndex_GetAutoRefresh() { - conn := websocket.NewWebSocket("localhost:7512", nil) - k, _ := kuzzle.NewKuzzle(conn, nil) - i := index.NewIndex(k) - i.Create("index", nil) - _, err := i.GetAutoRefresh("index", nil) - if err != nil { - fmt.Println(err.Error()) - return - } -} diff --git a/index/mDelete.go b/index/mDelete.go index 3da8e747..43e86df4 100644 --- a/index/mDelete.go +++ b/index/mDelete.go @@ -47,9 +47,11 @@ func (i *Index) MDelete(indexes []string, options types.QueryOptions) ([]string, } var deletedIndexes struct { - Deleted []string + Deleted []string `json:"deleted"` } - + data, _ := json.Marshal(&body{indexes}) + fmt.Printf("|%s|\n", data) + fmt.Printf("|%s|\n", res.Result) err := json.Unmarshal(res.Result, &deletedIndexes) if err != nil { return nil, types.NewError(fmt.Sprintf("Unable to parse response: %s\n%s", err.Error(), res.Result), 500) diff --git a/index/refreshInternal.go b/index/refreshInternal.go deleted file mode 100644 index 60c14c0f..00000000 --- a/index/refreshInternal.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2015-2018 Kuzzle -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package index - -import "github.com/kuzzleio/sdk-go/types" - -// RefreshInternal action forces a refresh, on the internal index, -// making the documents available to search immediately. -func (i *Index) RefreshInternal(options types.QueryOptions) error { - - result := make(chan *types.KuzzleResponse) - - query := &types.KuzzleRequest{ - Controller: "index", - Action: "refreshInternal", - } - go i.kuzzle.Query(query, options, result) - - res := <-result - - if res.Error.Error() != "" { - return res.Error - } - return nil -} diff --git a/index/setAutoRefresh_test.go b/index/setAutoRefresh_test.go deleted file mode 100644 index 03bb84cf..00000000 --- a/index/setAutoRefresh_test.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2015-2018 Kuzzle -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package index_test - -import ( - "encoding/json" - "fmt" - "testing" - - "github.com/kuzzleio/sdk-go/index" - "github.com/kuzzleio/sdk-go/internal" - "github.com/kuzzleio/sdk-go/kuzzle" - "github.com/kuzzleio/sdk-go/protocol/websocket" - "github.com/kuzzleio/sdk-go/types" - "github.com/stretchr/testify/assert" -) - -func TestSetAutoRefreshNull(t *testing.T) { - k, _ := kuzzle.NewKuzzle(&internal.MockedConnection{}, nil) - i := index.NewIndex(k) - err := i.SetAutoRefresh("", true, nil) - assert.NotNil(t, err) -} - -func TestSetAutoRefreshQueryError(t *testing.T) { - c := &internal.MockedConnection{ - MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - return &types.KuzzleResponse{Error: types.KuzzleError{Message: "error"}} - }, - } - k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - err := i.SetAutoRefresh("index", true, nil) - assert.NotNil(t, err) -} - -func TestSetAutoRefresh(t *testing.T) { - type ackResult struct { - Acknowledged bool - ShardsAcknowledged bool - } - - c := &internal.MockedConnection{ - MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { - q := &types.KuzzleRequest{} - json.Unmarshal(query, q) - - assert.Equal(t, "index", q.Controller) - assert.Equal(t, "setAutoRefresh", q.Action) - assert.Equal(t, "index", q.Index) - - return &types.KuzzleResponse{Result: []byte(`true`)} - }, - } - k, _ := kuzzle.NewKuzzle(c, nil) - i := index.NewIndex(k) - err := i.SetAutoRefresh("index", true, nil) - - assert.Nil(t, err) -} - -func ExampleIndex_SetAutoRefresh() { - conn := websocket.NewWebSocket("localhost:7512", nil) - k, _ := kuzzle.NewKuzzle(conn, nil) - i := index.NewIndex(k) - err := i.SetAutoRefresh("index", true, nil) - if err != nil { - fmt.Println(err.Error()) - return - } -} diff --git a/kuzzle/kuzzle.go b/kuzzle/kuzzle.go index 43f6b980..e8b56112 100644 --- a/kuzzle/kuzzle.go +++ b/kuzzle/kuzzle.go @@ -33,7 +33,7 @@ import ( ) const ( - version = "2.0.3" + version = "go@3.0.0" MAX_CONNECT_RETRY = 10 ) diff --git a/kuzzle/query.go b/kuzzle/query.go index f974dd38..4bfcb984 100644 --- a/kuzzle/query.go +++ b/kuzzle/query.go @@ -47,12 +47,12 @@ func (k *Kuzzle) Query(query *types.KuzzleRequest, options types.QueryOptions, r mapped := make(map[string]interface{}) _ = json.Unmarshal(query.Volatile, &mapped) - mapped["sdkVersion"] = version + mapped["sdkName"] = version query.Volatile, _ = json.Marshal(mapped) } else { - vol := fmt.Sprintf(`{"sdkVersion": "%s"}`, version) + vol := fmt.Sprintf(`{"sdkName": "%s"}`, version) query.Volatile = types.VolatileData(vol) } diff --git a/kuzzle/query_test.go b/kuzzle/query_test.go index f4b8d875..dccc6e28 100644 --- a/kuzzle/query_test.go +++ b/kuzzle/query_test.go @@ -96,7 +96,7 @@ func TestQueryWithOptions(t *testing.T) { func TestQueryWithVolatile(t *testing.T) { var k *kuzzle.Kuzzle - var volatileData = types.VolatileData(`{"modifiedBy":"awesome me","reason":"it needed to be modified","sdkVersion":"2.0.3"}`) + var volatileData = types.VolatileData(`{"modifiedBy":"awesome me","reason":"it needed to be modified","sdkName":"go@3.0.0"}`) c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { diff --git a/package-lock.json b/package-lock.json index de91bef3..fad5c298 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,92 +2,208 @@ "requires": true, "lockfileVersion": 1, "dependencies": { - "@babel/runtime": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz", - "integrity": "sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==", + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, "requires": { - "regenerator-runtime": "^0.13.2" + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" } }, "@oclif/command": { - "version": "1.5.19", - "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.5.19.tgz", - "integrity": "sha512-6+iaCMh/JXJaB2QWikqvGE9//wLEVYYwZd5sud8aLoLKog1Q75naZh2vlGVtg5Mq/NqpqGQvdIjJb3Bm+64AUQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.0.tgz", + "integrity": "sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==", + "dev": true, "requires": { - "@oclif/config": "^1", - "@oclif/errors": "^1.2.2", + "@oclif/config": "^1.15.1", + "@oclif/errors": "^1.3.3", "@oclif/parser": "^3.8.3", - "@oclif/plugin-help": "^2", + "@oclif/plugin-help": "^3", "debug": "^4.1.1", - "semver": "^5.6.0" + "semver": "^7.3.2" } }, "@oclif/config": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.13.3.tgz", - "integrity": "sha512-qs5XvGRw+1M41abOKCjd0uoeHCgsMxa2MurD2g2K8CtQlzlMXl0rW5idVeimIg5208LLuxkfzQo8TKAhhRCWLg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.17.0.tgz", + "integrity": "sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==", + "dev": true, "requires": { + "@oclif/errors": "^1.3.3", "@oclif/parser": "^3.8.0", "debug": "^4.1.1", - "tslib": "^1.9.3" + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" } }, "@oclif/errors": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.2.2.tgz", - "integrity": "sha512-Eq8BFuJUQcbAPVofDxwdE0bL14inIiwt5EaKRVY9ZDIG11jwdXZqiQEECJx0VfnLyUZdYfRd/znDI/MytdJoKg==", - "requires": { - "clean-stack": "^1.3.0", - "fs-extra": "^7.0.0", - "indent-string": "^3.2.0", - "strip-ansi": "^5.0.0", - "wrap-ansi": "^4.0.0" + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.4.tgz", + "integrity": "sha512-pJKXyEqwdfRTUdM8n5FIHiQQHg5ETM0Wlso8bF9GodczO40mF5Z3HufnYWJE7z8sGKxOeJCdbAVZbS8Y+d5GCw==", + "dev": true, + "requires": { + "clean-stack": "^3.0.0", + "fs-extra": "^8.1", + "indent-string": "^4.0.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "@oclif/linewrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz", - "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" + "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==", + "dev": true }, "@oclif/parser": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.4.tgz", - "integrity": "sha512-cyP1at3l42kQHZtqDS3KfTeyMvxITGwXwH1qk9ktBYvqgMp5h4vHT+cOD74ld3RqJUOZY/+Zi9lb4Tbza3BtuA==", + "version": "3.8.5", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.5.tgz", + "integrity": "sha512-yojzeEfmSxjjkAvMRj0KzspXlMjCfBzNRPkWw8ZwOSoNWoJn+OCS/m/S+yfV6BvAM4u2lTzX9Y5rCbrFIgkJLg==", + "dev": true, "requires": { + "@oclif/errors": "^1.2.2", "@oclif/linewrap": "^1.0.0", "chalk": "^2.4.2", "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "@oclif/plugin-help": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-2.2.3.tgz", - "integrity": "sha512-bGHUdo5e7DjPJ0vTeRBMIrfqTRDBfyR5w0MP41u0n3r7YG5p14lvMmiCXxi6WDaP2Hw5nqx3PnkAIntCKZZN7g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-3.2.2.tgz", + "integrity": "sha512-SPZ8U8PBYK0n4srFjCLedk0jWU4QlxgEYLCXIBShJgOwPhTTQknkUlsEwaMIevvCU4iCQZhfMX+D8Pz5GZjFgA==", + "dev": true, "requires": { - "@oclif/command": "^1.5.13", - "chalk": "^2.4.1", + "@oclif/command": "^1.5.20", + "@oclif/config": "^1.15.1", + "@oclif/errors": "^1.2.2", + "chalk": "^4.1.0", "indent-string": "^4.0.0", "lodash.template": "^4.4.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0", - "widest-line": "^2.0.1", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", "wrap-ansi": "^4.0.0" }, "dependencies": { - "indent-string": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "has-flag": "^4.0.0" + } + }, + "wrap-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz", + "integrity": "sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } } } @@ -95,12 +211,14 @@ "@oclif/screen": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@oclif/screen/-/screen-1.0.4.tgz", - "integrity": "sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw==" + "integrity": "sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw==", + "dev": true }, "@samverschueren/stream-to-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", - "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", + "integrity": "sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==", + "dev": true, "requires": { "any-observable": "^0.3.0" } @@ -109,57 +227,69 @@ "version": "0.14.2", "resolved": "https://registry.npmjs.org/@types/listr/-/listr-0.14.2.tgz", "integrity": "sha512-wCipMbQr3t2UHTm90LldVp+oTBj1TX6zvpkCJcWS4o8nn6kS8SN93oUvKJAgueIRZ5M36yOlFmScqBxYH8Ajig==", + "dev": true, "requires": { "@types/node": "*", "rxjs": "^6.5.1" } }, "@types/node": { - "version": "13.1.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.6.tgz", - "integrity": "sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg==" + "version": "14.14.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.25.tgz", + "integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==", + "dev": true }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, "requires": { "mime-types": "~2.1.24", "negotiator": "0.6.2" } }, "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "ansicolors": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=" + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true }, "any-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", - "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==" + "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", + "dev": true }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -167,20 +297,29 @@ "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true }, "axios": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz", - "integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, "requires": { - "follow-redirects": "1.5.10" + "follow-redirects": "^1.10.0" } }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, "requires": { "bytes": "3.1.0", "content-type": "~1.0.4", @@ -198,6 +337,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -205,19 +345,31 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true }, "cardinal": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "dev": true, "requires": { "ansicolors": "~0.3.2", "redeyed": "~2.1.0" @@ -227,38 +379,84 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "clean-stack": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", - "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "dev": true, + "requires": { + "escape-string-regexp": "4.0.0" + } }, "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "^3.1.0" } }, "cli-progress": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.5.0.tgz", - "integrity": "sha512-S1wR4xfcfLWbVBH6RwYat1nMCm2UsuygxNoiRYVAXQsuWKjCRgWRZVohXLmsWfiuAK0FFf7t9OyZ2JBmDWaQGA==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.9.0.tgz", + "integrity": "sha512-g7rLWfhAo/7pF+a/STFH/xPyosaL1zgADhI0OM83hl3c7S43iGvJWEAV2QuDOnQ8i6EMBj/u4+NTd0d5L+4JfA==", + "dev": true, "requires": { "colors": "^1.1.2", - "string-width": "^2.1.1" + "string-width": "^4.2.0" } }, "cli-truncate": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "dev": true, "requires": { "slice-ansi": "0.0.4", "string-width": "^1.0.1" @@ -267,12 +465,14 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -281,6 +481,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -291,6 +492,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -298,87 +500,104 @@ } }, "cli-ux": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/cli-ux/-/cli-ux-5.4.1.tgz", - "integrity": "sha512-x5CJXJPKBrEo6o8Uy/Upajb9OWYMhTzOpRvKZyZ68kkHysiGd9phGP71WyHZfLUkhwdvpNUFkY2tsDr0ogyocg==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/cli-ux/-/cli-ux-5.5.1.tgz", + "integrity": "sha512-t3DT1U1C3rArLGYLpKa3m9dr/8uKZRI8HRm/rXKL7UTjm4c+Yd9zHNWg1tP8uaJkUbhmvx5SQHwb3VWpPUVdHQ==", + "dev": true, "requires": { - "@oclif/command": "^1.5.1", + "@oclif/command": "^1.6.0", "@oclif/errors": "^1.2.1", "@oclif/linewrap": "^1.0.0", "@oclif/screen": "^1.0.3", - "ansi-escapes": "^3.1.0", - "ansi-styles": "^3.2.1", + "ansi-escapes": "^4.3.0", + "ansi-styles": "^4.2.0", "cardinal": "^2.1.1", - "chalk": "^2.4.1", - "clean-stack": "^2.0.0", + "chalk": "^4.1.0", + "clean-stack": "^3.0.0", "cli-progress": "^3.4.0", - "extract-stack": "^1.0.0", - "fs-extra": "^7.0.1", + "extract-stack": "^2.0.0", + "fs-extra": "^8.1", "hyperlinker": "^1.0.0", "indent-string": "^4.0.0", - "is-wsl": "^1.1.0", + "is-wsl": "^2.2.0", "js-yaml": "^3.13.1", "lodash": "^4.17.11", "natural-orderby": "^2.0.1", + "object-treeify": "^1.1.4", "password-prompt": "^1.1.2", - "semver": "^5.6.0", - "string-width": "^3.1.0", - "strip-ansi": "^5.1.0", - "supports-color": "^5.5.0", - "supports-hyperlinks": "^1.0.1", - "treeify": "^1.1.0", - "tslib": "^1.9.3" + "semver": "^7.3.2", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "supports-color": "^7.1.0", + "supports-hyperlinks": "^2.1.0", + "tslib": "^2.0.0" }, "dependencies": { - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "indent-string": { + "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "has-flag": "^4.0.0" } } } }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, "requires": { "safe-buffer": "5.1.2" } @@ -386,121 +605,148 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true }, "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "date-fns": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", + "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true }, "elegant-spinner": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", + "dev": true }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true }, "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true }, "execa": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.0.tgz", - "integrity": "sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA==", - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" }, "dependencies": { "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", - "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -510,12 +756,14 @@ "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -523,12 +771,14 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -539,6 +789,7 @@ "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, "requires": { "accepts": "~1.3.7", "array-flatten": "1.1.1", @@ -576,6 +827,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -583,28 +835,82 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extract-stack": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/extract-stack/-/extract-stack-1.0.0.tgz", - "integrity": "sha1-uXrK+UQe6iMyUpYktzL8WhyBZfo=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/extract-stack/-/extract-stack-2.0.0.tgz", + "integrity": "sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ==", + "dev": true + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fastq": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.1.tgz", + "integrity": "sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } }, "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" } }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -619,6 +925,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -626,70 +933,80 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", + "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", + "dev": true }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true }, "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, "requires": { - "graceful-fs": "^4.1.2", + "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", + "integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==", + "dev": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "dev": true, "requires": { - "pump": "^3.0.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.5.tgz", + "integrity": "sha512-kBBSQbz2K0Nyn+31j/w36fUfxkBW9/gfwRWdUY1ULReH3iokVJgddZAFcD1D0xlgTmFxJCbUkUclAlc6/IDJkw==", + "dev": true }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" }, @@ -697,19 +1014,22 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true } } }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, "requires": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -719,75 +1039,172 @@ } }, "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true }, "hyperlinker": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", - "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==" + "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==", + "dev": true }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, "is-observable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", + "dev": true, "requires": { "symbol-observable": "^1.1.0" } }, "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true }, "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -797,32 +1214,37 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, "requires": { "graceful-fs": "^4.1.6" } }, "kuzdoc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/kuzdoc/-/kuzdoc-1.2.2.tgz", - "integrity": "sha512-QXw4dVIh4dRoD/9Vz9tbpfKNT9Y0AEORJyRHIwKuHaxH65Ccr7KHwxSTbJokK/PV4PebRDO96sPodEc/4NrxbQ==", - "requires": { - "@oclif/command": "^1.5.19", - "@oclif/config": "^1.13.3", - "@oclif/plugin-help": "^2.2.3", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/kuzdoc/-/kuzdoc-1.4.5.tgz", + "integrity": "sha512-jppgIJZEyAoOTr/Nd6CcFyLyfskNFzepeJ2KAfD5N5irEYJdGIZGlNgucFhsD8aPPKgbEC4HObaBj3A5Jwi3JQ==", + "dev": true, + "requires": { + "@oclif/command": "^1.8.0", + "@oclif/config": "^1.17.0", + "@oclif/errors": "^1.3.4", + "@oclif/plugin-help": "^3.2.1", "@types/listr": "^0.14.2", - "axios": "^0.19.0", - "cli-ux": "^5.4.1", - "execa": "^4.0.0", + "axios": "^0.21.1", + "cli-ux": "^5.5.1", + "execa": "^5.0.0", "express": "^4.17.1", + "inquirer": "^7.3.3", "listr": "^0.14.3", - "tslib": "^1.10.0", - "yaml": "^1.7.2" + "tslib": "^2.1.0", + "yaml": "^1.10.0" } }, "listr": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", + "dev": true, "requires": { "@samverschueren/stream-to-observable": "^0.3.0", "is-observable": "^1.1.0", @@ -838,19 +1260,22 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true } } }, "listr-silent-renderer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", + "dev": true }, "listr-update-renderer": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", + "dev": true, "requires": { "chalk": "^1.1.3", "cli-truncate": "^0.2.1", @@ -865,17 +1290,20 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -884,10 +1312,33 @@ "supports-color": "^2.0.0" } }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -895,7 +1346,8 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true } } }, @@ -903,6 +1355,7 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", + "dev": true, "requires": { "chalk": "^2.4.1", "cli-cursor": "^2.1.0", @@ -910,30 +1363,74 @@ "figures": "^2.0.0" }, "dependencies": { + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } } } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true }, "lodash.template": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, "requires": { "lodash._reinterpolate": "^3.0.0", "lodash.templatesettings": "^4.0.0" @@ -943,6 +1440,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, "requires": { "lodash._reinterpolate": "^3.0.0" } @@ -951,6 +1449,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, "requires": { "chalk": "^1.0.0" }, @@ -958,17 +1457,20 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -977,10 +1479,17 @@ "supports-color": "^2.0.0" } }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -988,7 +1497,8 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true } } }, @@ -996,21 +1506,80 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", + "dev": true, "requires": { "ansi-escapes": "^3.0.0", "cli-cursor": "^2.0.0", "wrap-ansi": "^3.0.1" }, "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -1019,6 +1588,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", + "dev": true, "requires": { "string-width": "^2.1.1", "strip-ansi": "^4.0.0" @@ -1026,73 +1596,117 @@ } } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true }, "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", + "dev": true }, "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "dev": true, "requires": { - "mime-db": "1.43.0" + "mime-db": "1.45.0" } }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true }, "natural-orderby": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/natural-orderby/-/natural-orderby-2.0.3.tgz", - "integrity": "sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q==" + "integrity": "sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q==", + "dev": true }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, "requires": { "path-key": "^3.0.0" }, @@ -1100,105 +1714,134 @@ "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true } } }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-treeify": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.31.tgz", + "integrity": "sha512-kt2UuyHDTH+J6w0pv2c+3uuEApGuwgfjWogbqPWAvk4nOM/T3No0SzDtp6CuJ/XBUy//nFNuerb8ms7CqjD9Tw==", + "dev": true }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, "requires": { "ee-first": "1.1.1" } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, "requires": { "mimic-fn": "^2.1.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-map": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true }, "password-prompt": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.1.2.tgz", "integrity": "sha512-bpuBhROdrhuN3E7G/koAju0WjVw9/uQOG5Co5mokNj0MiOSBVZS1JTwM4zl55hu0WFmIEFvO9cU9sJQiBIYeIA==", + "dev": true, "requires": { "ansi-escapes": "^3.1.0", "cross-spawn": "^6.0.5" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + } } }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "dev": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "ipaddr.js": "1.9.1" } }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, "requires": { "bytes": "3.1.0", "http-errors": "1.7.2", @@ -1210,66 +1853,82 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "dev": true, "requires": { "esprima": "~4.0.0" } }, - "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" - }, "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, "requires": { - "onetime": "^2.0.0", + "onetime": "^5.1.0", "signal-exit": "^3.0.2" - }, - "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - } - } } }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", + "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", + "dev": true + }, "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, "requires": { "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -1290,6 +1949,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" }, @@ -1297,14 +1957,16 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -1312,6 +1974,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -1322,12 +1985,14 @@ "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -1335,113 +2000,154 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true }, "slice-ansi": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "requires": { "has-flag": "^3.0.0" } }, "supports-hyperlinks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", - "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "dev": true, "requires": { - "has-flag": "^2.0.0", - "supports-color": "^5.0.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" }, "dependencies": { "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==" + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "dev": true + }, + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -1450,76 +2156,68 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, "requires": { "isexe": "^2.0.0" } }, "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, "requires": { - "string-width": "^2.1.1" + "string-width": "^4.0.0" } }, "wrap-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz", - "integrity": "sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "yaml": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", - "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==", - "requires": { - "@babel/runtime": "^7.6.3" - } + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true } - } + }, + "version": "3.0.0" } diff --git a/package.json b/package.json index f28f42e5..2d17f699 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,15 @@ { "scripts": { - "doc-prepare": "kuzdoc framework:install --destination .doc/", - "doc-dev": "kuzdoc repo:dev -b .doc/ -d /sdk/go/2/ -v 2", - "doc-build": "kuzdoc repo:build -b .doc/ -d /sdk/go/2/ -v 2", - "doc-upload": "kuzdoc repo:deploy -b .doc/ -d /sdk/go/2/ -v 2", - "doc-cloudfront": "kuzdoc repo:cloudfront -d /sdk/go/2/", + "doc-prepare": "kuzdoc framework:install -d .doc/", + "doc-dev": "kuzdoc repo:dev -b .doc/ -d /sdk/go/3/ -v 3", + "doc-build": "kuzdoc repo:build -b .doc/ -d /sdk/go/3/ -v 3", + "doc-upload": "kuzdoc repo:deploy -b .doc/ -d /sdk/go/3/ -v 3", + "doc-cloudfront": "kuzdoc repo:cloudfront -d /sdk/go/3/*", "doc-deploy": "npm run doc-upload && npm run doc-cloudfront", - "doc-netlify": "npm run doc-prepare && kuzdoc repo:build -b .doc/ -d / -v 2" + "doc-netlify": "npm run doc-prepare && kuzdoc repo:build -b .doc/ -d / -v 3" }, - "dependencies": { - "kuzdoc": "^1.2.2" - } + "devDependencies": { + "kuzdoc": "^1.4.5" + }, + "version": "3.0.0" }