@@ -238,6 +238,32 @@ export class Targets {
238238 return isRef ;
239239 }
240240
241+ public getAllHeaders ( ) {
242+ const allObjects = this . getResolvedObjects ( ) ;
243+ const allHeaders : string [ ] = [ ] ;
244+ for ( const obj of allObjects ) {
245+ if ( obj . headers ) {
246+ for ( const header of obj . headers ) {
247+ if ( ! allHeaders . includes ( header ) ) {
248+ allHeaders . push ( header ) ;
249+ }
250+ }
251+ }
252+ }
253+ return allHeaders ;
254+ }
255+
256+ public getAffectedByHeader ( headers : string [ ] ) : ILEObject [ ] {
257+ const allObjects = this . getResolvedObjects ( ) ;
258+ const affectedObjects : ILEObject [ ] = [ ] ;
259+ for ( const obj of allObjects ) {
260+ if ( obj . headers && headers . some ( header => obj . headers . includes ( header ) ) ) {
261+ affectedObjects . push ( obj ) ;
262+ }
263+ }
264+ return affectedObjects ;
265+ }
266+
241267 public removeObjectByPath ( localPath : string ) {
242268 const resolvedObject = this . resolvedObjects [ localPath ] ;
243269
@@ -759,7 +785,7 @@ export class Targets {
759785 * Sadly the long name is not typically part of the path name, so we need to
760786 * find the name inside of the source code.
761787 */
762- async sqlObjectDataFromPath ( fullPath : string ) : Promise < ObjectRef > {
788+ private async sqlObjectDataFromPath ( fullPath : string ) : Promise < ObjectRef > {
763789 const relativePath = this . getRelative ( fullPath ) ;
764790
765791 if ( await this . fs . exists ( fullPath ) ) {
0 commit comments