diff --git a/jslib b/jslib index abb54f00730..dcbd09e736b 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit abb54f007305eabd77996623dd20cbe45345e82a +Subproject commit dcbd09e736b516b359369f9d9fe5b0f5a6c2a928 diff --git a/src/commands/export.command.ts b/src/commands/export.command.ts index 6a78363077e..aa43d2c120a 100644 --- a/src/commands/export.command.ts +++ b/src/commands/export.command.ts @@ -31,7 +31,10 @@ export class ExportCommand { const keyHash = await this.cryptoService.hashPassword(password, null); const storedKeyHash = await this.cryptoService.getKeyHash(); if (storedKeyHash != null && keyHash != null && storedKeyHash === keyHash) { - const format = cmd.format !== 'json' ? 'csv' : 'json'; + let format = cmd.format; + if (format !== 'encrypted_json' && format !== 'json') { + format = 'csv'; + } if (cmd.organizationid != null && !Utils.isGuid(cmd.organizationid)) { return Response.error('`' + cmd.organizationid + '` is not a GUID.'); } diff --git a/src/commands/import.command.ts b/src/commands/import.command.ts index 137cfc8218c..ad4e8067351 100644 --- a/src/commands/import.command.ts +++ b/src/commands/import.command.ts @@ -25,7 +25,7 @@ export class ImportCommand { return Response.badRequest('`filepath` was not provided.'); } - const importer = await this.importService.getImporter(format, false); + const importer = await this.importService.getImporter(format, null); if (importer === null) { return Response.badRequest('Proper importer type required.'); } diff --git a/src/program.ts b/src/program.ts index 642ba276cbb..429ad3815b1 100644 --- a/src/program.ts +++ b/src/program.ts @@ -546,7 +546,7 @@ export class Program extends BaseProgram { .on('--help', () => { writeLn('\n Notes:'); writeLn(''); - writeLn(' Valid formats are `csv` and `json`. Default format is `csv`.'); + writeLn(' Valid formats are `csv`, `json`, `encrypted_json`. Default format is `csv`.'); writeLn(''); writeLn(' If raw output is specified and no output filename or directory is given, the'); writeLn(' result is written to stdout.');