@@ -24,7 +24,7 @@ export class AtelierAPI {
24
24
return workspaceState . get ( this . workspaceFolder + ":iris" , false ) ;
25
25
}
26
26
27
- private formatCspName ( filename : string ) : string {
27
+ private transformNameIfCsp ( filename : string ) : string {
28
28
// If a CSP file, change from
29
29
// \csp\user\... to
30
30
// csp/user/...
@@ -278,7 +278,7 @@ export class AtelierAPI {
278
278
format,
279
279
} ;
280
280
}
281
- name = this . formatCspName ( name ) ;
281
+ name = this . transformNameIfCsp ( name ) ;
282
282
return this . request ( 1 , "GET" , `${ this . ns } /doc/${ name } ` , params ) ;
283
283
}
284
284
// api v1+
@@ -288,7 +288,7 @@ export class AtelierAPI {
288
288
// v1+
289
289
public putDoc ( name : string , data : { enc : boolean ; content : string [ ] } , ignoreConflict ?: boolean ) : Promise < any > {
290
290
const params = { ignoreConflict } ;
291
- name = this . formatCspName ( name ) ;
291
+ name = this . transformNameIfCsp ( name ) ;
292
292
return this . request ( 1 , "PUT" , `${ this . ns } /doc/${ name } ` , data , params ) ;
293
293
}
294
294
// v1+
@@ -330,7 +330,7 @@ export class AtelierAPI {
330
330
}
331
331
// v1+
332
332
public actionCompile ( docs : string [ ] , flags ?: string , source = false ) : Promise < any > {
333
- docs = docs . map ( ( doc ) => this . formatCspName ( doc ) ) ;
333
+ docs = docs . map ( ( doc ) => this . transformNameIfCsp ( doc ) ) ;
334
334
return this . request ( 1 , "POST" , `${ this . ns } /action/compile` , docs , {
335
335
flags,
336
336
source,
0 commit comments