<commit_before>import "reflect-metadata"; // Needed for inversify
import { Container } from "@extension-kid/core";
import notificationServiceFactory from "@extension-kid/notification-service";
import toastsExtensionFactory from "@extension-kid/toast-notifications";

import mesosStream, { MesosStreamType } from "./core/MesosStream";

const container = new Container();

container.bind(MesosStreamType).toConstantValue(mesosStream);
container.load(notificationServiceFactory());

const toastsExtension = toastsExtensionFactory();
if (toastsExtension) {
  container.load(toastsExtension);
} else {
  // tslint:disable-next-line
  console.error("Could not load toasts extension, please check export");
}

export default container;<commit_msg>feat(data-layer): add data layer extension to container<commit_after>import "reflect-metadata"; // Needed for inversify
import { Container, bindExtensionProvider } from "@extension-kid/core";
import notificationServiceFactory from "@extension-kid/notification-service";
import toastsExtensionFactory from "@extension-kid/toast-notifications";

import mesosStream, { MesosStreamType } from "./core/MesosStream";
import { ContainerModule } from "inversify";
import DataLayer, {
  DataLayerExtensionSymbol,
  DataLayerSymbol
} from "./dataLayer";

const container = new Container();

container.bind(MesosStreamType).toConstantValue(mesosStream);
container.load(notificationServiceFactory());

const toastsExtension = toastsExtensionFactory();
if (toastsExtension) {
  container.load(toastsExtension);
} else {
  // tslint:disable-next-line
  console.error("Could not load toasts extension, please check export");
}

const dataLayerModule = new ContainerModule(bind => {
  bindExtensionProvider(bind, DataLayerExtensionSymbol);
});

container.load(dataLayerModule);

container.bindAsync(DataLayerSymbol, bts => {
  bts.to(DataLayer).inSingletonScope();
});

export default container;
{'fraction_non_alphanumeric': 0.11412193850964043, 'fraction_numerical': 0.0, 'mean_word_length': 6.966804979253112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3784704', 'n_tokens_mistral': 524, 'n_tokens_neox': 516, 'n_words': 120}