HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/self/root/usr/local/lib/node_modules/@ionic/cli/commands/integrations/list.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntegrationsListCommand = void 0;
const tslib_1 = require("tslib");
const utils_terminal_1 = require("@ionic/utils-terminal");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
const color_1 = require("../../lib/color");
const command_1 = require("../../lib/command");
const errors_1 = require("../../lib/errors");
const integrations_1 = require("../../lib/integrations");
class IntegrationsListCommand extends command_1.Command {
    async getMetadata() {
        return {
            name: 'list',
            type: 'project',
            summary: 'List available and active integrations in your app',
            description: `
This command will print the status of integrations in Ionic projects. Integrations can be ${(0, color_1.strong)('enabled')} (added and enabled), ${(0, color_1.strong)('disabled')} (added but disabled), and ${(0, color_1.strong)('not added')} (never added to the project).

- To enable or add integrations, see ${(0, color_1.input)('ionic integrations enable --help')}
- To disable integrations, see ${(0, color_1.input)('ionic integrations disable --help')}
      `,
        };
    }
    async run(inputs, options) {
        const { project } = this;
        if (!project) {
            throw new errors_1.FatalException(`Cannot run ${(0, color_1.input)('ionic integrations list')} outside a project directory.`);
        }
        const integrations = await Promise.all(integrations_1.INTEGRATION_NAMES.map(async (name) => project.createIntegration(name)));
        const status = (name) => {
            const c = project.config.get('integrations')[name];
            if (c) {
                if (c.enabled === false) {
                    return chalk_1.default.dim.red('disabled');
                }
                return chalk_1.default.green('enabled');
            }
            return chalk_1.default.dim('not added');
        };
        this.env.log.rawmsg((0, utils_terminal_1.columnar)(integrations.map(i => [(0, color_1.input)(i.name), i.summary, status(i.name)]), { headers: ['name', 'summary', 'status'] }));
    }
}
exports.IntegrationsListCommand = IntegrationsListCommand;