import * as angular from "angular"; import 'core-js'; import { ViewArrayImpl } from "./services/view-array/view-array.impl"; import { NAME_PATTERNS } from "./constants/name-patterns.constant"; import { INJECTED_CONFIG, INJECTED_FEATURES, INJECTED_ENDPOINTS } from "./constants/injected-values.constant"; import { RegexMatchViewComponent } from "./directives/ui/regex-match-view/regex-match-view.component"; import { NgModule } from "angular-ts-decorators"; import { QuayRoutes } from "./quay-routes.module"; import { DockerfilePathSelectComponent } from './directives/ui/dockerfile-path-select/dockerfile-path-select.component'; import { ContextPathSelectComponent } from './directives/ui/context-path-select/context-path-select.component'; import { ManageTriggerCustomGitComponent } from './directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component'; import { ManageTriggerGithostComponent } from './directives/ui/manage-trigger-githost/manage-trigger-githost.component'; import { LinearWorkflowComponent } from './directives/ui/linear-workflow/linear-workflow.component'; import { LinearWorkflowSectionComponent } from './directives/ui/linear-workflow/linear-workflow-section.component'; import { QuayConfig } from './quay-config.module'; import { QuayRun } from './quay-run.module'; import { BuildServiceImpl } from './services/build/build.service.impl'; import { AvatarServiceImpl } from './services/avatar/avatar.service.impl'; import { DockerfileServiceImpl } from './services/dockerfile/dockerfile.service.impl'; import { DataFileServiceImpl } from './services/datafile/datafile.service.impl'; /** * Main application module. */ @NgModule({ imports: [ QuayRoutes, QuayConfig, QuayRun, ], declarations: [ RegexMatchViewComponent, DockerfilePathSelectComponent, ContextPathSelectComponent, ManageTriggerCustomGitComponent, ManageTriggerGithostComponent, LinearWorkflowComponent, LinearWorkflowSectionComponent, ], providers: [ ViewArrayImpl, BuildServiceImpl, AvatarServiceImpl, DockerfileServiceImpl, DataFileServiceImpl, ], }) export class quay { } // TODO: Make injected values into services and move to NgModule.providers, as constants are not supported in Angular 2 angular .module(quay.name) .factory("fileReaderFactory", () => () => new FileReader()) .constant('NAME_PATTERNS', NAME_PATTERNS) .constant('INJECTED_CONFIG', INJECTED_CONFIG) .constant('INJECTED_FEATURES', INJECTED_FEATURES) .constant('INJECTED_ENDPOINTS', INJECTED_ENDPOINTS);