Browse Source

feat: import ObjectExtending namespace from core package

pull/5137/head
Arman Ozak 6 years ago
parent
commit
6f10a83282
  1. 4
      npm/ng-packs/packages/schematics/src/utils/type.ts

4
npm/ng-packs/packages/schematics/src/utils/type.ts

@ -8,7 +8,7 @@ import { parseGenerics } from './tree';
export function createTypeSimplifier(solution: string) { export function createTypeSimplifier(solution: string) {
const solutionRegex = new RegExp(solution.replace(/\./g, `\.`) + `\.`); const solutionRegex = new RegExp(solution.replace(/\./g, `\.`) + `\.`);
const voloRegex = /^Volo\.(Abp\.?)(Application\.?)/; const voloRegex = /^Volo\.(Abp\.?)(Application|ObjectExtending\.?)/;
return createTypeParser( return createTypeParser(
type => type =>
@ -82,7 +82,7 @@ export function createTypeToImportMapper(solution: string, namespace: string) {
const modelNamespace = parseNamespace(solution, type); const modelNamespace = parseNamespace(solution, type);
const refs = [type]; const refs = [type];
const specifiers = [adaptType(type.split('<')[0])]; const specifiers = [adaptType(type.split('<')[0])];
const path = type.startsWith('Volo.Abp.Application.Dtos') const path = /^Volo\.Abp\.(Application\.Dtos|ObjectExtending)/.test(type)
? '@abp/ng.core' ? '@abp/ng.core'
: isEnum : isEnum
? relativePathToEnum(namespace, modelNamespace, specifiers[0]) ? relativePathToEnum(namespace, modelNamespace, specifiers[0])

Loading…
Cancel
Save