@autorest/powershell 4.0.0-dev.8 → 4.0.617

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.
Files changed (316) hide show
  1. package/.rush/temp/operation/build/state.json +3 -0
  2. package/.rush/temp/package-deps_build.json +106 -103
  3. package/.rush/temp/shrinkwrap-deps.json +182 -234
  4. package/dist/cmdlets/class.d.ts +12 -1
  5. package/dist/cmdlets/class.d.ts.map +1 -1
  6. package/dist/cmdlets/class.js +693 -532
  7. package/dist/cmdlets/class.js.map +1 -1
  8. package/dist/cmdlets/namespace.d.ts.map +1 -1
  9. package/dist/cmdlets/namespace.js +38 -5
  10. package/dist/cmdlets/namespace.js.map +1 -1
  11. package/dist/enums/namespace.js +5 -5
  12. package/dist/enums/namespace.js.map +1 -1
  13. package/dist/generators/psm1.custom.js +2 -2
  14. package/dist/generators/psm1.custom.js.map +1 -1
  15. package/dist/generators/psm1.internal.js +2 -2
  16. package/dist/generators/psm1.internal.js.map +1 -1
  17. package/dist/generators/psm1.js +1 -1
  18. package/dist/generators/psm1.js.map +1 -1
  19. package/dist/generators/script-cmdlet.js +18 -18
  20. package/dist/generators/script-cmdlet.js.map +1 -1
  21. package/dist/internal/name-inferrer.d.ts +1 -1
  22. package/dist/internal/name-inferrer.d.ts.map +1 -1
  23. package/dist/internal/name-inferrer.js +12 -12
  24. package/dist/internal/name-inferrer.js.map +1 -1
  25. package/dist/internal/powershell-declarations.d.ts +2 -0
  26. package/dist/internal/powershell-declarations.d.ts.map +1 -1
  27. package/dist/internal/powershell-declarations.js +4 -2
  28. package/dist/internal/powershell-declarations.js.map +1 -1
  29. package/dist/internal/project.d.ts +3 -5
  30. package/dist/internal/project.d.ts.map +1 -1
  31. package/dist/internal/project.js +14 -18
  32. package/dist/internal/project.js.map +1 -1
  33. package/dist/internal/state.d.ts +1 -1
  34. package/dist/internal/state.d.ts.map +1 -1
  35. package/dist/llcsharp/clientruntime.d.ts +1 -0
  36. package/dist/llcsharp/clientruntime.d.ts.map +1 -1
  37. package/dist/llcsharp/clientruntime.js +12 -11
  38. package/dist/llcsharp/clientruntime.js.map +1 -1
  39. package/dist/llcsharp/code-model.d.ts +7 -7
  40. package/dist/llcsharp/code-model.d.ts.map +1 -1
  41. package/dist/llcsharp/enums/enum.d.ts +1 -1
  42. package/dist/llcsharp/enums/enum.d.ts.map +1 -1
  43. package/dist/llcsharp/enums/enum.js +42 -42
  44. package/dist/llcsharp/enums/enum.js.map +1 -1
  45. package/dist/llcsharp/exports.js +5 -1
  46. package/dist/llcsharp/exports.js.map +1 -1
  47. package/dist/llcsharp/generator.d.ts +1 -1
  48. package/dist/llcsharp/generator.d.ts.map +1 -1
  49. package/dist/llcsharp/model/idictionary.js +16 -16
  50. package/dist/llcsharp/model/idictionary.js.map +1 -1
  51. package/dist/llcsharp/model/interface.d.ts +1 -1
  52. package/dist/llcsharp/model/interface.d.ts.map +1 -1
  53. package/dist/llcsharp/model/interface.js +25 -11
  54. package/dist/llcsharp/model/interface.js.map +1 -1
  55. package/dist/llcsharp/model/model-class-dictionary.js +18 -18
  56. package/dist/llcsharp/model/model-class-dictionary.js.map +1 -1
  57. package/dist/llcsharp/model/model-class-json.js +19 -19
  58. package/dist/llcsharp/model/model-class-json.js.map +1 -1
  59. package/dist/llcsharp/model/model-class-serializer.d.ts +1 -1
  60. package/dist/llcsharp/model/model-class-serializer.d.ts.map +1 -1
  61. package/dist/llcsharp/model/model-class-serializer.js +6 -6
  62. package/dist/llcsharp/model/model-class-serializer.js.map +1 -1
  63. package/dist/llcsharp/model/model-class.d.ts +1 -1
  64. package/dist/llcsharp/model/model-class.d.ts.map +1 -1
  65. package/dist/llcsharp/model/model-class.js +97 -89
  66. package/dist/llcsharp/model/model-class.js.map +1 -1
  67. package/dist/llcsharp/model/namespace.d.ts +1 -1
  68. package/dist/llcsharp/model/namespace.d.ts.map +1 -1
  69. package/dist/llcsharp/model/namespace.js +4 -12
  70. package/dist/llcsharp/model/namespace.js.map +1 -1
  71. package/dist/llcsharp/model/property.d.ts +1 -1
  72. package/dist/llcsharp/model/property.d.ts.map +1 -1
  73. package/dist/llcsharp/model/property.js +20 -20
  74. package/dist/llcsharp/model/property.js.map +1 -1
  75. package/dist/llcsharp/operation/api-class.d.ts.map +1 -1
  76. package/dist/llcsharp/operation/api-class.js +26 -1
  77. package/dist/llcsharp/operation/api-class.js.map +1 -1
  78. package/dist/llcsharp/operation/method.d.ts +10 -5
  79. package/dist/llcsharp/operation/method.d.ts.map +1 -1
  80. package/dist/llcsharp/operation/method.js +276 -134
  81. package/dist/llcsharp/operation/method.js.map +1 -1
  82. package/dist/llcsharp/operation/parameter.d.ts +1 -1
  83. package/dist/llcsharp/operation/parameter.d.ts.map +1 -1
  84. package/dist/llcsharp/operation/parameter.js +10 -10
  85. package/dist/llcsharp/operation/parameter.js.map +1 -1
  86. package/dist/llcsharp/project.d.ts +4 -2
  87. package/dist/llcsharp/project.d.ts.map +1 -1
  88. package/dist/llcsharp/project.js +11 -3
  89. package/dist/llcsharp/project.js.map +1 -1
  90. package/dist/llcsharp/schema/Uuid.d.ts +1 -1
  91. package/dist/llcsharp/schema/Uuid.d.ts.map +1 -1
  92. package/dist/llcsharp/schema/Uuid.js +2 -2
  93. package/dist/llcsharp/schema/Uuid.js.map +1 -1
  94. package/dist/llcsharp/schema/array.d.ts +1 -1
  95. package/dist/llcsharp/schema/array.d.ts.map +1 -1
  96. package/dist/llcsharp/schema/array.js +45 -43
  97. package/dist/llcsharp/schema/array.js.map +1 -1
  98. package/dist/llcsharp/schema/binary.d.ts +1 -1
  99. package/dist/llcsharp/schema/binary.d.ts.map +1 -1
  100. package/dist/llcsharp/schema/binary.js +9 -9
  101. package/dist/llcsharp/schema/binary.js.map +1 -1
  102. package/dist/llcsharp/schema/boolean.d.ts +1 -1
  103. package/dist/llcsharp/schema/boolean.d.ts.map +1 -1
  104. package/dist/llcsharp/schema/byte-array.d.ts +1 -1
  105. package/dist/llcsharp/schema/byte-array.d.ts.map +1 -1
  106. package/dist/llcsharp/schema/byte-array.js +24 -24
  107. package/dist/llcsharp/schema/byte-array.js.map +1 -1
  108. package/dist/llcsharp/schema/char.d.ts +1 -1
  109. package/dist/llcsharp/schema/char.d.ts.map +1 -1
  110. package/dist/llcsharp/schema/char.js +1 -1
  111. package/dist/llcsharp/schema/char.js.map +1 -1
  112. package/dist/llcsharp/schema/date-time.d.ts +1 -1
  113. package/dist/llcsharp/schema/date-time.d.ts.map +1 -1
  114. package/dist/llcsharp/schema/date-time.js +45 -41
  115. package/dist/llcsharp/schema/date-time.js.map +1 -1
  116. package/dist/llcsharp/schema/date.d.ts +1 -1
  117. package/dist/llcsharp/schema/date.d.ts.map +1 -1
  118. package/dist/llcsharp/schema/duration.d.ts +1 -1
  119. package/dist/llcsharp/schema/duration.d.ts.map +1 -1
  120. package/dist/llcsharp/schema/duration.js +9 -7
  121. package/dist/llcsharp/schema/duration.js.map +1 -1
  122. package/dist/llcsharp/schema/enum.d.ts +6 -2
  123. package/dist/llcsharp/schema/enum.d.ts.map +1 -1
  124. package/dist/llcsharp/schema/enum.js +13 -4
  125. package/dist/llcsharp/schema/enum.js.map +1 -1
  126. package/dist/llcsharp/schema/extended-type-declaration.d.ts +1 -1
  127. package/dist/llcsharp/schema/extended-type-declaration.d.ts.map +1 -1
  128. package/dist/llcsharp/schema/fixed-array.d.ts +1 -1
  129. package/dist/llcsharp/schema/fixed-array.d.ts.map +1 -1
  130. package/dist/llcsharp/schema/fixed-array.js +44 -42
  131. package/dist/llcsharp/schema/fixed-array.js.map +1 -1
  132. package/dist/llcsharp/schema/integer.d.ts +1 -1
  133. package/dist/llcsharp/schema/integer.d.ts.map +1 -1
  134. package/dist/llcsharp/schema/integer.js +5 -5
  135. package/dist/llcsharp/schema/integer.js.map +1 -1
  136. package/dist/llcsharp/schema/object.d.ts +1 -1
  137. package/dist/llcsharp/schema/object.d.ts.map +1 -1
  138. package/dist/llcsharp/schema/object.js +28 -28
  139. package/dist/llcsharp/schema/object.js.map +1 -1
  140. package/dist/llcsharp/schema/password.d.ts +1 -1
  141. package/dist/llcsharp/schema/password.d.ts.map +1 -1
  142. package/dist/llcsharp/schema/password.js +13 -13
  143. package/dist/llcsharp/schema/password.js.map +1 -1
  144. package/dist/llcsharp/schema/primitive.d.ts +1 -1
  145. package/dist/llcsharp/schema/primitive.d.ts.map +1 -1
  146. package/dist/llcsharp/schema/primitive.js +40 -37
  147. package/dist/llcsharp/schema/primitive.js.map +1 -1
  148. package/dist/llcsharp/schema/schema-resolver.d.ts +1 -1
  149. package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
  150. package/dist/llcsharp/schema/schema-resolver.js +4 -9
  151. package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
  152. package/dist/llcsharp/schema/string.d.ts +1 -1
  153. package/dist/llcsharp/schema/string.d.ts.map +1 -1
  154. package/dist/llcsharp/schema/string.js +48 -44
  155. package/dist/llcsharp/schema/string.js.map +1 -1
  156. package/dist/llcsharp/schema/uri.d.ts +1 -1
  157. package/dist/llcsharp/schema/uri.d.ts.map +1 -1
  158. package/dist/llcsharp/schema/uri.js +2 -2
  159. package/dist/llcsharp/schema/uri.js.map +1 -1
  160. package/dist/llcsharp/validations.js +2 -2
  161. package/dist/llcsharp/validations.js.map +1 -1
  162. package/dist/main.js +2 -2
  163. package/dist/main.js.map +1 -1
  164. package/dist/models/model-extensions.d.ts +1 -1
  165. package/dist/models/model-extensions.d.ts.map +1 -1
  166. package/dist/models/model-extensions.js +39 -39
  167. package/dist/models/model-extensions.js.map +1 -1
  168. package/dist/module/module-class.js +8 -8
  169. package/dist/module/module-class.js.map +1 -1
  170. package/dist/module/module-namespace.js +3 -3
  171. package/dist/module/module-namespace.js.map +1 -1
  172. package/dist/plugins/add-azure-completers-v2.d.ts +1 -1
  173. package/dist/plugins/add-azure-completers-v2.d.ts.map +1 -1
  174. package/dist/plugins/add-azure-completers-v2.js +3 -3
  175. package/dist/plugins/add-azure-completers-v2.js.map +1 -1
  176. package/dist/plugins/create-commands-v2.d.ts +9 -7
  177. package/dist/plugins/create-commands-v2.d.ts.map +1 -1
  178. package/dist/plugins/create-commands-v2.js +233 -62
  179. package/dist/plugins/create-commands-v2.js.map +1 -1
  180. package/dist/plugins/cs-namer-v2.d.ts +1 -1
  181. package/dist/plugins/cs-namer-v2.d.ts.map +1 -1
  182. package/dist/plugins/cs-namer-v2.js +40 -40
  183. package/dist/plugins/cs-namer-v2.js.map +1 -1
  184. package/dist/plugins/llcsharp-v2.d.ts +1 -1
  185. package/dist/plugins/llcsharp-v2.d.ts.map +1 -1
  186. package/dist/plugins/llcsharp-v2.js +12 -7
  187. package/dist/plugins/llcsharp-v2.js.map +1 -1
  188. package/dist/plugins/modifiers-v2.d.ts +1 -1
  189. package/dist/plugins/modifiers-v2.d.ts.map +1 -1
  190. package/dist/plugins/modifiers-v2.js +109 -78
  191. package/dist/plugins/modifiers-v2.js.map +1 -1
  192. package/dist/plugins/plugin-create-inline-properties.d.ts +1 -1
  193. package/dist/plugins/plugin-create-inline-properties.d.ts.map +1 -1
  194. package/dist/plugins/plugin-create-inline-properties.js +42 -31
  195. package/dist/plugins/plugin-create-inline-properties.js.map +1 -1
  196. package/dist/plugins/plugin-tweak-m4-model.d.ts +1 -1
  197. package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -1
  198. package/dist/plugins/plugin-tweak-m4-model.js +19 -7
  199. package/dist/plugins/plugin-tweak-m4-model.js.map +1 -1
  200. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts +1 -1
  201. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts.map +1 -1
  202. package/dist/plugins/plugin-tweak-model-azure-v2.js +17 -17
  203. package/dist/plugins/plugin-tweak-model-azure-v2.js.map +1 -1
  204. package/dist/plugins/plugin-tweak-model.d.ts +1 -1
  205. package/dist/plugins/plugin-tweak-model.d.ts.map +1 -1
  206. package/dist/plugins/plugin-tweak-model.js +31 -31
  207. package/dist/plugins/plugin-tweak-model.js.map +1 -1
  208. package/dist/plugins/powershell-v2.d.ts +1 -1
  209. package/dist/plugins/powershell-v2.d.ts.map +1 -1
  210. package/dist/plugins/powershell-v2.js +26 -26
  211. package/dist/plugins/powershell-v2.js.map +1 -1
  212. package/dist/plugins/ps-namer-v2.d.ts +1 -1
  213. package/dist/plugins/ps-namer-v2.d.ts.map +1 -1
  214. package/dist/plugins/ps-namer-v2.js +31 -31
  215. package/dist/plugins/ps-namer-v2.js.map +1 -1
  216. package/dist/plugins/sdk-create-inline-properties.d.ts +1 -1
  217. package/dist/plugins/sdk-create-inline-properties.d.ts.map +1 -1
  218. package/dist/plugins/sdk-create-inline-properties.js +37 -37
  219. package/dist/plugins/sdk-create-inline-properties.js.map +1 -1
  220. package/dist/plugins/sdk-cs-namer.d.ts +1 -1
  221. package/dist/plugins/sdk-cs-namer.d.ts.map +1 -1
  222. package/dist/plugins/sdk-cs-namer.js +21 -21
  223. package/dist/plugins/sdk-cs-namer.js.map +1 -1
  224. package/dist/plugins/sdk-cs-simplifier.d.ts +1 -1
  225. package/dist/plugins/sdk-cs-simplifier.d.ts.map +1 -1
  226. package/dist/plugins/sdk-cs-simplifier.js +3 -3
  227. package/dist/plugins/sdk-cs-simplifier.js.map +1 -1
  228. package/dist/plugins/sdk-generate.d.ts +1 -1
  229. package/dist/plugins/sdk-generate.d.ts.map +1 -1
  230. package/dist/plugins/sdk-generate.js +14 -14
  231. package/dist/plugins/sdk-generate.js.map +1 -1
  232. package/dist/plugins/sdk-tweak-model.d.ts +1 -1
  233. package/dist/plugins/sdk-tweak-model.d.ts.map +1 -1
  234. package/dist/plugins/sdk-tweak-model.js +23 -23
  235. package/dist/plugins/sdk-tweak-model.js.map +1 -1
  236. package/dist/sdk/project.d.ts +2 -2
  237. package/dist/sdk/project.d.ts.map +1 -1
  238. package/dist/sdk/project.js +8 -8
  239. package/dist/sdk/project.js.map +1 -1
  240. package/dist/sdk/state.d.ts +2 -2
  241. package/dist/sdk/state.d.ts.map +1 -1
  242. package/dist/sdk/utility.d.ts +1 -1
  243. package/dist/sdk/utility.d.ts.map +1 -1
  244. package/dist/sdk/utility.js +17 -16
  245. package/dist/sdk/utility.js.map +1 -1
  246. package/dist/utils/PwshModel.d.ts +1 -1
  247. package/dist/utils/PwshModel.d.ts.map +1 -1
  248. package/dist/utils/PwshModel.js +1 -1
  249. package/dist/utils/PwshModel.js.map +1 -1
  250. package/dist/utils/SdkModel.d.ts +1 -1
  251. package/dist/utils/SdkModel.d.ts.map +1 -1
  252. package/dist/utils/SdkModel.js +1 -1
  253. package/dist/utils/SdkModel.js.map +1 -1
  254. package/dist/utils/command-operation.d.ts +9 -3
  255. package/dist/utils/command-operation.d.ts.map +1 -1
  256. package/dist/utils/command-operation.js +24 -4
  257. package/dist/utils/command-operation.js.map +1 -1
  258. package/dist/utils/components.d.ts +1 -1
  259. package/dist/utils/components.d.ts.map +1 -1
  260. package/dist/utils/components.js +2 -2
  261. package/dist/utils/components.js.map +1 -1
  262. package/dist/utils/http-operation.d.ts +2 -0
  263. package/dist/utils/http-operation.d.ts.map +1 -1
  264. package/dist/utils/http-operation.js +16 -12
  265. package/dist/utils/http-operation.js.map +1 -1
  266. package/dist/utils/model-state.d.ts +1 -1
  267. package/dist/utils/model-state.d.ts.map +1 -1
  268. package/dist/utils/model-state.js +20 -20
  269. package/dist/utils/model-state.js.map +1 -1
  270. package/dist/utils/programatic-operation.d.ts +1 -1
  271. package/dist/utils/programatic-operation.d.ts.map +1 -1
  272. package/dist/utils/programatic-operation.js +1 -1
  273. package/dist/utils/programatic-operation.js.map +1 -1
  274. package/dist/utils/resolve-conflicts.js +8 -8
  275. package/dist/utils/resolve-conflicts.js.map +1 -1
  276. package/dist/utils/resourceName.d.ts +3 -0
  277. package/dist/utils/resourceName.d.ts.map +1 -0
  278. package/dist/utils/resourceName.js +29 -0
  279. package/dist/utils/resourceName.js.map +1 -0
  280. package/dist/utils/schema.d.ts +1 -1
  281. package/dist/utils/schema.d.ts.map +1 -1
  282. package/dist/utils/schema.js +11 -11
  283. package/dist/utils/schema.js.map +1 -1
  284. package/dist/utils/security-scheme.d.ts +2 -2
  285. package/dist/utils/security-scheme.d.ts.map +1 -1
  286. package/dist/utils/security-scheme.js +2 -2
  287. package/dist/utils/security-scheme.js.map +1 -1
  288. package/dist/utils/sort-parameters.d.ts +3 -0
  289. package/dist/utils/sort-parameters.d.ts.map +1 -0
  290. package/dist/utils/sort-parameters.js +33 -0
  291. package/dist/utils/sort-parameters.js.map +1 -0
  292. package/package.json +7 -7
  293. package/resources/assets/build-module.ps1 +9 -4
  294. package/resources/assets/check-dependencies.ps1 +3 -3
  295. package/resources/assets/create-model-cmdlets.ps1 +33 -5
  296. package/resources/assets/export-surface.ps1 +3 -3
  297. package/resources/assets/generate-help.ps1 +5 -5
  298. package/resources/assets/generate-portal-ux.ps1 +3 -3
  299. package/resources/assets/run-module.ps1 +4 -4
  300. package/resources/assets/test-module.ps1 +5 -5
  301. package/resources/assets/tools/Resources/custom/New-AzDeployment.ps1 +2 -2
  302. package/resources/psruntime/Attributes/PSArgumentCompleterAttribute.cs +52 -0
  303. package/resources/psruntime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +4 -1
  304. package/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +4 -1
  305. package/resources/psruntime/BuildTime/Cmdlets/ExportPsd1.cs +6 -4
  306. package/resources/psruntime/BuildTime/MarkdownRenderer.cs +16 -8
  307. package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +20 -3
  308. package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +28 -2
  309. package/resources/psruntime/BuildTime/PsAttributes.cs +5 -0
  310. package/resources/psruntime/BuildTime/PsHelpers.cs +4 -3
  311. package/resources/psruntime/MessageAttribute.cs +23 -52
  312. package/resources/psruntime/MessageAttributeHelper.cs +5 -1
  313. package/resources/psruntime/Properties/Resources.Designer.cs +15 -2
  314. package/resources/psruntime/Properties/Resources.resx +4 -1
  315. package/resources/runtime/csharp/pipeline/ISendAsync.cs +113 -0
  316. package/resources/runtime/csharp/pipeline/PipelineMocking.cs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../utils/security-scheme.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,oBAAY,MAAM;IAChB,MAAM,WAAW;CAClB;AACD,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;CAChC;AAED,qBAAa,oBAAqB,SAAQ,UAAW,YAAW,oBAAoB;IAG/D,IAAI,EAAE,MAAM;IAF/B,UAAU,kBAAyB;gBAEhB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC;CAM7G;AAED,qBAAa,wBAAyB,SAAQ,UAAW,YAAW,wBAAwB;IAC1F,UAAU,kBAAyB;IACnC,MAAM,SAAiB;gBAEX,WAAW,CAAC,EAAE,WAAW,CAAC,wBAAwB,CAAC;CAKhE;AAED,qBAAa,iBAAkB,SAAQ,UAAW,YAAW,iBAAiB;IAIzD,gBAAgB,EAAE,MAAM;IAH3C,UAAU,kBAAyB;IACnC,MAAM,qBAA4B;gBAEf,gBAAgB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC;CAI1F;AAED,qBAAa,2BAA4B,SAAQ,UAAW,YAAW,2BAA2B;IAG7E,MAAM,EAAE,MAAM;IAFjC,UAAU,kBAAyB;gBAEhB,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAC;CAK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U;IAC1D,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,2BAA4B,SAAQ,UAAU;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACtD,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;CAChD"}
