Skip to content

Commit

Permalink
npm audit fixes (#1077)
Browse files Browse the repository at this point in the history
* npm audit fixes
* comment out wdl-viewer in order to remove pipeline-builder
  • Loading branch information
NatalieEO authored Sep 23, 2020
1 parent 3b3889c commit 71178a5
Show file tree
Hide file tree
Showing 12 changed files with 1,374 additions and 1,415 deletions.
1,677 changes: 815 additions & 862 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@
"cytoscape-popper": "^1.0.4",
"elasticsearch-browser": "^15.0.0",
"font-awesome": "^4.7.0",
"jquery": "~3.4.1",
"jquery": "^3.5.1",
"ng2-ui-auth": "^10.0.1",
"ngx-clipboard": "^13.0.1",
"ngx-markdown": "^9.1.1",
"ngx-sharebuttons": "^8.0.0",
"pipeline-builder": "^0.3.10-dev.313",
"rxjs": "^6.5.3",
"ts-md5": "^1.2.6",
"tslib": "^1.10.0",
Expand All @@ -89,7 +88,7 @@
"husky": "^3.0.5",
"jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.4.1",
"karma": "^5.2.2",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "^2.0.1",
Expand All @@ -98,7 +97,7 @@
"license-checker": "^25.0.1",
"lint-staged": "^9.4.0",
"prettier": "^2.1.1",
"rxjs-tslint": "^0.1.7",
"rxjs-tslint": "^0.1.8",
"rxjs-tslint-rules": "^4.17.0",
"ts-loader": "^5.4.5",
"ts-node": "^8.4.1",
Expand Down
28 changes: 15 additions & 13 deletions src/app/workflow/dag/dag.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,20 @@
(descriptorType$ | async) === ToolDescriptor.TypeEnum.CWL &&
(workflow$ | async)?.source_control_provider === 'GITHUB'
"
style="line-height: 20px;"
style="line-height: 20px"
>
<label class="radio-inline"> <input type="radio" name="dagType" [(ngModel)]="dagType" value="classic" />Classic </label>
<label class="radio-inline">
<input type="radio" name="dagType" [(ngModel)]="dagType" value="cwlviewer" />Common Workflow Language Viewer
</label>
</div>
<div *ngIf="isWDL$ | async" style="line-height: 20px;">
<label class="radio-inline"> <input type="radio" name="dagType" [(ngModel)]="dagType" value="classic" />Classic </label>
<label class="radio-inline">
<input type="radio" name="dagType" [(ngModel)]="dagType" value="wdlviewer" />EPAM WDL Visualizer
</label>
<div *ngIf="isWDL$ | async" style="line-height: 20px">
Classic
<!--ALLOW WDL VIEWER AGAIN -->
<!-- <label class="radio-inline"> <input type="radio" name="dagType" [(ngModel)]="dagType" value="classic" />Classic </label>-->
<!-- <label class="radio-inline">-->
<!-- <input type="radio" name="dagType" [(ngModel)]="dagType" value="wdlviewer" />EPAM WDL Visualizer-->
<!-- </label>-->
</div>
<div>
<a
Expand Down Expand Up @@ -100,13 +102,13 @@
[expanded]="expanded"
>
</app-cwl-viewer>
<app-wdl-viewer
*ngIf="(isWDL$ | async) && dagType === 'wdlviewer'"
[workflow]="workflow$ | async"
[selectedVersion]="selectedVersion"
[expanded]="expanded"
>
</app-wdl-viewer>
<!--ALLOW WDL VIEWER AGAIN -->
<!-- <app-wdl-viewer-->
<!-- *ngIf="(isWDL$ | async) && dagType === 'wdlviewer'"-->
<!-- [workflow]="workflow$ | async"-->
<!-- [selectedVersion]="selectedVersion"-->
<!-- [expanded]="expanded"-->
<!-- </app-wdl-viewer>-->
<div #cy id="cy" *ngIf="(dagResult$ | async) && !(missingTool$ | async)" class="h-100 w-100" [hidden]="dagType !== 'classic'"></div>
</div>
</div>
Expand Down
46 changes: 21 additions & 25 deletions src/app/workflow/dag/dag.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import { WorkflowVersion } from './../../shared/swagger/model/workflowVersion';
import { DagQuery } from './state/dag.query';
import { DagService } from './state/dag.service';
import { DagStore } from './state/dag.store';
import { WdlViewerService } from './wdl-viewer/state/wdl-viewer.service';
import { WdlViewerComponent } from './wdl-viewer/wdl-viewer.component';

/**
* This is the DAG tab
Expand All @@ -46,15 +44,16 @@ import { WdlViewerComponent } from './wdl-viewer/wdl-viewer.component';
selector: 'app-dag',
templateUrl: './dag.component.html',
styleUrls: ['./dag.component.scss'],
providers: [DagStore, DagQuery, DagService, WdlViewerService]
providers: [DagStore, DagQuery, DagService],
})
export class DagComponent extends EntryTab implements OnInit, OnChanges, AfterViewInit {
@Input() id: number;
@Input() selectedVersion: WorkflowVersion;

@ViewChild('exportLink') exportLink: ElementRef;
@ViewChild('cy') cyElement: ElementRef;
@ViewChild(WdlViewerComponent) wdlViewer: WdlViewerComponent;
// ALLOW WDL VIEWER AGAIN
// @ViewChild(WdlViewerComponent) wdlViewer: WdlViewerComponent;
@ViewChild('dagHolder', { static: true }) dagHolderElement: ElementRef;

public dagResult$: Observable<any>;
Expand Down Expand Up @@ -88,9 +87,10 @@ export class DagComponent extends EntryTab implements OnInit, OnChanges, AfterVi

reset() {
switch (this.dagType) {
case 'wdlviewer':
this.wdlViewer.reset();
break;
// ALLOW WDL VIEWER AGAIN
// case 'wdlviewer':
// this.wdlViewer.reset();
// break;
default:
this.refreshCounter++;
this.refreshDocument(this.cy);
Expand All @@ -102,8 +102,7 @@ export class DagComponent extends EntryTab implements OnInit, OnChanges, AfterVi
private workflowQuery: WorkflowQuery,
private dagQuery: DagQuery,
private ngZone: NgZone,
private sessionQuery: SessionQuery,
private wdlViewerService: WdlViewerService
private sessionQuery: SessionQuery
) {
super();
}
Expand Down Expand Up @@ -145,34 +144,31 @@ export class DagComponent extends EntryTab implements OnInit, OnChanges, AfterVi
this.workflow$ = <Observable<BioWorkflow>>this.workflowQuery.workflow$;
this.missingTool$ = this.dagQuery.missingTool$;
this.dagService.loadExtensions();
this.wdlViewerResult$ = this.wdlViewerService.status$;
// this.wdlViewerResult$ = this.wdlViewerService.status$;
this.isPublic$ = this.sessionQuery.isPublic$;
}

ngAfterViewInit(): void {
this.dagResult$
.pipe(
filterNil,
takeUntil(this.ngUnsubscribe)
)
.subscribe(
dagResults => {
this.refreshDocument(this.cy);
},
error => console.error('Something went terribly wrong with dagResult$')
);
this.dagResult$.pipe(filterNil, takeUntil(this.ngUnsubscribe)).subscribe(
(dagResults) => {
this.refreshDocument(this.cy);
},
(error) => console.error('Something went terribly wrong with dagResult$')
);
}

ngOnChanges() {
this.wdlViewerService.setStatus(false);
// ALLOW WDL VIEWER AGAIN
// this.wdlViewerService.setStatus(false);
this.dagService.getDAGResults(this.selectedVersion, this.id);
}

download() {
switch (this.dagType) {
case 'wdlviewer':
this.wdlViewer.download(this.exportLink);
break;
// ALLOW WDL VIEWER AGAIN
// case 'wdlviewer':
// this.wdlViewer.download(this.exportLink);
// break;
default:
this.dagService.download(this.cy, this.selectedVersion.name, this.exportLink);
break;
Expand Down
7 changes: 3 additions & 4 deletions src/app/workflow/dag/dag.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { RefreshAlertModule } from 'app/shared/alert/alert.module';
import { CustomMaterialModule } from './../../shared/modules/material.module';
import { CwlViewerComponent } from './cwl-viewer/cwl-viewer.component';
import { DagComponent } from './dag.component';
import { WdlViewerComponent } from './wdl-viewer/wdl-viewer.component';

@NgModule({
providers: [{ provide: OverlayContainer, useClass: FullscreenOverlayContainer }],
Expand All @@ -37,9 +36,9 @@ import { WdlViewerComponent } from './wdl-viewer/wdl-viewer.component';
MatProgressBarModule,
MatTooltipModule,
CustomMaterialModule,
RefreshAlertModule
RefreshAlertModule,
],
declarations: [DagComponent, CwlViewerComponent, WdlViewerComponent],
exports: [DagComponent]
declarations: [DagComponent, CwlViewerComponent],
exports: [DagComponent],
})
export class DagModule {}
162 changes: 82 additions & 80 deletions src/app/workflow/dag/wdl-viewer/state/wdl-viewer.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,83 +14,85 @@
* limitations under the License.
*/

import { HttpClientTestingModule } from '@angular/common/http/testing';
import { inject, TestBed } from '@angular/core/testing';
import * as pipeline from 'pipeline-builder';
import { from, Observable } from 'rxjs';
import { first } from 'rxjs/operators';
import { WdlViewerPipelineResponse } from './wdl-viewer.model';
import { WdlViewerService } from './wdl-viewer.service';
describe('StarringService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [WdlViewerService],
imports: [HttpClientTestingModule]
});
});

