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IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AA1BD,4BA0BC","sourcesContent":["import {\n apply,\n applyTemplates,\n branchAndMerge,\n chain,\n filter,\n mergeWith,\n move,\n noop,\n Rule,\n SchematicContext,\n Tree,\n url,\n} from '@angular-devkit/schematics';\nimport { getProjectPath, parseName, stringUtils } from '../../schematics-core';\nimport { Schema as DataOptions } from './schema';\n\nexport default function (options: DataOptions): Rule {\n return (host: Tree, context: SchematicContext) => {\n options.path = getProjectPath(host, options);\n\n const parsedPath = parseName(options.path, options.name);\n options.name = parsedPath.name;\n options.path = parsedPath.path;\n\n const templateSource = apply(url('./files'), [\n options.skipTests\n ? filter((path) => !path.endsWith('.spec.ts.template'))\n : noop(),\n applyTemplates({\n ...stringUtils,\n 'if-flat': (s: string) =>\n stringUtils.group(options.flat ? '' : s, options.group ? 'data' : ''),\n ...options,\n }),\n move(parsedPath.path),\n ]);\n\n return chain([branchAndMerge(chain([mergeWith(templateSource)]))])(\n host,\n context\n );\n };\n}\n"]} |