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/lib/integrations/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseIntegration = exports.IntegrationConfig = exports.INTEGRATION_NAMES = void 0;
const tslib_1 = require("tslib");
const cli_framework_1 = require("@ionic/cli-framework");
const path = tslib_1.__importStar(require("path"));
const guards_1 = require("../../guards");
const color_1 = require("../color");
const errors_1 = require("../errors");
var guards_2 = require("../../guards");
Object.defineProperty(exports, "INTEGRATION_NAMES", { enumerable: true, get: function () { return guards_2.INTEGRATION_NAMES; } });
class IntegrationConfig extends cli_framework_1.BaseConfig {
    provideDefaults(c) {
        return {};
    }
}
exports.IntegrationConfig = IntegrationConfig;
class BaseIntegration {
    constructor(e) {
        this.e = e;
    }
    static async createFromName(deps, name) {
        if ((0, guards_1.isIntegrationName)(name)) {
            const { Integration } = await Promise.resolve().then(() => tslib_1.__importStar(require(`./${name}`)));
            return new Integration(deps);
        }
        throw new errors_1.IntegrationNotFoundException(`Bad integration name: ${(0, color_1.strong)(name)}`); // TODO?
    }
    async getInfo() {
        return [];
    }
    isAdded() {
        return !!this.e.project.config.get('integrations')[this.name];
    }
    isEnabled() {
        const integrationConfig = this.e.project.config.get('integrations')[this.name];
        return !!integrationConfig && integrationConfig.enabled !== false;
    }
    async enable(config) {
        if (config && config.root) {
            this.config.set('root', config.root);
        }
        this.config.unset('enabled');
    }
    async disable() {
        this.config.set('enabled', false);
    }
    async personalize(details) {
        // optionally overwritten by subclasses
    }
    async add(details) {
        const config = details.root !== this.e.project.directory ?
            { root: path.relative(this.e.project.rootDirectory, details.root) } :
            undefined;
        await this.enable(config);
    }
}
exports.BaseIntegration = BaseIntegration;