Socket
Socket
Sign inDemoInstall

kourou

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kourou - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

lib/commands/document/create.d.ts

22

lib/commands/api-key/create.js

@@ -19,18 +19,10 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
const request = {
controller: 'security',
action: 'createApiKey',
_id: userFlags.id,
userId: args.user,
expiresIn: userFlags.expire,
refresh: 'wait_for',
body: {
description: userFlags.description,
},
};
await sdk.init(this.log);
try {
const { result } = await sdk.query(request);
this.log(`Successfully created API Key "${result._id}" for user "${args.user}"`);
this.log(result._source.token);
const apiKey = await sdk.security.createApiKey(args.user, userFlags.description, {
_id: userFlags.id,
expiresIn: userFlags.expire
});
this.log(`Successfully created API Key "${apiKey._id}" for user "${args.user}"`);
this.log(apiKey._source.token);
}

@@ -37,0 +29,0 @@ catch (error) {

@@ -19,13 +19,6 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
const request = {
controller: 'security',
action: 'deleteApiKey',
refresh: 'wait_for',
_id: userFlags.id,
userId: args.user,
};
await sdk.init(this.log);
try {
const { result } = await sdk.query(request);
this.log(`Successfully deleted API Key "${result._id}" of user "${args.user}"`);
await sdk.security.deleteApiKey(args.user, userFlags.id);
this.log(`Successfully deleted API Key "${userFlags.id}" of user "${args.user}"`);
}

@@ -32,0 +25,0 @@ catch (error) {

@@ -19,13 +19,6 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
const request = {
controller: 'security',
action: 'searchApiKeys',
userId: args.user,
body: {},
from: 0,
size: 100,
};
await sdk.init(this.log);
let query = {};
if (userFlags.filter) {
request.body = {
query = {
match: {

@@ -37,3 +30,6 @@ description: userFlags.filter,

try {
const { result } = await sdk.query(request);
const result = await sdk.security.searchApiKeys(args.user, query, {
from: 0,
size: 100
});
this.log(`${result.total} API Keys found for user ${args.user}`);

@@ -40,0 +36,0 @@ if (result.total !== 0) {

@@ -24,3 +24,3 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
await sdk.init(this.log);
this.log(chalk_1.default.green(`Dumping collection "${args.index}:${args.collection}" in ${path}/ ...`));

@@ -27,0 +27,0 @@ fs.mkdirSync(path, { recursive: true });

@@ -24,3 +24,3 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
await sdk.init(this.log);
this.log(chalk_1.default.green(`[✔] Start importing dump from ${args.path}`));

@@ -27,0 +27,0 @@ try {

@@ -19,3 +19,3 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
await sdk.init(this.log);
try {

@@ -22,0 +22,0 @@ const document = await sdk.document.get(args.index, args.collection, args.id);

@@ -25,3 +25,3 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
await sdk.init(this.log);
this.log(chalk_1.default.green(`Dumping index "${args.index}" in ${path}/ ...`));

@@ -28,0 +28,0 @@ fs.mkdirSync(path, { recursive: true });

@@ -24,3 +24,3 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
await sdk.init(this.log);
if (index) {

@@ -27,0 +27,0 @@ this.log(chalk_1.default.green(`[✔] Start importing dump from ${args.path} in index ${index}`));

@@ -8,3 +8,2 @@ "use strict";

const cli_ux_1 = tslib_1.__importDefault(require("cli-ux"));
const compare_version_1 = tslib_1.__importDefault(require("compare-version"));
const execa_1 = tslib_1.__importDefault(require("execa"));

@@ -158,3 +157,3 @@ const fs_1 = require("fs");

try {
if (compare_version_1.default(docoVersion, MIN_DOCO_VERSION) === -1) {
if (docoVersion < MIN_DOCO_VERSION) {
throw new Error(`The detected version of docker-compose (${docoVersion}) is not recent enough (${MIN_DOCO_VERSION})`);

@@ -161,0 +160,0 @@ }

@@ -5,2 +5,3 @@ import { flags } from '@oclif/command';

static description: string;
static examples: string[];
static flags: {

@@ -14,3 +15,3 @@ host: flags.IOptionFlag<string>;

arg: flags.IOptionFlag<string[]>;
body: flags.IOptionFlag<string | undefined>;
body: flags.IOptionFlag<string>;
};

@@ -17,0 +18,0 @@ static args: {

@@ -21,11 +21,13 @@ "use strict";

const sdk = new kuzzle_1.KuzzleSDK(userFlags);
await sdk.init();
await sdk.init(this.log);
const [controller, action] = args['controller:action'].split(':');
const requestArgs = {};
for (const keyValue of userFlags.arg || []) {
const [key, value] = keyValue.split(':');
requestArgs[key] = value;
const [key, ...value] = keyValue.split('=');
requestArgs[key] = value.join();
}
// try to read stdin, otherwise use the "body" flag
const body = await this.fromStdin(userFlags.body);
const request = Object.assign(Object.assign({ controller,
action }, requestArgs), { body: JSON.parse(userFlags.body || '{}') });
action }, requestArgs), { body });
try {

@@ -37,3 +39,3 @@ const response = await sdk.query(request);

catch (error) {
this.logError(error.message);
this.logError(`${error.stack || error.message}\n\tstatus: ${error.status}\n\tid: ${error.id}`);
}

@@ -43,7 +45,15 @@ }

Query.description = 'Executes an API query';
Query.examples = [
'kourou query document:get --arg index=iot --arg collection=sensors --arg _id=sigfox-42',
'kourou query collection:create --arg index=iot --arg collection=sensors --body \'{dynamic: "strict"}\'',
'kourou query admin:loadMappings < mappings.json',
'echo \'{name: "Aschen"}\' | kourou query document:create --arg index=iot --arg collection=sensors'
];
Query.flags = Object.assign({ help: command_1.flags.help(), arg: command_1.flags.string({
description: 'Additional argument. Repeatable. (eg: "--arg refresh:wait_for")',
char: 'a',
description: 'Additional argument. Repeatable. (e.g. "-a refresh=wait_for")',
multiple: true
}), body: command_1.flags.string({
description: 'Request body in JSON format.'
description: 'Request body in JS or JSON format. Will be read from STDIN if available.',
default: '{}'
}) }, kuzzle_1.kuzzleFlags);

@@ -50,0 +60,0 @@ Query.args = [

@@ -6,2 +6,12 @@ import { Command } from '@oclif/command';

logError(message?: string | undefined, ...args: any[]): void;
/**
* Reads a value from STDIN or return the default value.
* This method can parse both JSON string and JS string
*
* @param {String} defaultValue - Default value if nothing is written on STDIN
*
* @returns {Promise<String>} Parsed input
*/
fromStdin(defaultValue: string): Promise<unknown>;
_parseInput(input: string): any;
}

@@ -7,2 +7,3 @@ "use strict";

const node_emoji_1 = tslib_1.__importDefault(require("node-emoji"));
const fs_1 = tslib_1.__importDefault(require("fs"));
class Kommand extends command_1.Command {

@@ -19,5 +20,28 @@ printCommand() {

logError(message, ...args) {
return this.log(chalk_1.default.red(message), ...args);
return this.error(chalk_1.default.red(message), ...args);
}
/**
* Reads a value from STDIN or return the default value.
* This method can parse both JSON string and JS string
*
* @param {String} defaultValue - Default value if nothing is written on STDIN
*
* @returns {Promise<String>} Parsed input
*/
fromStdin(defaultValue) {
return new Promise(resolve => {
// cucumber mess with stdin so I have to do this trick
if (process.env.NODE_ENV === 'test' || process.stdin.isTTY) {
resolve(this._parseInput(defaultValue));
return;
}
const input = fs_1.default.readFileSync(0, 'utf8');
resolve(this._parseInput(input));
});
}
_parseInput(input) {
// eslint-disable-next-line no-eval
return eval(`var o = ${input}; o`);
}
}
exports.Kommand = Kommand;

@@ -17,3 +17,3 @@ import { flags } from '@oclif/command';

constructor(options: any);
init(): Promise<void>;
init(log: any): Promise<void>;
query(request: any): any;

@@ -23,2 +23,3 @@ get document(): any;

get index(): any;
get security(): any;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const command_1 = require("@oclif/command");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
// tslint:disable-next-line

@@ -38,3 +40,3 @@ const { Http, Kuzzle } = require('kuzzle-sdk');

}
async init() {
async init(log) {
this.sdk = new Kuzzle(new Http(this.host, {

@@ -44,8 +46,10 @@ port: this.port,

}));
log(chalk_1.default.green(`[ℹ] Connecting to http${this.ssl ? 's' : ''}://${this.host}:${this.port} ...`));
await this.sdk.connect();
if (this.username !== 'anonymous') {
await this.sdk.auth.login('local', {
const credentials = {
username: this.username,
password: this.password,
});
};
await this.sdk.auth.login('local', credentials, '60s');
}

@@ -65,3 +69,6 @@ }

}
get security() {
return this.sdk.security;
}
}
exports.KuzzleSDK = KuzzleSDK;

@@ -1,2 +0,2 @@

export declare function restoreCollectionData(sdk: any, log: any, batchSize: number, dumpDir: string, index?: string, collection?: string): Promise<unknown>;
export declare function restoreCollectionData(sdk: any, log: any, batchSize: number, dumpDir: string, index?: string, collection?: string): Promise<void>;
/**

@@ -13,9 +13,7 @@ * Imports mappings from a collection mappings dump

*
* @param sdk - Kuzzle SDK instance
* @param dumpDir - Path to the collection dump dir
* @param index - Override index name
* @param collection - Override collection name
*
* @returns {Promise}
* @param {Kuzzle} sdk - Kuzzle SDK instance
* @param {String} dumpDir - Path to the collection dump dir
* @param {String} index - Override index name
* @param {String} collection - Override collection name
*/
export declare function restoreCollectionMappings(sdk: any, dumpDir: string, index?: string, collection?: string): Promise<any>;

@@ -36,3 +36,3 @@ "use strict";

};
return new Promise((resolve, reject) => {
await new Promise((resolve, reject) => {
let total = 0;

@@ -101,2 +101,4 @@ let headerSkipped = false;

});
const count = await sdk.document.count(mWriteRequest.index, mWriteRequest.collection);
log(chalk_1.default.green(`[ℹ] Successfully imported ${count} documents in "${mWriteRequest.index}:${mWriteRequest.collection}"`));
}

@@ -115,8 +117,6 @@ exports.restoreCollectionData = restoreCollectionData;

*
* @param sdk - Kuzzle SDK instance
* @param dumpDir - Path to the collection dump dir
* @param index - Override index name
* @param collection - Override collection name
*
* @returns {Promise}
* @param {Kuzzle} sdk - Kuzzle SDK instance
* @param {String} dumpDir - Path to the collection dump dir
* @param {String} index - Override index name
* @param {String} collection - Override collection name
*/

@@ -123,0 +123,0 @@ async function restoreCollectionMappings(sdk, dumpDir, index, collection) {

@@ -1,1 +0,1 @@

{"version":"0.7.0","commands":{"query":{"id":"query","description":"Executes an API query","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"arg":{"name":"arg","type":"option","description":"Additional argument. Repeatable. (eg: \"--arg refresh:wait_for\")"},"body":{"name":"body","type":"option","description":"Request body in JSON format."},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"controller:action","description":"Controller and action (eg: \"server:now\")","required":true}]},"api-key:create":{"id":"api-key:create","description":"Creates a new API Key for a user","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"description":{"name":"description","type":"option","char":"d","description":"API Key description","required":true},"id":{"name":"id","type":"option","description":"API Key unique ID"},"expire":{"name":"expire","type":"option","description":"API Key validity","default":"-1"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"user","description":"User kuid","required":true}]},"api-key:delete":{"id":"api-key:delete","description":"Deletes an API key.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"API Key unique ID"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"user","description":"User kuid","required":true}]},"api-key:search":{"id":"api-key:search","description":"Lists a user's API Keys.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"filter":{"name":"filter","type":"option","description":"Filter to match the API Key descriptions"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"user","description":"User kuid","required":true}]},"collection:dump":{"id":"collection:dump","description":"Dump an entire collection content (JSONL format)","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","description":"Dump root directory (default: index name)"},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsFetchCount config)","default":"2000"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true},{"name":"collection","description":"Collection name","required":true}]},"collection:restore":{"id":"collection:restore","description":"Restore the content of a previously dumped collection","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsWriteCount config)","default":"200"},"index":{"name":"index","type":"option","description":"If set, override the index destination name"},"collection":{"name":"collection","type":"option","description":"If set, override the collection destination name"},"no-mappings":{"name":"no-mappings","type":"boolean","description":"Skip collection mappings","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"path","description":"Dump directory path","required":true}]},"document:get":{"id":"document:get","description":"Gets a document","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true},{"name":"collection","description":"Collection name","required":true},{"name":"id","description":"Document ID","required":true}]},"es:get":{"id":"es:get","description":"Gets a document from ES","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Elasticsearch server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Elasticsearch server port","default":"9200"}},"args":[{"name":"index","description":"ES Index name","required":true},{"name":"id","description":"Document ID","required":true}]},"es:insert":{"id":"es:insert","description":"Inserts a document directly into ES (will replace if exists)","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"body":{"name":"body","type":"option","description":"Document body in JSON","default":"{}"},"id":{"name":"id","type":"option","description":"Document ID"},"host":{"name":"host","type":"option","char":"h","description":"Elasticsearch server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Elasticsearch server port","default":"9200"},"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false}},"args":[{"name":"index","description":"ES Index name","required":true}]},"es:list-index":{"id":"es:list-index","description":"Lists available ES indexes","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Elasticsearch server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Elasticsearch server port","default":"9200"},"grep":{"name":"grep","type":"option","char":"g","description":"Match output with pattern"}},"args":[]},"index:dump":{"id":"index:dump","description":"Dump an entire index content (JSONL format)","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","description":"Dump directory (default: index name)"},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsFetchCount config)","default":"2000"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true}]},"index:restore":{"id":"index:restore","description":"Restore the content of a previously dumped index","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsWriteCount config)","default":"200"},"index":{"name":"index","type":"option","description":"If set, override the index destination name"},"no-mappings":{"name":"no-mappings","type":"boolean","description":"Skip collections mappings","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"path","description":"Dump directory or file","required":true}]},"instance:logs":{"id":"instance:logs","description":"Displays the logs of a running Kuzzle","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"instance":{"name":"instance","type":"option","char":"i","description":"Kuzzle instance name"},"follow":{"name":"follow","type":"boolean","char":"f","description":"Follow log output","allowNo":false}},"args":[]},"instance:spawn":{"id":"instance:spawn","description":"Spawn a new Kuzzle instance","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"check":{"name":"check","type":"boolean","description":"Check prerequisite before running Kuzzle","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"Core-version of the instance to spawn","default":"2"}},"args":[]},"vault:add":{"id":"vault:add","description":"Adds an encrypted key to a secrets file","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"vault-key":{"name":"vault-key","type":"option","description":"Kuzzle Vault Key (or KUZZLE_VAULT_KEY)"}},"args":[{"name":"secrets-file","description":"Encrypted secrets file","required":true},{"name":"key","description":"Path to the key (lodash style)","required":true},{"name":"value","description":"Value to encrypt","required":true}]},"vault:encrypt":{"id":"vault:encrypt","description":"Encrypts an entire file.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the output file if it already exists","allowNo":false},"output-file":{"name":"output-file","type":"option","char":"o","description":"Output file (default: <file>.enc.json)"},"vault-key":{"name":"vault-key","type":"option","description":"Kuzzle Vault Key (or KUZZLE_VAULT_KEY)"}},"args":[{"name":"file","description":"File containing unencrypted secrets","required":true}]},"vault:show":{"id":"vault:show","description":"Prints an encrypted key.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"vault-key":{"name":"vault-key","type":"option","description":"Kuzzle Vault Key (or KUZZLE_VAULT_KEY)"}},"args":[{"name":"secrets-file","description":"Encrypted secrets file","required":true},{"name":"key","description":"Path to the key (lodash style)","required":true}]}}}
{"version":"0.8.0","commands":{"query":{"id":"query","description":"Executes an API query","pluginName":"kourou","pluginType":"core","aliases":[],"examples":["kourou query document:get --arg index=iot --arg collection=sensors --arg _id=sigfox-42","kourou query collection:create --arg index=iot --arg collection=sensors --body '{dynamic: \"strict\"}'","kourou query admin:loadMappings < mappings.json","echo '{name: \"Aschen\"}' | kourou query document:create --arg index=iot --arg collection=sensors"],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"arg":{"name":"arg","type":"option","char":"a","description":"Additional argument. Repeatable. (e.g. \"-a refresh=wait_for\")"},"body":{"name":"body","type":"option","description":"Request body in JS or JSON format. Will be read from STDIN if available.","default":"{}"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"controller:action","description":"Controller and action (eg: \"server:now\")","required":true}]},"api-key:create":{"id":"api-key:create","description":"Creates a new API Key for a user","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"description":{"name":"description","type":"option","char":"d","description":"API Key description","required":true},"id":{"name":"id","type":"option","description":"API Key unique ID"},"expire":{"name":"expire","type":"option","description":"API Key validity","default":"-1"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"user","description":"User kuid","required":true}]},"api-key:delete":{"id":"api-key:delete","description":"Deletes an API key.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"API Key unique ID"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"user","description":"User kuid","required":true}]},"api-key:search":{"id":"api-key:search","description":"Lists a user's API Keys.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"filter":{"name":"filter","type":"option","description":"Filter to match the API Key descriptions"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"user","description":"User kuid","required":true}]},"collection:dump":{"id":"collection:dump","description":"Dump an entire collection content (JSONL format)","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","description":"Dump root directory (default: index name)"},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsFetchCount config)","default":"2000"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true},{"name":"collection","description":"Collection name","required":true}]},"collection:restore":{"id":"collection:restore","description":"Restore the content of a previously dumped collection","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsWriteCount config)","default":"200"},"index":{"name":"index","type":"option","description":"If set, override the index destination name"},"collection":{"name":"collection","type":"option","description":"If set, override the collection destination name"},"no-mappings":{"name":"no-mappings","type":"boolean","description":"Skip collection mappings","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"path","description":"Dump directory path","required":true}]},"document:create":{"id":"document:create","description":"Creates a document","pluginName":"kourou","pluginType":"core","aliases":[],"examples":["kourou document:create iot sensors --body '{network: \"sigfox\"}'","kourou document:create iot sensors < document.json"],"flags":{"body":{"name":"body","type":"option","description":"Document body in JS or JSON format. Will be read from STDIN if available","default":"{}"},"id":{"name":"id","type":"option","description":"Optional document ID"},"replace":{"name":"replace","type":"boolean","description":"Replaces the document if it already exists","allowNo":false},"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true},{"name":"collection","description":"Collection name","required":true}]},"document:get":{"id":"document:get","description":"Gets a document","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true},{"name":"collection","description":"Collection name","required":true},{"name":"id","description":"Document ID","required":true}]},"es:get":{"id":"es:get","description":"Gets a document from ES","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Elasticsearch server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Elasticsearch server port","default":"9200"}},"args":[{"name":"index","description":"ES Index name","required":true},{"name":"id","description":"Document ID","required":true}]},"es:insert":{"id":"es:insert","description":"Inserts a document directly into ES (will replace if exists)","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"body":{"name":"body","type":"option","description":"Document body in JSON","default":"{}"},"id":{"name":"id","type":"option","description":"Document ID"},"host":{"name":"host","type":"option","char":"h","description":"Elasticsearch server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Elasticsearch server port","default":"9200"},"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false}},"args":[{"name":"index","description":"ES Index name","required":true}]},"es:list-index":{"id":"es:list-index","description":"Lists available ES indexes","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Elasticsearch server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Elasticsearch server port","default":"9200"},"grep":{"name":"grep","type":"option","char":"g","description":"Match output with pattern"}},"args":[]},"index:dump":{"id":"index:dump","description":"Dump an entire index content (JSONL format)","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","description":"Dump directory (default: index name)"},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsFetchCount config)","default":"2000"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"index","description":"Index name","required":true}]},"index:restore":{"id":"index:restore","description":"Restore the content of a previously dumped index","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsWriteCount config)","default":"200"},"index":{"name":"index","type":"option","description":"If set, override the index destination name"},"no-mappings":{"name":"no-mappings","type":"boolean","description":"Skip collections mappings","allowNo":false},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"path","description":"Dump directory or file","required":true}]},"instance:logs":{"id":"instance:logs","description":"Displays the logs of a running Kuzzle","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"instance":{"name":"instance","type":"option","char":"i","description":"Kuzzle instance name"},"follow":{"name":"follow","type":"boolean","char":"f","description":"Follow log output","allowNo":false}},"args":[]},"instance:spawn":{"id":"instance:spawn","description":"Spawn a new Kuzzle instance","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"check":{"name":"check","type":"boolean","description":"Check prerequisite before running Kuzzle","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"Core-version of the instance to spawn","default":"2"}},"args":[]},"profile:dump":{"id":"profile:dump","description":"Dumps Kuzzle profiles","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","description":"Dump directory","default":"profiles"},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsFetchCount config)","default":"2000"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[]},"profile:restore":{"id":"profile:restore","description":"Restores previously dumped Kuzzle profiles","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsWriteCount config)","default":"200"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"path","description":"Dump file","required":true}]},"role:dump":{"id":"role:dump","description":"Dumps Kuzzle roles","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","description":"Dump directory","default":"roles"},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsFetchCount config)","default":"2000"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[]},"role:restore":{"id":"role:restore","description":"Restores previously dumped Kuzzle roles","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"show CLI help","allowNo":false},"batch-size":{"name":"batch-size","type":"option","description":"Maximum batch size (see limits.documentsWriteCount config)","default":"200"},"host":{"name":"host","type":"option","char":"h","description":"Kuzzle server host","default":"localhost"},"port":{"name":"port","type":"option","char":"p","description":"Kuzzle server port","default":"7512"},"ssl":{"name":"ssl","type":"boolean","description":"Use SSL to connect to Kuzzle","allowNo":false},"username":{"name":"username","type":"option","description":"Kuzzle username (local strategy)","default":"anonymous"},"password":{"name":"password","type":"option","description":"Kuzzle user password"}},"args":[{"name":"path","description":"Dump file","required":true}]},"vault:add":{"id":"vault:add","description":"Adds an encrypted key to a secrets file","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"vault-key":{"name":"vault-key","type":"option","description":"Kuzzle Vault Key (or KUZZLE_VAULT_KEY)"}},"args":[{"name":"secrets-file","description":"Encrypted secrets file","required":true},{"name":"key","description":"Path to the key (lodash style)","required":true},{"name":"value","description":"Value to encrypt","required":true}]},"vault:encrypt":{"id":"vault:encrypt","description":"Encrypts an entire file.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the output file if it already exists","allowNo":false},"output-file":{"name":"output-file","type":"option","char":"o","description":"Output file (default: <file>.enc.json)"},"vault-key":{"name":"vault-key","type":"option","description":"Kuzzle Vault Key (or KUZZLE_VAULT_KEY)"}},"args":[{"name":"file","description":"File containing unencrypted secrets","required":true}]},"vault:show":{"id":"vault:show","description":"Prints an encrypted key.","pluginName":"kourou","pluginType":"core","aliases":[],"flags":{"vault-key":{"name":"vault-key","type":"option","description":"Kuzzle Vault Key (or KUZZLE_VAULT_KEY)"}},"args":[{"name":"secrets-file","description":"Encrypted secrets file","required":true},{"name":"key","description":"Path to the key (lodash style)","required":true}]}}}
{
"name": "kourou",
"description": "The CLI that helps you manage your Kuzzle instances",
"version": "0.7.0",
"version": "0.8.0",
"author": "The Kuzzle Team <support@kuzzle.io>",

@@ -18,6 +18,5 @@ "bin": {

"cli-ux": "^5.4.1",
"compare-version": "^0.1.2",
"execa": "^3.4.0",
"inquirer": "^7.0.3",
"kuzzle-sdk": "^7.0.1",
"inquirer": "^7.0.6",
"kuzzle-sdk": "^7.1.0",
"kuzzle-vault": "^1.0.2",

@@ -32,3 +31,3 @@ "listr": "^0.14.3",

"@oclif/test": "^1.2.5",
"@types/chai": "^4.2.7",
"@types/chai": "^4.2.10",
"@types/compare-version": "^0.1.31",

@@ -48,4 +47,4 @@ "@types/listr": "^0.14.2",

"prettier-eslint": "^9.0.1",
"should": "^13.2.3",
"ts-node": "^8.5.4",
"should": "^13.2.3",
"typescript": "^3.7.4"

@@ -74,3 +73,32 @@ },

"@oclif/plugin-help"
]
],
"topics": {
"api-key": {
"description": "manage API keys"
},
"collection": {
"description": "dump or restore an entire data collection"
},
"document": {
"description": "push or retrieve documents from the data storage"
},
"es": {
"description": "low-level access to Elasticsearch"
},
"index": {
"description": "dump or restore an entire data index"
},
"instance": {
"description": "manage Kuzzle instances"
},
"profile": {
"description": "manage user profiles"
},
"role": {
"description": "manage user roles"
},
"vault": {
"description": "manage then encrypted vault"
}
}
},

