@autorest/powershell 3.0.488 → 3.0.491

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.
@@ -72,7 +72,7 @@
72
72
  "powershell/models/model-extensions.ts": "92f57419e2bb8aec5272d62742ad528caebb66f4",
73
73
  "powershell/module/module-class.ts": "c792f01e3bfecb7c22efd953feb175f6b8394c78",
74
74
  "powershell/module/module-namespace.ts": "f6afc90087e8d733f0323b0de8ba41d923955732",
75
- "powershell/package.json": "4a0f82fd3f15aab6493da1e13ed6826325511d53",
75
+ "powershell/package.json": "43c2cdb2a38eccec97305ef150f53eac96a974e6",
76
76
  "powershell/plugins/add-azure-completers-v2.ts": "557ce4326318c82f91445490a162f20fa029fed3",
77
77
  "powershell/plugins/create-commands-v2.ts": "f14548b59f952ac5bdf3a89f52e1eeb2e05e6da0",
78
78
  "powershell/plugins/cs-namer-v2.ts": "e294a2f5ac3db421d030a3bba8343a3d4a9ea6ab",
@@ -216,11 +216,11 @@
216
216
  "powershell/resources/psruntime/BuildTime/Models/PsHelpMarkdownOutputs.cs": "056be554968d76667c0659d169f674ef5dbb74ed",
217
217
  "powershell/resources/psruntime/BuildTime/Models/PsHelpTypes.cs": "34d832146757eab7d8e1bd3feba5d411577f388a",
218
218
  "powershell/resources/psruntime/BuildTime/Models/PsMarkdownTypes.cs": "04c8ab64ab6269ee2cf7193494425d869bb6b94d",
219
- "powershell/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs": "c66994a1704416b2014c57d7360cbd77286cda63",
219
+ "powershell/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs": "7554eebb07eeb7e210880252b363e72e95da3b87",
220
220
  "powershell/resources/psruntime/BuildTime/Models/PsProxyTypes.cs": "d12d48f864b20004aa129623ebd032e8f16cdee2",
221
221
  "powershell/resources/psruntime/BuildTime/PsAttributes.cs": "db38af61484cec976c6833987625e191cfea5d5d",
222
222
  "powershell/resources/psruntime/BuildTime/PsExtensions.cs": "a816496e5ec66952ba2f8f3709f665b02e24020a",
223
- "powershell/resources/psruntime/BuildTime/PsHelpers.cs": "9958d6426383fc7325c13722d221554467b1fa93",
223
+ "powershell/resources/psruntime/BuildTime/PsHelpers.cs": "4f9aed43c1421775f94bb4a3c58921c59af9a4a3",
224
224
  "powershell/resources/psruntime/BuildTime/StringExtensions.cs": "83ef554ac7f477fa9cfdece0c83a9e176e2a8e4c",
225
225
  "powershell/resources/psruntime/BuildTime/XmlExtensions.cs": "abb7ed48b92fa656c204949f9c637def99fac991",
226
226
  "powershell/resources/psruntime/Debugging.cs": "a1ce271f69caa871f2bd7fab2e1d4e9aee0bfa2c",
@@ -315,7 +315,7 @@
315
315
  "powershell/resources/runtime/csharp/pipeline/EventListener.cs": "350991c330499c8770e33d0ca3cf34edfd93bf0a",
316
316
  "powershell/resources/runtime/csharp/pipeline/Events.cs": "660584ecfc9b22ea32287991284e4cef4623ce27",
317
317
  "powershell/resources/runtime/csharp/pipeline/ISendAsync.cs": "8bda5bc6f964056058b18446b5ba67f86cc5472b",
318
- "powershell/resources/runtime/csharp/pipeline/PipelineMocking.cs": "33810ca9f7e477886759085fb20990e0ab5a0243",
318
+ "powershell/resources/runtime/csharp/pipeline/PipelineMocking.cs": "6082ba80ed830698b034b88e31ae16050fbcd6c8",
319
319
  "powershell/resources/runtime/csharp/pipeline/Response.cs": "0916ff12e3cbe15950a260245274af684256158b",
320
320
  "powershell/resources/runtime/csharp/pipeline/delegates.cs": "3abbd1354807e026f0d05a72e7d538533d775984",
321
321
  "powershell/resources/runtime/csharp/xml/IXmlSerializable.cs": "4ec8c13c3edc40460647700ab83cd5c632caa1e7",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/powershell",
3
- "version": "3.0.488",
3
+ "version": "3.0.491",
4
4
  "description": "AutoRest PowerShell Cmdlet Generator",
5
5
  "main": "dist/exports.js",
6
6
  "typings": "dist/exports.d.ts",
@@ -199,7 +199,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
199
199
  {
200
200
  return $@"
201
201
  {Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{
202
- {Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString()
202
+ {Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
203
203
  {Indent}{Indent}}}
204
204
  {Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
205
205
  {Indent}{Indent}if ($preTelemetryId -eq '') {{
@@ -604,7 +604,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
604
604
  return ni.IsComplexInterface
605
605
  ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false)
606
606
  : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks);
607
- }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, !isFirst && includeBackticks));
607
+ }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks));
608
608
  return String.Join(Environment.NewLine, nested);
609
609
  }
610
610
  }
@@ -39,9 +39,10 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
39
39
  public static IEnumerable<FunctionInfo> GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder)
40
40
  {
41
41
  // https://stackoverflow.com/a/40969712/294804
42
+ var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'";
42
43
  var getCmdletsCommand = $@"
43
44
  $currentFunctions = Get-ChildItem function:
44
- Get-ChildItem -Path '{scriptFolder}' -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }}
45
+ Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }}
45
46
  Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }}
46
47
  ";
47
48
  return cmdlet?.RunScript<FunctionInfo>(getCmdletsCommand) ?? RunScript<FunctionInfo>(getCmdletsCommand);
@@ -259,4 +259,4 @@ namespace Microsoft.Rest.ClientRuntime
259
259
  }
260
260
  }
261
261
  }
262
- }
262
+ }