diff --git a/packages/daf-cli/src/cli.ts b/packages/daf-cli/src/cli.ts index 9e8e6b1d9..11d4bde49 100644 --- a/packages/daf-cli/src/cli.ts +++ b/packages/daf-cli/src/cli.ts @@ -6,6 +6,7 @@ import './services' import './data-explorer' import './graphql' import './sdr' +import './msg' program.parse(process.argv) if (!process.argv.slice(2).length) { diff --git a/packages/daf-cli/src/msg.ts b/packages/daf-cli/src/msg.ts new file mode 100644 index 000000000..3bb636cc2 --- /dev/null +++ b/packages/daf-cli/src/msg.ts @@ -0,0 +1,21 @@ +import { core } from './setup' +import program from 'commander' + +program + .command('msg ') + .description('Handle raw message (JWT)') + .action(async raw => { + try { + const result = await core.onRawMessage({ + raw, + meta: [ + { + sourceType: 'cli', + }, + ], + }) + console.log(result) + } catch (e) { + console.error(e) + } + })