it('should be created', inject([WdlViewerService], (service: WdlViewerService) => {
expect(service).toBeTruthy();
}));
it('should be able generate the model', inject([WdlViewerService], (service: WdlViewerService) => {
const content = `
import "https://raw.githubusercontent.com/DataBiosphere/topmed-workflows/1.32.0/aligner/u_of_michigan_aligner/u_of_michigan_aligner.wdl" as TopMed_aligner
import "https://raw.githubusercontent.com/DataBiosphere/topmed-workflows/1.32.0/aligner/u_of_michigan_aligner-checker/u_of_michigan_aligner_checker_calculation.wdl" as checker
workflow checkerWorkflow {
String docker_image
File input_crai_file
File input_cram_file
File inputTruthCRAMFile
File ref_alt
File ref_bwt
File ref_sa
File ref_amb
File ref_ann
File ref_pac
File ref_fasta
File ref_fasta_index
File dbSNP_vcf
File dbSNP_vcf_index
call TopMed_aligner.TopMedAligner as aligner {
input:
input_crai_file = input_crai_file,
input_cram_file = input_cram_file,
docker_image = docker_image,
ref_fasta = ref_fasta,
ref_fasta_index = ref_fasta_index,
ref_alt = ref_alt,
ref_bwt = ref_bwt,
ref_sa = ref_sa,
ref_amb = ref_amb,
ref_ann = ref_ann,
ref_pac = ref_pac,
dbSNP_vcf = dbSNP_vcf,
dbSNP_vcf_index = dbSNP_vcf_index
}
call checker.checkerTask {
input:
inputCRAMFile = aligner.aligner_output_cram,
inputTruthCRAMFile = inputTruthCRAMFile,
referenceFile = ref_fasta,
docker_image = docker_image }
}`;
const observable = <Observable<WdlViewerPipelineResponse>>from(pipeline.parse(content));
observable.pipe(first()).subscribe(response => {
expect(response).not.toEqual(null);
});
}));
});
// import { HttpClientTestingModule } from '@angular/common/http/testing';
// import { inject, TestBed } from '@angular/core/testing';
// import * as pipeline from 'pipeline-builder';
// import { from, Observable } from 'rxjs';
// import { first } from 'rxjs/operators';
// import { WdlViewerPipelineResponse } from './wdl-viewer.model';
// import { WdlViewerService } from './wdl-viewer.service';
// describe('StarringService', () => {
// beforeEach(() => {
// TestBed.configureTestingModule({
// providers: [WdlViewerService],
// imports: [HttpClientTestingModule]
// });
// });
//
// it('should be created', inject([WdlViewerService], (service: WdlViewerService) => {
// expect(service).toBeTruthy();
// }));
// it('should be able generate the model', inject([WdlViewerService], (service: WdlViewerService) => {
// const content = `
// tslint:disable-next-line:max-line-length
// import "https://raw.githubusercontent.com/DataBiosphere/topmed-workflows/1.32.0/aligner/u_of_michigan_aligner/u_of_michigan_aligner.wdl" as TopMed_aligner
// tslint:disable-next-line:max-line-length
// import "https://raw.githubusercontent.com/DataBiosphere/topmed-workflows/1.32.0/aligner/u_of_michigan_aligner-checker/u_of_michigan_aligner_checker_calculation.wdl" as checker
//
// workflow checkerWorkflow {
// String docker_image
//
// File input_crai_file
// File input_cram_file
//
// File inputTruthCRAMFile
//
// File ref_alt
// File ref_bwt
// File ref_sa
// File ref_amb
// File ref_ann
// File ref_pac
//
// File ref_fasta
// File ref_fasta_index
//
// File dbSNP_vcf
// File dbSNP_vcf_index
//
// call TopMed_aligner.TopMedAligner as aligner {
// input:
//
// input_crai_file = input_crai_file,
// input_cram_file = input_cram_file,
//
// docker_image = docker_image,
//
// ref_fasta = ref_fasta,
// ref_fasta_index = ref_fasta_index,
// ref_alt = ref_alt,
// ref_bwt = ref_bwt,
// ref_sa = ref_sa,
// ref_amb = ref_amb,
// ref_ann = ref_ann,
// ref_pac = ref_pac,
//
// dbSNP_vcf = dbSNP_vcf,
// dbSNP_vcf_index = dbSNP_vcf_index
//
// }
//
//
// call checker.checkerTask {
// input:
// inputCRAMFile = aligner.aligner_output_cram,
// inputTruthCRAMFile = inputTruthCRAMFile,
// referenceFile = ref_fasta,
// docker_image = docker_image }
// }`;
// const observable = <Observable<WdlViewerPipelineResponse>>from(pipeline.parse(content));
// observable.pipe(first()).subscribe(response => {
// expect(response).not.toEqual(null);
// });
// }));
// });
Loading

0 comments on commit 71178a5

Please sign in to comment.