UNPKG

2.75 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2023 TypeFox and others.
4//
5// This program and the accompanying materials are made available under the
6// terms of the Eclipse Public License v. 2.0 which is available at
7// http://www.eclipse.org/legal/epl-2.0.
8//
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License v. 2.0 are satisfied: GNU General Public License, version 2
12// with the GNU Classpath Exception which is available at
13// https://www.gnu.org/software/classpath/license.html.
14//
15// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16// *****************************************************************************
17Object.defineProperty(exports, "__esModule", { value: true });
18const inversify_1 = require("inversify");
19const preloader_1 = require("./preloader");
20const contribution_provider_1 = require("../../common/contribution-provider");
21const i18n_preload_contribution_1 = require("./i18n-preload-contribution");
22const os_preload_contribution_1 = require("./os-preload-contribution");
23const theme_preload_contribution_1 = require("./theme-preload-contribution");
24const localization_server_1 = require("../../common/i18n/localization-server");
25const ws_connection_provider_1 = require("../messaging/ws-connection-provider");
26const os_1 = require("../../common/os");
27exports.default = new inversify_1.ContainerModule(bind => {
28 bind(preloader_1.Preloader).toSelf().inSingletonScope();
29 (0, contribution_provider_1.bindContributionProvider)(bind, preloader_1.PreloadContribution);
30 bind(localization_server_1.LocalizationServer).toDynamicValue(ctx => ws_connection_provider_1.WebSocketConnectionProvider.createProxy(ctx.container, localization_server_1.LocalizationServerPath)).inSingletonScope();
31 bind(os_1.OSBackendProvider).toDynamicValue(ctx => ws_connection_provider_1.WebSocketConnectionProvider.createProxy(ctx.container, os_1.OSBackendProviderPath)).inSingletonScope();
32 bind(i18n_preload_contribution_1.I18nPreloadContribution).toSelf().inSingletonScope();
33 bind(preloader_1.PreloadContribution).toService(i18n_preload_contribution_1.I18nPreloadContribution);
34 bind(os_preload_contribution_1.OSPreloadContribution).toSelf().inSingletonScope();
35 bind(preloader_1.PreloadContribution).toService(os_preload_contribution_1.OSPreloadContribution);
36 bind(theme_preload_contribution_1.ThemePreloadContribution).toSelf().inSingletonScope();
37 bind(preloader_1.PreloadContribution).toService(theme_preload_contribution_1.ThemePreloadContribution);
38});
39//# sourceMappingURL=preload-module.js.map
\No newline at end of file