@autorest/powershell 4.0.739 → 4.0.740
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"powershell/models/model-extensions.ts": "2b3c129d070b0a30b01d32eb8998043c30b1bd7d",
|
|
78
78
|
"powershell/module/module-class.ts": "ffef6105f5566125c72dc525dd33ed0ddd05b910",
|
|
79
79
|
"powershell/module/module-namespace.ts": "f6afc90087e8d733f0323b0de8ba41d923955732",
|
|
80
|
-
"powershell/package.json": "
|
|
80
|
+
"powershell/package.json": "76c84072612b2ba2a6abe190b023e359b0484b1a",
|
|
81
81
|
"powershell/plugins/add-azure-completers-v2.ts": "46e91eb274a6a863315be8c0d5c9d84597654bce",
|
|
82
82
|
"powershell/plugins/create-commands-v2.ts": "b4788ac66e3c21959b38f69a78d275991f90b660",
|
|
83
83
|
"powershell/plugins/cs-namer-v2.ts": "f16981643ae24355e937ea717e33508e46dd2da2",
|
|
@@ -227,10 +227,10 @@
|
|
|
227
227
|
"powershell/resources/psruntime/BuildTime/MarkdownRenderer.cs": "e8c3896a1b305d424abec25daefd9cb3549a694b",
|
|
228
228
|
"powershell/resources/psruntime/BuildTime/Models/PsFormatTypes.cs": "40fffed4474e6e4c2d7a057370a2aa036001b09a",
|
|
229
229
|
"powershell/resources/psruntime/BuildTime/Models/PsHelpMarkdownOutputs.cs": "056be554968d76667c0659d169f674ef5dbb74ed",
|
|
230
|
-
"powershell/resources/psruntime/BuildTime/Models/PsHelpTypes.cs": "
|
|
230
|
+
"powershell/resources/psruntime/BuildTime/Models/PsHelpTypes.cs": "4f239ab459b0abf4f3e1dc0cb7e6cf490fb9cf21",
|
|
231
231
|
"powershell/resources/psruntime/BuildTime/Models/PsMarkdownTypes.cs": "c2c068932d2e4ab31a46d566e7b24f357f68c6f8",
|
|
232
232
|
"powershell/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs": "345f1f9808087b45984e0dabc2400b1499b68c44",
|
|
233
|
-
"powershell/resources/psruntime/BuildTime/Models/PsProxyTypes.cs": "
|
|
233
|
+
"powershell/resources/psruntime/BuildTime/Models/PsProxyTypes.cs": "75ea91810089fb5d7170f1bed0d8023aabd2f74a",
|
|
234
234
|
"powershell/resources/psruntime/BuildTime/PsAttributes.cs": "42cd061f1a91cef396cd392584e7eab268c4bc3a",
|
|
235
235
|
"powershell/resources/psruntime/BuildTime/PsExtensions.cs": "52083232ddc161a0f41496cbdf979d709c490194",
|
|
236
236
|
"powershell/resources/psruntime/BuildTime/PsHelpers.cs": "c9bae00316dedb24a93eeebf73b2728fe9447494",
|
package/package.json
CHANGED
|
@@ -36,14 +36,23 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
|
|
|
36
36
|
public object Role { get; }
|
|
37
37
|
public string NonTerminatingErrors { get; }
|
|
38
38
|
|
|
39
|
+
public static string CapitalizeFirstLetter(string text)
|
|
40
|
+
{
|
|
41
|
+
if (string.IsNullOrEmpty(text))
|
|
42
|
+
return text;
|
|
43
|
+
|
|
44
|
+
return char.ToUpper(text[0]) + text.Substring(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
public PsHelpInfo(PSObject helpObject = null)
|
|
40
48
|
{
|
|
41
49
|
helpObject = helpObject ?? new PSObject();
|
|
42
50
|
CmdletName = helpObject.GetProperty<string>("Name").NullIfEmpty() ?? helpObject.GetNestedProperty<string>("details", "name");
|
|
43
51
|
ModuleName = helpObject.GetProperty<string>("ModuleName");
|
|
44
|
-
Synopsis = helpObject.GetProperty<string>("Synopsis");
|
|
52
|
+
Synopsis = CapitalizeFirstLetter(helpObject.GetProperty<string>("Synopsis"));
|
|
45
53
|
Description = helpObject.GetProperty<PSObject[]>("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ??
|
|
46
54
|
helpObject.GetNestedProperty<PSObject[]>("details", "description").EmptyIfNull().ToDescriptionText();
|
|
55
|
+
Description = CapitalizeFirstLetter(Description);
|
|
47
56
|
AlertText = helpObject.GetNestedProperty<PSObject[]>("alertSet", "alert").EmptyIfNull().ToDescriptionText();
|
|
48
57
|
Category = helpObject.GetProperty<string>("Category");
|
|
49
58
|
HasCommonParameters = helpObject.GetProperty<string>("CommonParameters").ToNullableBool();
|
|
@@ -392,6 +392,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
|
|
|
392
392
|
var helpInfo = variantGroup.HelpInfo;
|
|
393
393
|
Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType<DescriptionAttribute>().FirstOrDefault()?.Description.NullIfEmpty()
|
|
394
394
|
?? helpInfo.Description.EmptyIfNull();
|
|
395
|
+
Description = PsHelpInfo.CapitalizeFirstLetter(Description);
|
|
395
396
|
// If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation.
|
|
396
397
|
var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis;
|
|
397
398
|
Synopsis = synopsis.NullIfEmpty() ?? Description;
|