@@ -10,14 +10,14 @@ const linq_1 = require("@azure-tools/linq");
10
10
  var Scheme;
11
11
  (function (Scheme) {
12
12
  Scheme["Bearer"] = "bearer";
13
- })(Scheme = exports.Scheme || (exports.Scheme = {}));
13
+ })(Scheme || (exports.Scheme = Scheme = {}));
14
14
  var SecurityType;
15
15
  (function (SecurityType) {
16
16
  SecurityType["ApiKey"] = "apiKey";
17
17
  SecurityType["Http"] = "http";
18
18
  SecurityType["OAuth2"] = "oauth2";
19
19
  SecurityType["OpenIDConnect"] = "openIdConnect";
20
- })(SecurityType = exports.SecurityType || (exports.SecurityType = {}));
20
+ })(SecurityType || (exports.SecurityType = SecurityType = {}));
21
21
  class APIKeySecurityScheme extends extensions_1.Extensions {
22
22
  constructor(name, inWhere, initializer) {
23
23
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"security-scheme.js","sourceRoot":"","sources":["../../utils/security-scheme.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,6CAA0C;AAE1C,4CAA+C;AAG/C,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,2BAAiB,CAAA;AACnB,CAAC,EAFW,MAAM,GAAN,cAAM,KAAN,cAAM,QAEjB;AACD,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,+CAA+B,CAAA;AACjC,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAED,MAAa,oBAAqB,SAAQ,uBAAU;IAGlD,YAAmB,IAAY,EAAE,OAA0B,EAAE,WAA+C;QAC1G,KAAK,EAAE,CAAC;QADS,SAAI,GAAJ,IAAI,CAAQ;QAF/B,eAAU,GAAG,IAAI,iBAAU,EAAO,CAAC;QAIjC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;CACF;AATD,oDASC;AAED,MAAa,wBAAyB,SAAQ,uBAAU;IAItD,YAAY,WAAmD;QAC7D,KAAK,EAAE,CAAC;QAJV,eAAU,GAAG,IAAI,iBAAU,EAAO,CAAC;QACnC,WAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAIrB,IAAI,CAAC,IAAI,GA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E,KAAK,EAAE,CAAC;QADS,aAAQ,GAAR,QAAQ,CAAQ;QAHnC,eAAU,GAAG,IAAI,iBAAU,EAAO,CAAC;QACnC,WAAM,GAAG,IAAI,iBAAU,EAAU,CAAC;QAIhC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;CACF;AARD,8CAQC;AAiBD,MAAa,0BAA2B,SAAQ,uBAAU;IAGxD,YAAmB,gBAAwB,EAAE,QAAgB,EAAE,WAAqD;QAClH,KAAK,EAAE,CAAC;QADS,qBAAgB,GAAhB,gBAAgB,CAAQ;QAF3C,eAAU,GAAG,IAAI,iBAAU,EAAO,CAAC;QACnC,WAAM,GAAG,IAAI,iBAAU,EAAU,CAAC;QAGhC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;CACF;AAPD,gEAOC;AACD,MAAa,qBAAsB,SAAQ,uBAAU;IAGnD,YAAmB,QAAgB,EAAE,WAAgD;QACnF,KAAK,EAAE,CAAC;QADS,aAAQ,GAAR,QAAQ,CAAQ;QAFnC,eAAU,GAAG,IAAI,iBAAU,EAAO,CAAC;QACnC,WAAM,GAAG,IAAI,iBAAU,EAAU,CAAC;QAGhC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;CACF;AAPD,sDAOC"}
@@ -0,0 +1,3 @@
1
+ import { Parameter } from '@autorest/codemodel';
2
+ export declare function sortPathParameters(path: string | undefined, params: Array<Parameter> | undefined): Array<Parameter> | undefined;
3
+ //# sourceMappingURL=sort-parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-parameters.d.ts","sourceRoot":"","sources":["../../utils/sort-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,CAoB/H"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sortPathParameters = void 0;
4
+ function sortPathParameters(path, params) {
5
+ if (path && params) {
6
+ const map = new Map();
7
+ for (let i = 0; i < params.length; i++) {
8
+ if (params[i].language.default.serializedName) {
9
+ map.set(`{${params[i].language.default.serializedName}}`, i);
10
+ }
11
+ }
12
+ let index = 0;
13
+ const paths = path.split('/');
14
+ for (let i = 0; i < params.length; i++) {
15
+ if (map.has(paths[i])) {
16
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
17
+ swap(params, index, map.get(paths[i]));
18
+ map.set(paths[i], index++);
19
+ }
20
+ }
21
+ }
22
+ return params;
23
+ }
24
+ exports.sortPathParameters = sortPathParameters;
25
+ function swap(params, left, right) {
26
+ if (!params || left === right) {
27
+ return;
28
+ }
29
+ const tmp = params[left];
30
+ params[left] = params[right];
31
+ params[right] = tmp;
32
+ }
33
+ //# sourceMappingURL=sort-parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-parameters.js","sourceRoot":"","sources":["../../utils/sort-parameters.ts"],"names":[],"mappings":";;;AAEA,SAAgB,kBAAkB,CAAC,IAAwB,EAAE,MAAoC;IAC/F,IAAI,IAAI,IAAI,MAAM,EAAE;QAClB,MAAM,GAAG,GAAwB,IAAI,GAAG,EAAkB,CAAC;QAC3D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE;gBAC7C,GAAG,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC;aAC9D;SACF;QAED,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;gBACrB,oEAAoE;gBACpE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;gBACxC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;aAC5B;SACF;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AApBD,gDAoBC;AAED,SAAS,IAAI,CAAC,MAAwB,EAAE,IAAY,EAAE,KAAa;IACjE,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,KAAK,EAAE;QAC7B,OAAO;KACR;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/powershell",
3
- "version": "4.0.0-dev.8",
3
+ "version": "4.0.617",
4
4
  "description": "AutoRest PowerShell Cmdlet Generator",
5
5
  "main": "dist/exports.js",
6
6
  "typings": "dist/exports.d.ts",
@@ -30,14 +30,14 @@
30
30
  "@types/js-yaml": "3.12.1",
31
31
  "@types/mocha": "5.2.5",
32
32
  "@types/node": "12.7.2",
33
- "mocha": "9.2.2",
34
- "mocha-typescript": "1.1.17",
35
- "typescript": "~4.3.0",
33
+ "mocha": "10.2.0",
34
+ "@testdeck/mocha": "0.3.3",
35
+ "typescript": "~5.1.3",
36
36
  "@types/xmlbuilder": "0.0.34",
37
37
  "@typescript-eslint/eslint-plugin": "~5.29.0",
38
38
  "@typescript-eslint/parser": "~5.29.0",
39
39
  "@microsoft.azure/autorest.testserver": "~2.9.3",
40
- "autorest": "~3.0.6118",
40
+ "autorest": "~3.6.3",
41
41
  "eslint": "~8.12.0"
42
42
  },
43
43
  "dependencies": {
@@ -45,8 +45,8 @@
45
45
  "@azure-tools/codegen": "~2.5.276",
46
46
  "@azure-tools/codegen-csharp": "~3.0.0",
47
47
  "@azure-tools/codemodel-v3": "~3.1.0",
48
- "@azure-tools/codemodel": "~4.13.342",
49
- "@azure-tools/autorest-extension-base": "~3.1.0",
48
+ "@autorest/extension-base": "~3.5.2",
49
+ "@autorest/codemodel": "~4.19.3",
50
50
  "@azure-tools/linq": "~3.1.0",
51
51
  "@azure-tools/tasks": "~3.0.0",
52
52
  "@azure-tools/async-io": "~3.0.0",
@@ -1,17 +1,17 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
4
+ param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
7
  if($PSEdition -ne 'Core') {
8
8
  Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
9
9
  }
10
10
 
11
- if(-not $Isolated -and -not $Debugger) {
11
+ if(-not $NotIsolated -and -not $Debugger) {
12
12
  Write-Host -ForegroundColor Green 'Creating isolated process...'
13
13
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
14
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
14
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
15
15
 
16
16
  if($LastExitCode -ne 0) {
17
17
  # Build failed. Don't attempt to run the module.
@@ -120,6 +120,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
120
120
 
121
121
  Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
122
122
  $modelCmdlets = @(${$project.modelCmdletsInPS})
123
+ $modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot '${$project.customFolder}') 'autogen-model-cmdlets'
124
+ if (Test-Path $modelCmdletFolder) {
125
+ $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
126
+ }
123
127
  if ($modelCmdlets.Count -gt 0) {
124
128
  . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
125
129
  CreateModelCmdlet($modelCmdlets)
@@ -136,7 +140,8 @@ if($NoDocs) {
136
140
  $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
137
141
  }
138
142
  $null = New-Item -ItemType Directory -Force -Path $docsFolder
139
- Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
143
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('${$project.azure}')
144
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
140
145
  }
141
146
 
142
147
  Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -1,13 +1,13 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
4
+ param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
- if(-not $Isolated) {
7
+ if(-not $NotIsolated) {
8
8
  Write-Host -ForegroundColor Green 'Creating isolated process...'
9
9
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
10
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
10
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
11
11
  return
12
12
  }
13
13
 
@@ -151,11 +151,9 @@ function CreateModelCmdlet {
151
151
  }
152
152
  $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
153
153
  # check whether completer is needed
154
- $completer = '';
155
- if($Type.Split('.').Split('.')[-2] -eq 'Support') {
156
- # If Type is an array, need to strip []
157
- $strippedType = $Type.Replace('[]', '')
158
- $completer += "`n [ArgumentCompleter([${strippedType}])]"
154
+ $completer = '';
155
+ if(IsEnumType($Member)){
156
+ $completer += GetCompleter($Member)
159
157
  }
160
158
  $ParameterDefineScript = "
161
159
  [Parameter($ParameterDefineProperty)]${completer}
@@ -209,3 +207,33 @@ ${ParameterAssignScript}
209
207
  Set-Content -Path $OutputPath -Value $Script
210
208
  }
211
209
  }
210
+
211
+ function IsEnumType {
212
+ param (
213
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
214
+ )
215
+ $isEnum = $false
216
+ foreach ($attr in $property.AttributeLists) {
217
+ $attributeName = $attr.Attributes.Name.ToString()
218
+ if ($attributeName.Contains('ArgumentCompleter')) {
219
+ $isEnum = $true
220
+ break
221
+ }
222
+ }
223
+ return $isEnum;
224
+ }
225
+
226
+ function GetCompleter {
227
+ param (
228
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
229
+ )
230
+ foreach ($attr in $property.AttributeLists) {
231
+ $attributeName = $attr.Attributes.Name.ToString()
232
+ if ($attributeName.Contains('ArgumentCompleter')) {
233
+ $attributeName = $attributeName.Split("::")[-1]
234
+ $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments)
235
+ $completer += "`n [${attributeName}(${possibleValues})]"
236
+ return $completer
237
+ }
238
+ }
239
+ }
@@ -1,13 +1,13 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
4
+ param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
7
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
8
- if(-not $Isolated) {
8
+ if(-not $NotIsolated) {
9
9
  Write-Host -ForegroundColor Green 'Creating isolated process...'
10
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
10
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
11
11
  return
12
12
  }
13
13
 
@@ -1,13 +1,13 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated)
4
+ param([switch]$NotIsolated)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
7
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
8
- if(-not $Isolated) {
8
+ if(-not $NotIsolated) {
9
9
  Write-Host -ForegroundColor Green 'Creating isolated process...'
10
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
10
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
11
11
  return
12
12
  }
13
13
 
@@ -55,8 +55,8 @@ foreach($directory in $directories)
55
55
  $docsPath = Join-Path $docsFolder $directory.Name
56
56
  $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
57
57
  $examplesPath = Join-Path $examplesFolder $directory.Name
58
-
59
- Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
58
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('${$project.azure}')
59
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo
60
60
  Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
61
61
  }
62
62
 
@@ -1,13 +1,13 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated)
4
+ param([switch]$NotIsolated)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
7
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
8
- if(-not $Isolated) {
8
+ if(-not $NotIsolated) {
9
9
  Write-Host -ForegroundColor Green 'Creating isolated process...'
10
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
10
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
11
11
  return
12
12
  }
13
13
 
@@ -1,19 +1,19 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated, [switch]$Code)
4
+ param([switch]$NotIsolated, [switch]$Code)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
- if(-not $Isolated) {
7
+ if(-not $NotIsolated) {
8
8
  Write-Host -ForegroundColor Green 'Creating isolated process...'
9
9
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
10
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
10
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
11
11
  return
12
12
  }
13
13
 
14
14
  $isAzure = $${$project.azure}
15
15
  if($isAzure) {
16
- . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts
16
+ . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts
17
17
  # Load the latest version of Az.Accounts installed
18
18
  Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version
19
19
  }
@@ -1,17 +1,17 @@
1
1
  # ----------------------------------------------------------------------------------
2
2
  ${$project.pwshCommentHeader}
3
3
  # ----------------------------------------------------------------------------------
4
- param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName)
4
+ param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName)
5
5
  $ErrorActionPreference = 'Stop'
6
6
 
7
- if(-not $Isolated)
7
+ if(-not $NotIsolated)
8
8
  {
9
9
  Write-Host -ForegroundColor Green 'Creating isolated process...'
10
10
  if ($PSBoundParameters.ContainsKey("TestName")) {
11
11
  $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join ","
12
12
  }
13
13
  $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
14
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
14
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
15
15
  return
16
16
  }
17
17
 
@@ -23,7 +23,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and
23
23
  $ProgressPreference = 'SilentlyContinue'
24
24
  $baseName = $PSScriptRoot.BaseName
25
25
  $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent))
