telemetry.js 1.2 KB

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.TelemetryCommand = void 0;
  4. const color_1 = require("../lib/color");
  5. const command_1 = require("../lib/command");
  6. const errors_1 = require("../lib/errors");
  7. class TelemetryCommand extends command_1.Command {
  8. async getMetadata() {
  9. return {
  10. name: 'telemetry',
  11. type: 'global',
  12. summary: 'Opt in and out of telemetry',
  13. groups: ["hidden" /* MetadataGroup.HIDDEN */],
  14. inputs: [
  15. {
  16. name: 'status',
  17. summary: `${(0, color_1.input)('on')} or ${(0, color_1.input)('off')}`,
  18. },
  19. ],
  20. };
  21. }
  22. async run(inputs, options) {
  23. throw new errors_1.FatalException(`${(0, color_1.input)('ionic telemetry')} has been removed.\n` +
  24. `Please use ${(0, color_1.input)('ionic config')} directly. Examples:\n\n` +
  25. ` ${(0, color_1.input)('ionic config get -g telemetry')}\n` +
  26. ` ${(0, color_1.input)('ionic config set -g telemetry true')}\n` +
  27. ` ${(0, color_1.input)('ionic config set -g telemetry false')}`);
  28. }
  29. }
  30. exports.TelemetryCommand = TelemetryCommand;