Merge pull request #15855 from abpframework/auto-merge/rel-7-0/1769

Merge branch rel-7.1 with rel-7.0
pull/15856/head
Barış Can Yılmaz 3 years ago committed by GitHub
commit 5991e12ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,7 +68,9 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc
var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long);
var workDirectory = commandLineArgs.Options.GetOrNull(Options.WorkDirectory.Short, Options.WorkDirectory.Long) ?? Directory.GetCurrentDirectory();
var folder = commandLineArgs.Options.GetOrNull(Options.Folder.Long);
var serviceTypeArg = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.ServiceType.Long);
var serviceTypeArg = commandLineArgs.Options.GetOrNull(Options.ServiceType.Short, Options.ServiceType.Long);
var entryPointArg = commandLineArgs.Options.GetOrNull(Options.EntryPoint.Short, Options.EntryPoint.Long);
ServiceType? serviceType = null;
if (!serviceTypeArg.IsNullOrWhiteSpace())
@ -83,7 +85,7 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc
var withoutContracts = commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Short) ||
commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Long);
return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, withoutContracts, commandLineArgs.Options);
return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, entryPointArg,withoutContracts, commandLineArgs.Options);
}
public virtual string GetUsageInfo()
@ -190,5 +192,10 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc
public const string Short = "c";
public const string Long = "without-contracts";
}
public static class EntryPoint
{
public const string Short = "ep";
public const string Long = "entry-point";
}
}
}

@ -49,6 +49,8 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase<AngularSer
var source = args.Source ?? defaultValue;
var target = args.Target ?? defaultValue;
var url = args.Url ?? defaultValue;
var entryPoint = args.EntryPoint ?? defaultValue;
var commandBuilder = new StringBuilder("npx ng g @abp/ng.schematics:" + schematicsCommandName);
if (module != null)
@ -76,6 +78,11 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase<AngularSer
commandBuilder.Append($" --url {url}");
}
if (entryPoint != null)
{
commandBuilder.Append($" --entry-point {entryPoint}");
}
var serviceType = GetServiceType(args) ?? Volo.Abp.Cli.ServiceProxying.ServiceType.Application;
commandBuilder.Append($" --service-type {serviceType.ToString().ToLower()}");

@ -24,6 +24,7 @@ public class GenerateProxyArgs
public string Source { get; }
public string Folder { get; }
public string EntryPoint { get; }
public ServiceType? ServiceType { get; }
@ -43,6 +44,7 @@ public class GenerateProxyArgs
string source,
string folder,
ServiceType? serviceType,
string entryPoint,
bool withoutContracts,
Dictionary<string, string> extraProperties = null)
{
@ -56,6 +58,7 @@ public class GenerateProxyArgs
Source = source;
Folder = folder;
ServiceType = serviceType;
EntryPoint = entryPoint;
WithoutContracts = withoutContracts;
ExtraProperties = extraProperties ?? new Dictionary<string, string>();
}

@ -79,16 +79,16 @@
}
]
}
}
},
"entryPoint": {
"description": "Target Angular project to place the generated code",
"type": "string",
"$default": {
"$source": "argv",
"index": 5
},
"x-prompt": "Please enter target Angular project to place the generated code. (default: workspace \"defaultProject\")"
"entryPoint": {
"description": "Target Angular project to place the generated code",
"type": "string",
"$default": {
"$source": "argv",
"index": 6
},
"x-prompt": "Please enter target entry point to place the generated code. (default: null)"
}
},
"required": []
}

@ -44,10 +44,10 @@ export class DateTimeAdapter {
const date = new Date(
newValue.year,
newValue.month - 1,
value.day,
value.hour,
value.minute,
value.second,
newValue.day,
newValue.hour,
newValue.minute,
newValue.second,
);
return new Date(date).toISOString();

Loading…
Cancel
Save