@@ -77,0 +105,0 @@ "repository": "kuzzleio/kourou",

@@ -27,3 +27,3 @@ # kourou

$ kourou (-v|--version|version)
kourou/0.7.0 linux-x64 node-v12.16.0
kourou/0.8.0 linux-x64 node-v12.16.1
$ kourou --help [COMMAND]

@@ -66,2 +66,3 @@ USAGE

* [`kourou collection:restore PATH`](#kourou-collectionrestore-path)
* [`kourou document:create INDEX COLLECTION`](#kourou-documentcreate-index-collection)
* [`kourou document:get INDEX COLLECTION ID`](#kourou-documentget-index-collection-id)

@@ -76,3 +77,7 @@ * [`kourou es:get INDEX ID`](#kourou-esget-index-id)

* [`kourou instance:spawn`](#kourou-instancespawn)
* [`kourou profile:dump`](#kourou-profiledump)
* [`kourou profile:restore PATH`](#kourou-profilerestore-path)
* [`kourou query CONTROLLER:ACTION`](#kourou-query-controlleraction)
* [`kourou role:dump`](#kourou-roledump)
* [`kourou role:restore PATH`](#kourou-rolerestore-path)
* [`kourou vault:add SECRETS-FILE KEY VALUE`](#kourou-vaultadd-secrets-file-key-value)

@@ -105,3 +110,3 @@ * [`kourou vault:encrypt FILE`](#kourou-vaultencrypt-file)

_See code: [src/commands/api-key/create.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/api-key/create.ts)_
_See code: [src/commands/api-key/create.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/api-key/create.ts)_

@@ -129,3 +134,3 @@ ## `kourou api-key:delete USER`

_See code: [src/commands/api-key/delete.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/api-key/delete.ts)_
_See code: [src/commands/api-key/delete.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/api-key/delete.ts)_

@@ -153,3 +158,3 @@ ## `kourou api-key:search USER`

_See code: [src/commands/api-key/search.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/api-key/search.ts)_
_See code: [src/commands/api-key/search.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/api-key/search.ts)_

@@ -179,3 +184,3 @@ ## `kourou collection:dump INDEX COLLECTION`

_See code: [src/commands/collection/dump.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/collection/dump.ts)_
_See code: [src/commands/collection/dump.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/collection/dump.ts)_

@@ -206,4 +211,34 @@ ## `kourou collection:restore PATH`

_See code: [src/commands/collection/restore.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/collection/restore.ts)_
_See code: [src/commands/collection/restore.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/collection/restore.ts)_
## `kourou document:create INDEX COLLECTION`
Creates a document
```
USAGE
$ kourou document:create INDEX COLLECTION
ARGUMENTS
INDEX Index name
COLLECTION Collection name
OPTIONS
-h, --host=host [default: localhost] Kuzzle server host
-p, --port=port [default: 7512] Kuzzle server port
--body=body [default: {}] Document body in JS or JSON format. Will be read from STDIN if available
--help show CLI help
--id=id Optional document ID
--password=password Kuzzle user password
--replace Replaces the document if it already exists
--ssl Use SSL to connect to Kuzzle
--username=username [default: anonymous] Kuzzle username (local strategy)
EXAMPLES
kourou document:create iot sensors --body '{network: "sigfox"}'
kourou document:create iot sensors < document.json
```
_See code: [src/commands/document/create.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/document/create.ts)_
## `kourou document:get INDEX COLLECTION ID`

@@ -231,3 +266,3 @@

_See code: [src/commands/document/get.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/document/get.ts)_
_See code: [src/commands/document/get.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/document/get.ts)_

@@ -252,3 +287,3 @@ ## `kourou es:get INDEX ID`

_See code: [src/commands/es/get.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/es/get.ts)_
_See code: [src/commands/es/get.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/es/get.ts)_

@@ -274,3 +309,3 @@ ## `kourou es:insert INDEX`

_See code: [src/commands/es/insert.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/es/insert.ts)_
_See code: [src/commands/es/insert.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/es/insert.ts)_

@@ -292,3 +327,3 @@ ## `kourou es:list-index`

_See code: [src/commands/es/list-index.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/es/list-index.ts)_
_See code: [src/commands/es/list-index.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/es/list-index.ts)_

@@ -334,3 +369,3 @@ ## `kourou help [COMMAND]`

_See code: [src/commands/index/dump.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/index/dump.ts)_
_See code: [src/commands/index/dump.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/index/dump.ts)_

@@ -360,3 +395,3 @@ ## `kourou index:restore PATH`

_See code: [src/commands/index/restore.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/index/restore.ts)_
_See code: [src/commands/index/restore.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/index/restore.ts)_

@@ -376,3 +411,3 @@ ## `kourou instance:logs`

_See code: [src/commands/instance/logs.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/instance/logs.ts)_
_See code: [src/commands/instance/logs.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/instance/logs.ts)_

@@ -393,4 +428,48 @@ ## `kourou instance:spawn`

_See code: [src/commands/instance/spawn.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/instance/spawn.ts)_
_See code: [src/commands/instance/spawn.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/instance/spawn.ts)_
## `kourou profile:dump`
Dumps Kuzzle profiles
```
USAGE
$ kourou profile:dump
OPTIONS
-h, --host=host [default: localhost] Kuzzle server host
-p, --port=port [default: 7512] Kuzzle server port
--batch-size=batch-size [default: 2000] Maximum batch size (see limits.documentsFetchCount config)
--help show CLI help
--password=password Kuzzle user password
--path=path [default: profiles] Dump directory
--ssl Use SSL to connect to Kuzzle
--username=username [default: anonymous] Kuzzle username (local strategy)
```
_See code: [src/commands/profile/dump.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/profile/dump.ts)_
## `kourou profile:restore PATH`
Restores previously dumped Kuzzle profiles
```
USAGE
$ kourou profile:restore PATH
ARGUMENTS
PATH Dump file
OPTIONS
-h, --host=host [default: localhost] Kuzzle server host
-p, --port=port [default: 7512] Kuzzle server port
--batch-size=batch-size [default: 200] Maximum batch size (see limits.documentsWriteCount config)
--help show CLI help
--password=password Kuzzle user password
--ssl Use SSL to connect to Kuzzle
--username=username [default: anonymous] Kuzzle username (local strategy)
```
_See code: [src/commands/profile/restore.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/profile/restore.ts)_
## `kourou query CONTROLLER:ACTION`

@@ -408,6 +487,6 @@

OPTIONS
-a, --arg=arg Additional argument. Repeatable. (e.g. "-a refresh=wait_for")
-h, --host=host [default: localhost] Kuzzle server host
-p, --port=port [default: 7512] Kuzzle server port
--arg=arg Additional argument. Repeatable. (eg: "--arg refresh:wait_for")
--body=body Request body in JSON format.
--body=body [default: {}] Request body in JS or JSON format. Will be read from STDIN if available.
--help show CLI help

@@ -417,6 +496,56 @@ --password=password Kuzzle user password

--username=username [default: anonymous] Kuzzle username (local strategy)
EXAMPLES
kourou query document:get --arg index=iot --arg collection=sensors --arg _id=sigfox-42
kourou query collection:create --arg index=iot --arg collection=sensors --body '{dynamic: "strict"}'
kourou query admin:loadMappings < mappings.json
echo '{name: "Aschen"}' | kourou query document:create --arg index=iot --arg collection=sensors
```
_See code: [src/commands/query.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/query.ts)_
_See code: [src/commands/query.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/query.ts)_
## `kourou role:dump`
Dumps Kuzzle roles
```
USAGE
$ kourou role:dump
OPTIONS
-h, --host=host [default: localhost] Kuzzle server host
-p, --port=port [default: 7512] Kuzzle server port
--batch-size=batch-size [default: 2000] Maximum batch size (see limits.documentsFetchCount config)
--help show CLI help
--password=password Kuzzle user password
--path=path [default: roles] Dump directory
--ssl Use SSL to connect to Kuzzle
--username=username [default: anonymous] Kuzzle username (local strategy)
```
_See code: [src/commands/role/dump.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/role/dump.ts)_
## `kourou role:restore PATH`
Restores previously dumped Kuzzle roles
```
USAGE
$ kourou role:restore PATH
ARGUMENTS
PATH Dump file
OPTIONS
-h, --host=host [default: localhost] Kuzzle server host
-p, --port=port [default: 7512] Kuzzle server port
--batch-size=batch-size [default: 200] Maximum batch size (see limits.documentsWriteCount config)
--help show CLI help
--password=password Kuzzle user password
--ssl Use SSL to connect to Kuzzle
--username=username [default: anonymous] Kuzzle username (local strategy)
```
_See code: [src/commands/role/restore.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/role/restore.ts)_
## `kourou vault:add SECRETS-FILE KEY VALUE`

@@ -439,3 +568,3 @@

_See code: [src/commands/vault/add.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/vault/add.ts)_
_See code: [src/commands/vault/add.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/vault/add.ts)_

@@ -459,3 +588,3 @@ ## `kourou vault:encrypt FILE`

_See code: [src/commands/vault/encrypt.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/vault/encrypt.ts)_
_See code: [src/commands/vault/encrypt.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/vault/encrypt.ts)_

@@ -478,3 +607,3 @@ ## `kourou vault:show SECRETS-FILE KEY`

_See code: [src/commands/vault/show.ts](https://github.com/kuzzleio/kourou/blob/v0.7.0/src/commands/vault/show.ts)_
_See code: [src/commands/vault/show.ts](https://github.com/kuzzleio/kourou/blob/v0.8.0/src/commands/vault/show.ts)_
<!-- commandsstop -->

@@ -481,0 +610,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc