From 495fbd8141807001d8f9db8892417839f6809f9b Mon Sep 17 00:00:00 2001 From: Jonathan Buttner Date: Mon, 15 Jun 2020 15:21:46 -0400 Subject: [PATCH 1/2] Allowing create option to be passed through the cli --- src/es_archiver/cli.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/es_archiver/cli.ts b/src/es_archiver/cli.ts index 98888b81d9a31..2d19a09be68c3 100644 --- a/src/es_archiver/cli.ts +++ b/src/es_archiver/cli.ts @@ -67,9 +67,10 @@ cmd .action((name, indices) => execute((archiver, { raw }) => archiver.save(name, indices, { raw }))); cmd + .option('--useCreate', 'use create instead of index for loading documents') .command('load ') .description('load the archive in --dir with ') - .action((name) => execute((archiver) => archiver.load(name))); + .action((name) => execute((archiver, { useCreate }) => archiver.load(name, { useCreate }))); cmd .command('unload ') From d785bde8dda639c905d50f51b049b9d879d03cba Mon Sep 17 00:00:00 2001 From: Jonathan Buttner Date: Mon, 15 Jun 2020 15:51:17 -0400 Subject: [PATCH 2/2] Using kebab casing --- src/es_archiver/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/es_archiver/cli.ts b/src/es_archiver/cli.ts index 2d19a09be68c3..85e10b31a87ee 100644 --- a/src/es_archiver/cli.ts +++ b/src/es_archiver/cli.ts @@ -67,7 +67,7 @@ cmd .action((name, indices) => execute((archiver, { raw }) => archiver.save(name, indices, { raw }))); cmd - .option('--useCreate', 'use create instead of index for loading documents') + .option('--use-create', 'use create instead of index for loading documents') .command('load ') .description('load the archive in --dir with ') .action((name) => execute((archiver, { useCreate }) => archiver.load(name, { useCreate })));