26
- . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule
26
+ . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule
27
27
  . ("$PSScriptRoot\test\utils.ps1")
28
28
 
29
29
  if ($requireResourceModule)
@@ -80,4 +80,4 @@ try
80
80
  }
81
81
  }
82
82
 
83
- Write-Host -ForegroundColor Green '-------------Done-------------'
83
+ Write-Host -ForegroundColor Green '-------------Done-------------'
@@ -116,12 +116,12 @@ function New-AzDeployment {
116
116
  # The location to store the deployment data.
117
117
  ${Location},
118
118
 
119
- [Parameter(HelpMessage='The credentials, account, tenant, and subscription used for communication with Azure.')]
119
+ [Parameter(HelpMessage='The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.')]
120
120
  [Alias('AzureRMContext', 'AzureCredential')]
121
121
  [ValidateNotNull()]
122
122
  [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
123
123
  [System.Management.Automation.PSObject]
124
- # The credentials, account, tenant, and subscription used for communication with Azure.
124
+ # The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
125
125
  ${DefaultProfile},
126
126
 
127
127
  [Parameter(HelpMessage='Run the command as a job')]
@@ -0,0 +1,52 @@
1
+ // ----------------------------------------------------------------------------------
2
+ //
3
+ // Copyright Microsoft Corporation
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ // ----------------------------------------------------------------------------------
14
+
15
+ using System;
16
+ using System.Collections.Generic;
17
+ using System.Management.Automation;
18
+
19
+ namespace Microsoft.Rest
20
+ {
21
+ public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute
22
+ {
23
+ internal string[] ResourceTypes;
24
+
25
+ public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList))
26
+ {
27
+ ResourceTypes = argumentList;
28
+ }
29
+
30
+ public static ScriptBlock CreateScriptBlock(string[] resourceTypes)
31
+ {
32
+ List<string> outputResourceTypes = new List<string>();
33
+ foreach (string resourceType in resourceTypes)
34
+ {
35
+ if (resourceType.Contains(" "))
36
+ {
37
+ outputResourceTypes.Add("\'\'" + resourceType + "\'\'");
38
+ }
39
+ else
40
+ {
41
+ outputResourceTypes.Add(resourceType);
42
+ }
43
+ }
44
+ string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'";
45
+ string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" +
46
+ String.Format("$values = {0}\n", scriptResourceTypeList) +
47
+ "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }";
48
+ ScriptBlock scriptBlock = ScriptBlock.Create(script);
49
+ return scriptBlock;
50
+ }
51
+ }
52
+ }
@@ -33,6 +33,9 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
33
33
  [ValidateNotNullOrEmpty]
