File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 5
5
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
*/
7
7
import * as path from 'path' ;
8
+ import { ComponentSet } from '@salesforce/source-deploy-retrieve' ;
8
9
import { RemoteSyncInput } from './types' ;
9
10
import { getMetadataKey } from './functions' ;
10
11
@@ -39,7 +40,14 @@ export const getMetadataKeyFromFileResponse = (fileResponse: RemoteSyncInput): s
39
40
getMetadataKey ( fileResponse . type , fileResponse . fullName ) ,
40
41
] ;
41
42
}
42
- // standard key
43
+ // CustomLabels (file) => CustomLabel[] (how they're storedin SourceMembers)
44
+ if ( fileResponse . type === 'CustomLabels' && fileResponse . filePath ) {
45
+ return ComponentSet . fromSource ( fileResponse . filePath )
46
+ . getSourceComponents ( )
47
+ . toArray ( )
48
+ . flatMap ( ( component ) => component . getChildren ( ) . map ( ( child ) => getMetadataKey ( 'CustomLabel' , child . fullName ) ) ) ;
49
+ }
50
+ // standard key for everything else
43
51
return [ getMetadataKey ( fileResponse . type , fileResponse . fullName ) ] ;
44
52
} ;
45
53
You can’t perform that action at this time.
0 commit comments