All files / src/commands/config config.command.js

80% Statements 16/20
100% Branches 1/1
0% Functions 0/1
80% Lines 16/20

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 18 19 20 21193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x         193x 193x  
import { defineCommand } from '../../lib/define-command.js';
import * as Application from '../../models/application.js';
import * as ApplicationConfiguration from '../../models/application_configuration.js';
import { aliasOption, appIdOrNameOption } from '../global.options.js';
 
export const configCommand = defineCommand({
  description: 'Display or edit the configuration of your application',
  since: '2.5.0',
  options: {
    alias: aliasOption,
    app: appIdOrNameOption,
  },
  args: [],
  async handler(options) {
    const { alias, app: appIdOrName } = options;
    const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
    const app = await Application.get(ownerId, appId);
    ApplicationConfiguration.printAllValues(app);
  },
});