34
34
  public string ExamplesFolder { get; set; }
35
35
 
36
+ [Parameter()]
37
+ public SwitchParameter AddComplexInterfaceInfo { get; set; }
38
+
36
39
  protected override void ProcessRecord()
37
40
  {
38
41
  try
@@ -41,7 +44,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
41
44
  var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast<FunctionInfo>()
42
45
  .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi))
43
46
  .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty));
44
- WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder);
47
+ WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent);
45
48
  }
46
49
  catch (Exception ee)
47
50
  {
@@ -52,6 +52,9 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
52
52
  [Parameter(Mandatory = true, ParameterSetName = "NoDocs")]
53
53
  public SwitchParameter ExcludeDocs { get; set; }
54
54
 
55
+ [Parameter(ParameterSetName = "Docs")]
56
+ public SwitchParameter AddComplexInterfaceInfo { get; set; }
57
+
55
58
  protected override void ProcessRecord()
56
59
  {
57
60
  try
@@ -152,7 +155,7 @@ ${$project.pwshCommentHeaderForCsharp}
152
155
  var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles;
153
156
  var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder;
154
157
  var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder;
155
- WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder);
158
+ WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent);
156
159
  }
157
160
  }
158
161
  }
@@ -137,7 +137,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
137
137
  }
