UNPKG

@theia/task

Version:

Theia - Task extension. This extension adds support for executing raw or terminal processes in the backend.

37 lines 2.15 kB
"use strict"; // ***************************************************************************** // Copyright (C) 2018 Red Hat, Inc. and others. // // This program and the accompanying materials are made available under the // terms of the Eclipse Public License v. 2.0 which is available at // http://www.eclipse.org/legal/epl-2.0. // // This Source Code may also be made available under the following Secondary // Licenses when the conditions for such availability set forth in the Eclipse // Public License v. 2.0 are satisfied: GNU General Public License, version 2 // with the GNU Classpath Exception which is available at // https://www.gnu.org/software/classpath/license.html. // // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 // ***************************************************************************** Object.defineProperty(exports, "__esModule", { value: true }); exports.bindProcessTaskRunnerModule = void 0; const inversify_1 = require("@theia/core/shared/inversify"); const process_task_1 = require("./process-task"); const process_task_runner_1 = require("./process-task-runner"); const process_task_runner_contribution_1 = require("./process-task-runner-contribution"); const task_runner_1 = require("../task-runner"); function bindProcessTaskRunnerModule(bind) { bind(process_task_1.ProcessTask).toSelf().inTransientScope(); bind(process_task_1.TaskFactory).toFactory(ctx => (options) => { const child = new inversify_1.Container({ defaultScope: 'Singleton' }); child.parent = ctx.container; child.bind(process_task_1.TaskProcessOptions).toConstantValue(options); return child.get(process_task_1.ProcessTask); }); bind(process_task_runner_1.ProcessTaskRunner).toSelf().inSingletonScope(); bind(process_task_runner_contribution_1.ProcessTaskRunnerContribution).toSelf().inSingletonScope(); bind(task_runner_1.TaskRunnerContribution).toService(process_task_runner_contribution_1.ProcessTaskRunnerContribution); } exports.bindProcessTaskRunnerModule = bindProcessTaskRunnerModule; //# sourceMappingURL=process-task-runner-backend-module.js.map