File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export type EnvironmentOptions = ConflicterOptions &
6363 yeomanRepository ?: string ;
6464 arboristRegistry ?: string ;
6565 nodePackageManager ?: string ;
66+ generatorLookupOptions ?: Pick < EnvironmentLookupOptions , 'customizeNamespace' | 'lookups' > ;
6667 } ;
6768
6869const getInstantiateOptions = ( firstArg ?: any , generatorOptions ?: any ) : InstantiateOptions => {
@@ -200,7 +201,7 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
200201 this . runLoop . setMaxListeners ( 0 ) ;
201202 this . sharedFs . setMaxListeners ( 0 ) ;
202203
203- this . lookups = defaultLookups ;
204+ this . lookups = this . options . generatorLookupOptions ?. lookups ?? defaultLookups ;
204205
205206 this . sharedOptions = sharedOptions ;
206207
@@ -629,7 +630,7 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
629630 async lookup ( options ?: EnvironmentLookupOptions ) : Promise < LookupGeneratorMeta [ ] > {
630631 const {
631632 registerToScope,
632- customizeNamespace = ( ns : string ) => ns ,
633+ customizeNamespace = this . options . generatorLookupOptions ?. customizeNamespace ?? ( ( ns : string ) => ns ) ,
633634 lookups = this . lookups ,
634635 ...remainingOptions
635636 } = options ?? { localOnly : false } ;
You can’t perform that action at this time.
0 commit comments