"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("../../core");
const env_1 = __importDefault(require("../utils/env"));
class Service extends core_1.ServiceModule {
    [core_1.ServiceCmdEnum.Init]() {
        if (process.env.OPDEV_TOKEN) {
            this.larkSession.ide = 'opdev-token=' + process.env.OPDEV_TOKEN;
            if (process.env.OPDEV_ENV) {
                this.environment = process.env.OPDEV_ENV;
            }
            else {
                this.environment = env_1.default.environments[0].id;
            }
            return Promise.resolve();
        }
        else {
            return super[core_1.ServiceCmdEnum.Init]();
        }
    }
}
exports.default = Service;
