@@ -11,7 +11,14 @@ export class RootNode extends NodeBase {
11
11
private readonly _category : string ;
12
12
private readonly isCsp : boolean ;
13
13
14
- public constructor ( label : string , fullName : string , contextValue : string , category : string , options : NodeOptions , isCsp = false ) {
14
+ public constructor (
15
+ label : string ,
16
+ fullName : string ,
17
+ contextValue : string ,
18
+ category : string ,
19
+ options : NodeOptions ,
20
+ isCsp = false
21
+ ) {
15
22
super ( label , fullName , options ) ;
16
23
this . contextValue = contextValue ;
17
24
this . _category = category ;
@@ -31,7 +38,7 @@ export class RootNode extends NodeBase {
31
38
}
32
39
33
40
public async getChildren ( element ) : Promise < NodeBase [ ] > {
34
- const path = ( this instanceof PackageNode || this . isCsp ) ? this . fullName + "/" : "" ;
41
+ const path = this instanceof PackageNode || this . isCsp ? this . fullName + "/" : "" ;
35
42
return this . getItems ( path , this . _category ) ;
36
43
}
37
44
@@ -78,12 +85,12 @@ export class RootNode extends NodeBase {
78
85
const content = data . result . content ;
79
86
return content ;
80
87
} )
81
- . then ( data =>
82
- data . map ( el => {
88
+ . then ( ( data ) =>
89
+ data . map ( ( el ) => {
83
90
let fullName = el . Name ;
84
- if ( this instanceof PackageNode ) {
91
+ if ( this instanceof PackageNode ) {
85
92
fullName = this . fullName + "." + el . Name ;
86
- } else if ( this . isCsp ) {
93
+ } else if ( this . isCsp ) {
87
94
fullName = this . fullName + "/" + el . Name ;
88
95
}
89
96
return {
@@ -97,11 +104,11 @@ export class RootNode extends NodeBase {
97
104
public getItems ( path : string , category : string ) : Promise < NodeBase [ ] > {
98
105
return this . getList ( path , category , false ) . then ( ( data ) =>
99
106
data
100
- . filter ( el => {
101
- if ( category === "OTHER" ) {
107
+ . filter ( ( el ) => {
108
+ if ( category === "OTHER" ) {
102
109
return el . Type === "100" ;
103
- } else if ( category === "CSP" ) {
104
- return el . Type === "10" || el . Type === "5"
110
+ } else if ( category === "CSP" ) {
111
+ return el . Type === "10" || el . Type === "5" ;
105
112
} else {
106
113
return true ;
107
114
}
0 commit comments