138
138
  else
139
139
  {
140
- var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList();
140
+ var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList();
141
141
  sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}");
142
142
  }
143
143
 
@@ -148,8 +148,10 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
148
148
  }
149
149
  else
150
150
  {
151
- var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList();
152
- sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}");
151
+ var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList();
152
+ if (!String.IsNullOrEmpty(aliasesList)) {
153
+ sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}");
154
+ }
153
155
  }
154
156
 
155
157
  // CmdletsToExport
@@ -163,7 +165,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
163
165
 
164
166
  if (previewVersion != null)
165
167
  {
166
- sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}");
168
+ sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'");
167
169
  }
168
170
  sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"${$project.metadata.tags}".Split(' ').ToPsList().NullIfEmpty() ?? "''"}");
169
171
  sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"${$project.metadata.licenseUri}"}'");
@@ -14,7 +14,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
14
14
  {
15
15
  internal static class MarkdownRenderer
16
16
  {
17
- public static void WriteMarkdowns(IEnumerable<VariantGroup> variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder)
17
+ public static void WriteMarkdowns(IEnumerable<VariantGroup> variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true)
18
18
  {
19
19
  Directory.CreateDirectory(docsFolder);
20
20
  var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray();
@@ -69,18 +69,26 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
69
69
  }
70
70
 
71
71
  sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}");
72
- sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}");
73
- foreach (var alias in markdownInfo.Aliases)
72
+ if (markdownInfo.Aliases.Any())
74
73
  {
75
- sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}");
74
+ sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}");
76
75
  }
