Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ts.ScriptTarget.Latest,
true
);
const moduleToImport = options.effects
? 'EntityDataModule'
: 'EntityDataModuleWithoutEffects';
const effectsModuleImport = insertImport(
source,
modulePath,
moduleToImport,
'@ngrx/data'
);
const [dateEntityNgModuleImport] = addImportToModule(
source,
modulePath,
options.entityConfig
? [moduleToImport, 'forRoot(entityConfig)'].join('.')
: moduleToImport,
''
);
const changes = [effectsModuleImport, dateEntityNgModuleImport];
if (options.entityConfig) {
const entityConfigImport = insertImport(
source,
modulePath,
'entityConfig',
'./entity-metadata'