Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade angular to 6.1.1 to fix security vulnerability #2850

Merged
merged 8 commits into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/frontend/test-e2e/tsconfig.e2e.json"
"src/test-e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
Expand Down
1,232 changes: 628 additions & 604 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@angular/animations": "6.0.3",
"@angular/cdk": "^6.1.0",
"@angular/common": "6.0.3",
"@angular/compiler": "6.0.3",
"@angular/core": "6.0.3",
"@angular/forms": "6.0.3",
"@angular/http": "6.0.3",
"@angular/animations": "^6.1.1",
"@angular/cdk": "^6.4.0",
"@angular/common": "^6.1.1",
"@angular/compiler": "^6.1.1",
"@angular/core": "^6.1.1",
"@angular/forms": "^6.1.1",
"@angular/http": "^6.1.1",
"@angular/material": "^6.1.0",
"@angular/platform-browser": "6.0.3",
"@angular/platform-browser-dynamic": "6.0.3",
"@angular/platform-server": "6.0.3",
"@angular/router": "6.0.3",
"@angular/platform-browser": "^6.1.1",
"@angular/platform-browser-dynamic": "^6.1.1",
"@angular/platform-server": "^6.1.1",
"@angular/router": "^6.1.1",
"@ngrx/effects": "^6.0.1",
"@ngrx/router-store": "^6.0.1",
"@ngrx/store": "^6.0.1",
Expand All @@ -79,17 +79,17 @@
"node": "8.11.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.6.5",
"@angular/cli": "6.0.5",
"@angular/compiler-cli": "6.0.3",
"@angular/language-service": "6.0.3",
"@angular-devkit/build-angular": "^0.7.4",
"@angular/cli": "^6.1.1",
"@angular/compiler-cli": "^6.1.1",
"@angular/language-service": "^6.1.1",
"@types/jasmine": "^2.8.7",
"@types/jasminewd2": "~2.0.3",
"@types/karma": "^1.7.1",
"@types/node": "^6.0.111",
"@types/request": "^2.47.0",
"codecov": "^3.0.2",
"codelyzer": "~3.1.1",
"codelyzer": "^4.4.4",
"delete": "^0.3.2",
"fs-extra": "^3.0.1",
"gulp": "^4.0.0",
Expand All @@ -111,12 +111,12 @@
"q": "^1.4.1",
"replace-in-file": "^3.4.0",
"request-promise-native": "^1.0.5",
"rxjs-tslint": "^0.1.4",
"rxjs-tslint": "^0.1.5",
"sass-lint": "^1.12.1",
"stratos-merge-dirs": "^0.2.3",
"stratos-protractor-reporter": "^1.2.3",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"typescript": "2.7.2"
"tslint": "~5.10.0",
"typescript": "~2.9.0"
}
}
8 changes: 4 additions & 4 deletions src/frontend/app/core/auth-guard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ import { AuthState } from '../store/reducers/auth.reducer';
export class AuthGuardService implements CanActivate {

queryParamMap() {
const map = {};
const paramMap = {};
const query = window.location.search.substring(1);
if (query.length === 0) {
return map;
return paramMap;
}
const vars = query.split('&');
for (let i = 0; i < vars.length; i++) {
const pair = vars[i].split('=');
map[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
paramMap[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
}
return map;
return paramMap;
}

constructor(
Expand Down
6 changes: 2 additions & 4 deletions src/frontend/app/core/current-user-permissions.checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ export class CurrentUserPermissionsChecker {
map(state => {
const permissionString = permission as PermissionStrings;
if (allSpacesWithinOrg) {
const orgOrSpaceState = state[PermissionTypes.ORGANIZATION][orgOrSpaceGuid];
const spaceState = state[PermissionTypes.SPACE];
return this.checkAllSpacesInOrg(orgOrSpaceState, spaceState, permissionString);
return this.checkAllSpacesInOrg(state[PermissionTypes.ORGANIZATION][orgOrSpaceGuid], spaceState, permissionString);
}
const orgOrSpaceState = state[type][orgOrSpaceGuid];
return this.selectPermission(orgOrSpaceState, permissionString);
return this.selectPermission(state[type][orgOrSpaceGuid], permissionString);
}),
distinctUntilChanged(),
);
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/app/core/dot-content/dot-content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { Component, OnInit, Input } from '@angular/core';
styleUrls: ['./dot-content.component.scss']
})
export class DotContentComponent {
@Input('disabled') disabled: boolean;
@Input() disabled: boolean;
}
4 changes: 2 additions & 2 deletions src/frontend/app/core/entity-service-factory.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '../store/app-state';
import { schema } from 'normalizr';
import { schema as normalizrSchema } from 'normalizr';
import { EntityService } from './entity-service';
import { IRequestAction } from '../store/types/request.types';
import { TRequestTypeKeys, RequestSectionKeys } from '../store/reducers/api-request-reducer/types';
Expand All @@ -17,7 +17,7 @@ export class EntityServiceFactory {

create<T>(
entityKey: string,
schema: schema.Entity,
schema: normalizrSchema.Entity,
entityId: string,
action: IRequestAction,
validateRelations = true,
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/app/core/entity-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, TestBed } from '@angular/core/testing';
import { HttpModule, XHRBackend } from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { Store } from '@ngrx/store';
import { schema } from 'normalizr';
import { schema as normalizrSchema } from 'normalizr';
import { filter, first, tap, pairwise, map } from 'rxjs/operators';
import { ENTITY_SERVICE } from '../shared/entity.tokens';
import { EntityMonitor } from '../shared/monitors/entity-monitor';
Expand All @@ -28,7 +28,7 @@ describe('EntityServiceService', () => {
function createTestService(
store: Store<AppState>,
guid: string,
schema: schema.Entity,
schema: normalizrSchema.Entity,
action: IRequestAction,
) {
const entityMonitor = new EntityMonitor(store, guid, schema.key, schema);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import {throwError as observableThrowError, timer as observableTimer, of as observableOf, Observable } from 'rxjs';
import { throwError as observableThrowError, timer as observableTimer, of as observableOf, Observable } from 'rxjs';

import {take, combineLatest, switchMap, map, catchError} from 'rxjs/operators';
import { take, combineLatest, switchMap, map, catchError } from 'rxjs/operators';
import { Directive, forwardRef, Input, OnInit } from '@angular/core';
import { AbstractControl, AsyncValidator, NG_ASYNC_VALIDATORS } from '@angular/forms';
import { Headers, Http, Request, RequestOptions, URLSearchParams } from '@angular/http';
Expand Down Expand Up @@ -46,7 +46,7 @@ export class AppNameUniqueChecking {
})
export class AppNameUniqueDirective implements AsyncValidator, OnInit {

@Input('appApplicationNameUnique') appApplicationNameUnique: AppNameUniqueChecking;
@Input() appApplicationNameUnique: AppNameUniqueChecking;

constructor(
private store: Store<AppState>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { AppDeleteServiceInstancesListConfigService } from './app-delete-instanc
})
export class DeleteAppServiceInstancesComponent implements OnDestroy {

@Output('selected')
@Output()
public selected = new EventEmitter<APIResource<IServiceInstance>[]>();

private selectedSub: Subscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { IServiceBinding } from '../../../../core/cf-api-svc.types';
})
export class DeleteAppRoutesComponent implements OnDestroy {

@Output('selected')
@Output()
public selected = new EventEmitter<APIResource<IServiceBinding>[]>();

private selectedSub: Subscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function applicationServiceFactory(
cfId: string,
id: string,
store: Store<AppState>,
entityServiceFactory: EntityServiceFactory,
entityServiceFactoryInstance: EntityServiceFactory,
appStateService: ApplicationStateService,
appEnvVarsService: ApplicationEnvVarsService,
paginationMonitorFactory: PaginationMonitorFactory
Expand All @@ -25,7 +25,7 @@ export function applicationServiceFactory(
cfId,
id,
store,
entityServiceFactory,
entityServiceFactoryInstance,
appStateService,
appEnvVarsService,
paginationMonitorFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ import { IMetricApplication } from '../../../../store/types/metric.types';
})
export class ApplicationInstanceChartComponent implements OnInit {

@Input('appGuid')
@Input()
private appGuid: string;

@Input('endpointGuid')
@Input()
private endpointGuid: string;

@Input('yAxisLabel')
@Input()
private yAxisLabel: string;

@Input('metricName')
@Input()
private metricName: string;

@Input('seriesTranslation')
@Input()
private seriesTranslation: string;

@Input('title')
@Input()
public title: string;

public instanceChartConfig: MetricsLineChartConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, OnInit, Input, forwardRef, ViewChild } from '@angular/core';
import { DeployApplicatioNFsUtils } from './deploy-application-fs-utils';
import { filter, first, map } from 'rxjs/operators';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
import { BehaviorSubject , Observable } from 'rxjs';
import { BehaviorSubject, Observable } from 'rxjs';
import { FileScannerInfo } from './deploy-application-fs-scanner';

@Component({
Expand All @@ -22,7 +22,7 @@ export class DeployApplicationFsComponent implements ControlValueAccessor {
private propagateChange: Function;
constructor() { }

@Input('sourceType') sourceType: string;
@Input() sourceType: string;

sourceData$ = new BehaviorSubject<FileScannerInfo>(undefined);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

import {combineLatest as observableCombineLatest, of as observableOf, Observable , Subscription } from 'rxjs';
import { combineLatest as observableCombineLatest, of as observableOf, Observable, Subscription } from 'rxjs';
import { AfterContentInit, Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { filter, map, take, tap , withLatestFrom } from 'rxjs/operators';
import { filter, map, take, tap, withLatestFrom } from 'rxjs/operators';

import { EntityServiceFactory } from '../../../../core/entity-service-factory.service';
import { PaginationMonitorFactory } from '../../../../shared/monitors/pagination-monitor.factory';
Expand Down Expand Up @@ -40,7 +40,7 @@ import { StepOnNextFunction } from '../../../../shared/components/stepper/step/s
export class DeployApplicationStep2Component
implements OnInit, OnDestroy, AfterContentInit {

@Input('isRedeploy') isRedeploy = false;
@Input() isRedeploy = false;

branchesSubscription: Subscription;
commitInfo: GithubCommit;
Expand Down Expand Up @@ -142,13 +142,13 @@ export class DeployApplicationStep2Component
if (this.branchesSubscription) {
this.branchesSubscription.unsubscribe();
}
const action = new FetchBranchesForProject(p.name);
const fetchBranchesAction = new FetchBranchesForProject(p.name);
this.branchesSubscription = getPaginationObservables<APIResource>(
{
store: this.store,
action,
action: fetchBranchesAction,
paginationMonitor: this.paginationMonitorFactory.create(
action.paginationKey,
fetchBranchesAction.paginationKey,
entityFactory(githubBranchesSchemaKey)
)
},
Expand All @@ -160,7 +160,7 @@ export class DeployApplicationStep2Component

this.subscriptions.push(fetchBranches);

const action = {
const paginationAction = {
entityKey: githubBranchesSchemaKey,
paginationKey: 'branches'
} as PaginatedAction;
Expand All @@ -180,7 +180,7 @@ export class DeployApplicationStep2Component
const deployCommit$ = this.store.select(selectNewProjectCommit);

const paginationMonitor = this.paginationMonitorFactory.create<APIResource<GitBranch>>(
action.paginationKey,
paginationAction.paginationKey,
entityFactory(githubBranchesSchemaKey)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const APP_CHECK_INTERVAL = 3000;
})
export class DeployApplicationStep3Component implements OnDestroy {

@Input('appGuid') appGuid: string;
@Input() appGuid: string;

// Validation observable
valid$: Observable<boolean>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { map } from 'rxjs/operators';
export class DetachAppsComponent implements OnDestroy {

validate$: Observable<boolean>;
@Output('selectedApps')
@Output()
public selectedApps = new EventEmitter<APIResource<IServiceBinding>[]>();
selectedSub: Subscription;
constructor(private config: ListConfig<APIResource>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SpecifyDetailsStepComponent } from '../specify-details-step/specify-det
})
export class BindAppsStepComponent implements OnDestroy, AfterContentInit {

@Input('boundAppId')
@Input()
boundAppId: string;

validateSubscription: Subscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export class SpecifyDetailsStepComponent implements OnDestroy, AfterContentInit
key: FormMode.BindServiceInstance
}
];
@Input('showModeSelection')
@Input()
showModeSelection = false;

@Input('appId') appId: string;
@Input() appId: string;

formMode: FormMode;

Expand Down Expand Up @@ -410,8 +410,8 @@ export class SpecifyDetailsStepComponent implements OnDestroy, AfterContentInit
filter(a => !a.creating),
switchMap(a => {
const updating = a.updating ? a.updating[UpdateServiceInstance.updateServiceInstance] : null;
if ( (isEditMode && !!updating && updating.error) || (a.error) ) {
return create$;
if ((isEditMode && !!updating && updating.error) || (a.error)) {
return create$;
}

const guid = getIdFromResponse(a.response as NormalizedResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ export interface IApplicationMonitorComponentState {
})
export class AppActionMonitorIconComponent implements OnInit {

@Input('entityKey')
@Input()
public entityKey: string;

@Input('id')
@Input()
public id: string;

@Input('schema')
@Input()
public schema: schema.Entity;

@Input('monitorState')
@Input()
public monitorState: AppMonitorComponentTypes = AppMonitorComponentTypes.FETCHING;

@Input('updateKey')
@Input()
public updateKey = rootUpdatingKey;

@Output('currentState')
@Output()
public currentState: Observable<IApplicationMonitorComponentState>;

constructor(private entityMonitorFactory: EntityMonitorFactory) { }
Expand Down
Loading