77
- if (markdownInfo.ComplexInterfaceInfos.Any())
76
+ foreach (var alias in markdownInfo.Aliases)
78
77
  {
79
- sb.Append($"{ComplexParameterHeader}{Environment.NewLine}");
78
+ sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}");
80
79
  }
81
- foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos)
80
+
81
+ if (AddComplexInterfaceInfo)
82
82
  {
83
- sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}");
83
+ if (markdownInfo.ComplexInterfaceInfos.Any())
84
+ {
85
+ sb.Append($"{ComplexParameterHeader}{Environment.NewLine}");
86
+ }
87
+ foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos)
88
+ {
89
+ sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}");
90
+ }
91
+
84
92
  }
85
93
 
86
94
  sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}");
@@ -121,6 +121,21 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
121
121
  : String.Empty;
122
122
  }
123
123
 
124
+ internal class PSArgumentCompleterOutput: ArgumentCompleterOutput
125
+ {
126
+ public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; }
127
+
128
+ public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo)
129
+ {
130
+ PSArgumentCompleterInfo = completerInfo;
131
+ }
132
+
133
+
134
+ public override string ToString() => PSArgumentCompleterInfo != null
135
+ ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}"
136
+ : String.Empty;
137
+ }
138
+
124
139
  internal class DefaultInfoOutput
125
140
  {
126
141
  public bool HasDefaultInfo { get; }
@@ -199,7 +214,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
199
214
  {
200
215
  return $@"
201
216
  {Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{
202
- {Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
217
+ {Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
203
218
  {Indent}{Indent}}}
204
219
  {Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
205
220
  {Indent}{Indent}if ($preTelemetryId -eq '') {{
@@ -569,7 +584,9 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
569
584
 
570
585
  public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray);
571
586
 
572
- public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo);
587
+ public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo);
588
+
589
+ public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo);
573
590
 
574
591
  public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup);
575
592
 
@@ -610,7 +627,7 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
610
627
  return ni.IsComplexInterface
611
628
  ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false)
612
629
  : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks);
613
- }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, !isFirst && includeBackticks));
630
+ }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks));
614
631
  return String.Join(Environment.NewLine, nested);
615
632
  }
616
633
  }