All files / src/commands/metabase metabase.version.check.command.js

88.23% Statements 15/17
100% Branches 1/1
0% Functions 0/1
88.23% Lines 15/17

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x     193x 193x  
import { defineCommand } from '../../lib/define-command.js';
import { operatorCheckVersion } from '../../lib/operator-commands.js';
import { addonIdOrNameArg } from '../global.args.js';
import { humanJsonOutputFormatOption } from '../global.options.js';
 
export const metabaseVersionCheckCommand = defineCommand({
  description: 'Check Metabase deployed version',
  since: '3.13.0',
  options: {
    format: humanJsonOutputFormatOption,
  },
  args: [addonIdOrNameArg],
  async handler(options, addonIdOrName) {
    const { format } = options;
    await operatorCheckVersion('metabase', addonIdOrName, format);
  },
});