Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (host: Tree, context: SchematicContext) => {
(options as any).name = '';
options.path = getProjectPath(host, options);
options.effects = options.effects === undefined ? true : options.effects;
options.module = options.module
? findModuleFromOptions(host, options as any)
: options.module;
const parsedPath = parseName(options.path, '');
options.path = parsedPath.path;
return chain([
options && options.skipPackageJson ? noop() : addNgRxDataToPackageJson(),
options.migrateNgrxData
? chain([
removeAngularNgRxDataFromPackageJson(),
renameNgrxDataModule(),
])
: addEntityDataToNgModule(options),
options.entityConfig
? createEntityConfigFile(options, parsedPath.path)
: noop(),
])(host, context);
};
}