@autorest/powershell 2.1.401 → 3.0.0

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 (477) hide show
  1. package/.rush/temp/package-deps_build.json +213 -186
  2. package/.rush/temp/shrinkwrap-deps.json +322 -326
  3. package/autorest-configuration.md +60 -47
  4. package/dist/cmdlets/class.d.ts +21 -8
  5. package/dist/cmdlets/class.d.ts.map +1 -1
  6. package/dist/cmdlets/class.js +475 -151
  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 +1 -0
  10. package/dist/cmdlets/namespace.js.map +1 -1
  11. package/dist/enums/namespace.d.ts.map +1 -1
  12. package/dist/enums/namespace.js +17 -10
  13. package/dist/enums/namespace.js.map +1 -1
  14. package/dist/generators/csproj.d.ts.map +1 -1
  15. package/dist/generators/csproj.js +2 -1
  16. package/dist/generators/csproj.js.map +1 -1
  17. package/dist/generators/gitignore.d.ts.map +1 -1
  18. package/dist/generators/gitignore.js +1 -0
  19. package/dist/generators/gitignore.js.map +1 -1
  20. package/dist/generators/nuspec.d.ts.map +1 -1
  21. package/dist/generators/nuspec.js +4 -3
  22. package/dist/generators/nuspec.js.map +1 -1
  23. package/dist/generators/psm1.d.ts.map +1 -1
  24. package/dist/generators/psm1.js +24 -15
  25. package/dist/generators/psm1.js.map +1 -1
  26. package/dist/generators/script-cmdlet.d.ts.map +1 -1
  27. package/dist/generators/script-cmdlet.js +1 -1
  28. package/dist/generators/script-cmdlet.js.map +1 -1
  29. package/dist/internal/name-inferrer.d.ts.map +1 -1
  30. package/dist/internal/name-inferrer.js +2 -0
  31. package/dist/internal/name-inferrer.js.map +1 -1
  32. package/dist/internal/project.d.ts +46 -5
  33. package/dist/internal/project.d.ts.map +1 -1
  34. package/dist/internal/project.js +72 -13
  35. package/dist/internal/project.js.map +1 -1
  36. package/dist/internal/state.d.ts +3 -2
  37. package/dist/internal/state.d.ts.map +1 -1
  38. package/dist/internal/state.js +3 -3
  39. package/dist/internal/state.js.map +1 -1
  40. package/dist/llcsharp/clientruntime.d.ts +5 -0
  41. package/dist/llcsharp/clientruntime.d.ts.map +1 -1
  42. package/dist/llcsharp/clientruntime.js +5 -0
  43. package/dist/llcsharp/clientruntime.js.map +1 -1
  44. package/dist/llcsharp/enums/enum.d.ts +2 -2
  45. package/dist/llcsharp/enums/enum.d.ts.map +1 -1
  46. package/dist/llcsharp/enums/enum.js +11 -10
  47. package/dist/llcsharp/enums/enum.js.map +1 -1
  48. package/dist/llcsharp/generator.d.ts +3 -3
  49. package/dist/llcsharp/generator.d.ts.map +1 -1
  50. package/dist/llcsharp/generator.js +4 -2
  51. package/dist/llcsharp/generator.js.map +1 -1
  52. package/dist/llcsharp/model/interface.d.ts +3 -2
  53. package/dist/llcsharp/model/interface.d.ts.map +1 -1
  54. package/dist/llcsharp/model/interface.js +68 -17
  55. package/dist/llcsharp/model/interface.js.map +1 -1
  56. package/dist/llcsharp/model/model-class-dictionary.d.ts.map +1 -1
  57. package/dist/llcsharp/model/model-class-dictionary.js +12 -6
  58. package/dist/llcsharp/model/model-class-dictionary.js.map +1 -1
  59. package/dist/llcsharp/model/model-class-json.d.ts.map +1 -1
  60. package/dist/llcsharp/model/model-class-json.js +20 -12
  61. package/dist/llcsharp/model/model-class-json.js.map +1 -1
  62. package/dist/llcsharp/model/model-class-serializer.d.ts +9 -21
  63. package/dist/llcsharp/model/model-class-serializer.d.ts.map +1 -1
  64. package/dist/llcsharp/model/model-class-serializer.js +21 -50
  65. package/dist/llcsharp/model/model-class-serializer.js.map +1 -1
  66. package/dist/llcsharp/model/model-class.d.ts +7 -4
  67. package/dist/llcsharp/model/model-class.d.ts.map +1 -1
  68. package/dist/llcsharp/model/model-class.js +147 -82
  69. package/dist/llcsharp/model/model-class.js.map +1 -1
  70. package/dist/llcsharp/model/namespace.d.ts +4 -4
  71. package/dist/llcsharp/model/namespace.d.ts.map +1 -1
  72. package/dist/llcsharp/model/namespace.js +40 -18
  73. package/dist/llcsharp/model/namespace.js.map +1 -1
  74. package/dist/llcsharp/model/property.d.ts +4 -4
  75. package/dist/llcsharp/model/property.d.ts.map +1 -1
  76. package/dist/llcsharp/model/property.js +9 -7
  77. package/dist/llcsharp/model/property.js.map +1 -1
  78. package/dist/llcsharp/operation/api-class.d.ts.map +1 -1
  79. package/dist/llcsharp/operation/api-class.js +24 -23
  80. package/dist/llcsharp/operation/api-class.js.map +1 -1
  81. package/dist/llcsharp/operation/method.d.ts +7 -5
  82. package/dist/llcsharp/operation/method.d.ts.map +1 -1
  83. package/dist/llcsharp/operation/method.js +157 -93
  84. package/dist/llcsharp/operation/method.js.map +1 -1
  85. package/dist/llcsharp/operation/namespace.js +2 -1
  86. package/dist/llcsharp/operation/namespace.js.map +1 -1
  87. package/dist/llcsharp/operation/parameter.d.ts +4 -4
  88. package/dist/llcsharp/operation/parameter.d.ts.map +1 -1
  89. package/dist/llcsharp/operation/parameter.js +7 -5
  90. package/dist/llcsharp/operation/parameter.js.map +1 -1
  91. package/dist/llcsharp/project.d.ts +4 -0
  92. package/dist/llcsharp/project.d.ts.map +1 -1
  93. package/dist/llcsharp/project.js +7 -2
  94. package/dist/llcsharp/project.js.map +1 -1
  95. package/dist/llcsharp/schema/Uuid.d.ts +2 -2
  96. package/dist/llcsharp/schema/Uuid.d.ts.map +1 -1
  97. package/dist/llcsharp/schema/Uuid.js.map +1 -1
  98. package/dist/llcsharp/schema/array.d.ts +3 -3
  99. package/dist/llcsharp/schema/array.d.ts.map +1 -1
  100. package/dist/llcsharp/schema/array.js +15 -8
  101. package/dist/llcsharp/schema/array.js.map +1 -1
  102. package/dist/llcsharp/schema/binary.d.ts +3 -3
  103. package/dist/llcsharp/schema/binary.d.ts.map +1 -1
  104. package/dist/llcsharp/schema/binary.js.map +1 -1
  105. package/dist/llcsharp/schema/boolean.d.ts +4 -4
  106. package/dist/llcsharp/schema/boolean.d.ts.map +1 -1
  107. package/dist/llcsharp/schema/boolean.js +1 -1
  108. package/dist/llcsharp/schema/boolean.js.map +1 -1
  109. package/dist/llcsharp/schema/byte-array.d.ts +3 -3
  110. package/dist/llcsharp/schema/byte-array.d.ts.map +1 -1
  111. package/dist/llcsharp/schema/byte-array.js +12 -2
  112. package/dist/llcsharp/schema/byte-array.js.map +1 -1
  113. package/dist/llcsharp/schema/char.d.ts +4 -4
  114. package/dist/llcsharp/schema/char.d.ts.map +1 -1
  115. package/dist/llcsharp/schema/char.js +3 -3
  116. package/dist/llcsharp/schema/char.js.map +1 -1
  117. package/dist/llcsharp/schema/date-time.d.ts +7 -7
  118. package/dist/llcsharp/schema/date-time.d.ts.map +1 -1
  119. package/dist/llcsharp/schema/date-time.js +4 -4
  120. package/dist/llcsharp/schema/date-time.js.map +1 -1
  121. package/dist/llcsharp/schema/date.d.ts +2 -2
  122. package/dist/llcsharp/schema/date.d.ts.map +1 -1
  123. package/dist/llcsharp/schema/date.js.map +1 -1
  124. package/dist/llcsharp/schema/duration.d.ts +5 -5
  125. package/dist/llcsharp/schema/duration.d.ts.map +1 -1
  126. package/dist/llcsharp/schema/duration.js +2 -2
  127. package/dist/llcsharp/schema/duration.js.map +1 -1
  128. package/dist/llcsharp/schema/enum.d.ts +2 -2
  129. package/dist/llcsharp/schema/enum.d.ts.map +1 -1
  130. package/dist/llcsharp/schema/enum.js +5 -3
  131. package/dist/llcsharp/schema/enum.js.map +1 -1
  132. package/dist/llcsharp/schema/extended-type-declaration.d.ts +2 -2
  133. package/dist/llcsharp/schema/extended-type-declaration.d.ts.map +1 -1
  134. package/dist/llcsharp/schema/integer.d.ts +4 -4
  135. package/dist/llcsharp/schema/integer.d.ts.map +1 -1
  136. package/dist/llcsharp/schema/integer.js +1 -1
  137. package/dist/llcsharp/schema/integer.js.map +1 -1
  138. package/dist/llcsharp/schema/object.d.ts +3 -3
  139. package/dist/llcsharp/schema/object.d.ts.map +1 -1
  140. package/dist/llcsharp/schema/object.js +25 -21
  141. package/dist/llcsharp/schema/object.js.map +1 -1
  142. package/dist/llcsharp/schema/password.d.ts +23 -0
  143. package/dist/llcsharp/schema/password.d.ts.map +1 -0
  144. package/dist/llcsharp/schema/password.js +89 -0
  145. package/dist/llcsharp/schema/password.js.map +1 -0
  146. package/dist/llcsharp/schema/primitive.d.ts +4 -4
  147. package/dist/llcsharp/schema/primitive.d.ts.map +1 -1
  148. package/dist/llcsharp/schema/primitive.js +7 -3
  149. package/dist/llcsharp/schema/primitive.js.map +1 -1
  150. package/dist/llcsharp/schema/schema-resolver.d.ts +4 -3
  151. package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
  152. package/dist/llcsharp/schema/schema-resolver.js +61 -64
  153. package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
  154. package/dist/llcsharp/schema/string.d.ts +3 -3
  155. package/dist/llcsharp/schema/string.d.ts.map +1 -1
  156. package/dist/llcsharp/schema/string.js +14 -10
  157. package/dist/llcsharp/schema/string.js.map +1 -1
  158. package/dist/main.d.ts.map +1 -1
  159. package/dist/main.js +23 -14
  160. package/dist/main.js.map +1 -1
  161. package/dist/models/model-extensions.d.ts +3 -2
  162. package/dist/models/model-extensions.d.ts.map +1 -1
  163. package/dist/models/model-extensions.js +195 -168
  164. package/dist/models/model-extensions.js.map +1 -1
  165. package/dist/module/module-class.d.ts +4 -2
  166. package/dist/module/module-class.d.ts.map +1 -1
  167. package/dist/module/module-class.js +67 -13
  168. package/dist/module/module-class.js.map +1 -1
  169. package/dist/module/module-namespace.d.ts +2 -2
  170. package/dist/module/module-namespace.d.ts.map +1 -1
  171. package/dist/module/module-namespace.js +3 -2
  172. package/dist/module/module-namespace.js.map +1 -1
  173. package/dist/plugins/add-azure-completers-v2.d.ts +3 -0
  174. package/dist/plugins/add-azure-completers-v2.d.ts.map +1 -0
  175. package/dist/plugins/{add-azure-completers.js → add-azure-completers-v2.js} +7 -5
  176. package/dist/plugins/add-azure-completers-v2.js.map +1 -0
  177. package/dist/plugins/create-commands-v2.d.ts +40 -0
  178. package/dist/plugins/create-commands-v2.d.ts.map +1 -0
  179. package/dist/plugins/{create-commands.js → create-commands-v2.js} +128 -78
  180. package/dist/plugins/create-commands-v2.js.map +1 -0
  181. package/dist/plugins/cs-namer-v2.d.ts +3 -0
  182. package/dist/plugins/cs-namer-v2.d.ts.map +1 -0
  183. package/dist/plugins/cs-namer-v2.js +230 -0
  184. package/dist/plugins/cs-namer-v2.js.map +1 -0
  185. package/dist/plugins/llcsharp-v2.d.ts +3 -0
  186. package/dist/plugins/llcsharp-v2.d.ts.map +1 -0
  187. package/dist/plugins/{llcsharp.js → llcsharp-v2.js} +3 -3
  188. package/dist/plugins/llcsharp-v2.js.map +1 -0
  189. package/dist/plugins/modifiers-v2.d.ts +3 -0
  190. package/dist/plugins/modifiers-v2.d.ts.map +1 -0
  191. package/dist/plugins/{modifiers.js → modifiers-v2.js} +151 -32
  192. package/dist/plugins/modifiers-v2.js.map +1 -0
  193. package/dist/plugins/plugin-create-inline-properties.d.ts +4 -0
  194. package/dist/plugins/plugin-create-inline-properties.d.ts.map +1 -0
  195. package/dist/plugins/plugin-create-inline-properties.js +356 -0
  196. package/dist/plugins/plugin-create-inline-properties.js.map +1 -0
  197. package/dist/plugins/plugin-tweak-m4-model.d.ts +3 -0
  198. package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -0
  199. package/dist/plugins/plugin-tweak-m4-model.js +166 -0
  200. package/dist/plugins/plugin-tweak-m4-model.js.map +1 -0
  201. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts +3 -0
  202. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts.map +1 -0
  203. package/dist/plugins/plugin-tweak-model-azure-v2.js +169 -0
  204. package/dist/plugins/plugin-tweak-model-azure-v2.js.map +1 -0
  205. package/dist/plugins/plugin-tweak-model.d.ts +9 -0
  206. package/dist/plugins/plugin-tweak-model.d.ts.map +1 -0
  207. package/dist/plugins/plugin-tweak-model.js +572 -0
  208. package/dist/plugins/plugin-tweak-model.js.map +1 -0
  209. package/dist/plugins/powershell-v2.d.ts +3 -0
  210. package/dist/plugins/powershell-v2.d.ts.map +1 -0
  211. package/dist/plugins/{powershell.js → powershell-v2.js} +9 -4
  212. package/dist/plugins/powershell-v2.js.map +1 -0
  213. package/dist/plugins/{ps-namer.d.ts → ps-namer-v2.d.ts} +2 -2
  214. package/dist/plugins/ps-namer-v2.d.ts.map +1 -0
  215. package/dist/plugins/{ps-namer.js → ps-namer-v2.js} +64 -49
  216. package/dist/plugins/ps-namer-v2.js.map +1 -0
  217. package/dist/utils/PwshModel.d.ts +8 -0
  218. package/dist/utils/PwshModel.d.ts.map +1 -0
  219. package/dist/utils/PwshModel.js +17 -0
  220. package/dist/utils/PwshModel.js.map +1 -0
  221. package/dist/utils/command-operation.d.ts +51 -0
  222. package/dist/utils/command-operation.d.ts.map +1 -0
  223. package/dist/utils/command-operation.js +33 -0
  224. package/dist/utils/command-operation.js.map +1 -0
  225. package/dist/utils/components.d.ts +133 -0
  226. package/dist/utils/components.d.ts.map +1 -0
  227. package/dist/utils/components.js +100 -0
  228. package/dist/utils/components.js.map +1 -0
  229. package/dist/utils/extensions.d.ts +11 -0
  230. package/dist/utils/extensions.d.ts.map +1 -0
  231. package/dist/utils/extensions.js +16 -0
  232. package/dist/utils/extensions.js.map +1 -0
  233. package/dist/utils/http-definitions.d.ts +45 -0
  234. package/dist/utils/http-definitions.d.ts.map +1 -0
  235. package/dist/utils/http-definitions.js +47 -0
  236. package/dist/utils/http-definitions.js.map +1 -0
  237. package/dist/utils/http-operation.d.ts +8 -0
  238. package/dist/utils/http-operation.d.ts.map +1 -0
  239. package/dist/utils/http-operation.js +254 -0
  240. package/dist/utils/http-operation.js.map +1 -0
  241. package/dist/utils/info.d.ts +36 -0
  242. package/dist/utils/info.d.ts.map +1 -0
  243. package/dist/utils/info.js +36 -0
  244. package/dist/utils/info.js.map +1 -0
  245. package/dist/utils/model-state.d.ts +44 -0
  246. package/dist/utils/model-state.d.ts.map +1 -0
  247. package/dist/utils/model-state.js +206 -0
  248. package/dist/utils/model-state.js.map +1 -0
  249. package/dist/utils/powershell-comment.d.ts +2 -0
  250. package/dist/utils/powershell-comment.d.ts.map +1 -0
  251. package/dist/utils/powershell-comment.js +25 -0
  252. package/dist/utils/powershell-comment.js.map +1 -0
  253. package/dist/utils/programatic-operation.d.ts +20 -0
  254. package/dist/utils/programatic-operation.d.ts.map +1 -0
  255. package/dist/utils/programatic-operation.js +29 -0
  256. package/dist/utils/programatic-operation.js.map +1 -0
  257. package/dist/utils/resolve-conflicts.d.ts +7 -0
  258. package/dist/utils/resolve-conflicts.d.ts.map +1 -0
  259. package/dist/utils/resolve-conflicts.js +57 -0
  260. package/dist/utils/resolve-conflicts.js.map +1 -0
  261. package/dist/utils/schema.d.ts +116 -0
  262. package/dist/utils/schema.d.ts.map +1 -0
  263. package/dist/utils/schema.js +186 -0
  264. package/dist/utils/schema.js.map +1 -0
  265. package/dist/utils/security-scheme.d.ts +123 -0
  266. package/dist/utils/security-scheme.d.ts.map +1 -0
  267. package/dist/utils/security-scheme.js +119 -0
  268. package/dist/utils/security-scheme.js.map +1 -0
  269. package/dist/utils/uid.d.ts +2 -0
  270. package/dist/utils/uid.d.ts.map +1 -0
  271. package/dist/utils/uid.js +8 -0
  272. package/dist/utils/uid.js.map +1 -0
  273. package/package.json +22 -21
  274. package/resources/assets/build-module.ps1 +12 -15
  275. package/resources/assets/check-dependencies.ps1 +4 -14
  276. package/resources/assets/create-model-cmdlets.ps1 +157 -0
  277. package/resources/assets/custom/{readme.md → README.md} +7 -7
  278. package/resources/assets/docs/README.md +11 -0
  279. package/resources/assets/examples/{readme.md → README.md} +0 -0
  280. package/resources/assets/export-surface.ps1 +1 -11
  281. package/resources/assets/exports/{readme.md → README.md} +2 -2
  282. package/resources/assets/generate-help.ps1 +2 -12
  283. package/resources/assets/how-to.md +5 -5
  284. package/resources/assets/internal/{readme.md → README.md} +3 -3
  285. package/resources/assets/pack-module.ps1 +1 -11
  286. package/resources/assets/resources/{readme.md → README.md} +0 -0
  287. package/resources/assets/run-module.ps1 +3 -11
  288. package/resources/assets/test/{readme.md → README.md} +0 -0
  289. package/resources/assets/test/loadEnv.ps1 +1 -11
  290. package/resources/assets/test-module.ps1 +39 -24
  291. package/resources/assets/tools/Resources/{readme.md → README.md} +3 -2
  292. package/resources/assets/tools/Resources/docs/{readme.md → README.md} +1 -1
  293. package/resources/assets/tools/Resources/examples/{readme.md → README.md} +0 -0
  294. package/resources/assets/tools/Resources/how-to.md +5 -5
  295. package/resources/assets/tools/Resources/resources/{readme.md → README.md} +0 -0
  296. package/resources/assets/tools/Resources/test/{readme.md → README.md} +0 -0
  297. package/resources/modules/Az.Accounts/2.7.5/Accounts.format.ps1xml +496 -0
  298. package/resources/modules/Az.Accounts/2.7.5/Accounts.generated.format.ps1xml +468 -0
  299. package/resources/modules/Az.Accounts/2.7.5/Accounts.types.ps1xml +303 -0
  300. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Az.Accounts.nuspec +5 -3
  301. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psd1 +387 -0
  302. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psm1 +375 -0
  303. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Core.dll +0 -0
  304. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Identity.dll +0 -0
  305. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies → 2.7.5/AzSharedAlcAssemblies}/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  306. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  307. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.dll +0 -0
  308. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/System.Memory.Data.dll +0 -0
  309. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/System.Text.Json.dll +0 -0
  310. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Hyak.Common.dll +0 -0
  311. package/resources/modules/Az.Accounts/2.7.5/Microsoft.ApplicationInsights.dll +0 -0
  312. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.Common.dll +0 -0
  313. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
  314. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Authentication.ResourceManager.deps.json +945 -404
  315. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
  316. package/resources/modules/Az.Accounts/{1.8.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json → 2.7.5/Microsoft.Azure.PowerShell.Authentication.deps.json} +906 -488
  317. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
  318. package/resources/modules/Az.Accounts/{1.8.1/Microsoft.Azure.PowerShell.Authentication.deps.json → 2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.deps.json} +301 -719
  319. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll +0 -0
  320. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  321. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Aks.dll +0 -0
  322. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Authorization.dll +0 -0
  323. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Compute.dll +0 -0
  324. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
  325. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.KeyVault.dll +0 -0
  326. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Monitor.dll +0 -0
  327. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Network.dll +0 -0
  328. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll +0 -0
  329. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
  330. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
  331. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Websites.dll +0 -0
  332. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json +2413 -0
  333. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
  334. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml +3567 -1995
  335. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.Share.dll +0 -0
  336. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.dll +0 -0
  337. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Storage.dll +0 -0
  338. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Strategies.dll +0 -0
  339. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Rest.ClientRuntime.Azure.dll +0 -0
  340. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Rest.ClientRuntime.dll +0 -0
  341. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.WindowsAzure.Storage.DataMovement.dll +0 -0
  342. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.WindowsAzure.Storage.dll +0 -0
  343. package/resources/modules/Az.Accounts/2.7.5/PostImportScripts/LoadAuthenticators.ps1 +219 -0
  344. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Core.dll +0 -0
  345. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Identity.dll +0 -0
  346. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  347. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  348. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  349. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.dll +0 -0
  350. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Newtonsoft.Json.12.0.3.dll +0 -0
  351. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/Newtonsoft.Json.10.dll → 2.7.5/PreloadAssemblies/Newtonsoft.Json.dll} +0 -0
  352. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Buffers.dll +0 -0
  353. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/System.Diagnostics.DiagnosticSource.4.0.4.0.dll → 2.7.5/PreloadAssemblies/System.Diagnostics.DiagnosticSource.dll} +0 -0
  354. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Memory.Data.dll +0 -0
  355. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Memory.dll +0 -0
  356. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Net.Http.WinHttpHandler.dll +0 -0
  357. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Numerics.Vectors.dll +0 -0
  358. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Private.ServiceModel.dll +0 -0
  359. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Reflection.DispatchProxy.dll +0 -0
  360. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.5.0.dll → 2.7.5/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.dll} +0 -0
  361. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.AccessControl.dll +0 -0
  362. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Cryptography.Cng.dll +0 -0
  363. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.Permissions.dll +0 -0
  364. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.Principal.Windows.dll +0 -0
  365. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.ServiceModel.Primitives.dll +0 -0
  366. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Encodings.Web.dll +0 -0
  367. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Json.dll +0 -0
  368. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/System.Threading.Tasks.Extensions.4.2.0.0.dll → 2.7.5/PreloadAssemblies/System.Threading.Tasks.Extensions.dll} +0 -0
  369. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Xml.ReaderWriter.dll +0 -0
  370. package/resources/modules/Az.Accounts/2.7.5/StartupScripts/AzError.ps1 +278 -0
  371. package/resources/modules/Az.Accounts/2.7.5/StartupScripts/InitializeAssemblyResolver.ps1 +234 -0
  372. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/[Content_Types].xml +1 -0
  373. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/_rels/.rels +2 -2
  374. package/resources/modules/Az.Accounts/2.7.5/en-US/about_az.help.txt +50 -0
  375. package/resources/modules/Az.Accounts/{1.8.1/package/services/metadata/core-properties/b4e383786e734eb49545960a9feff173.psmdcp → 2.7.5/package/services/metadata/core-properties/1aa0749a068a4238881858013f1a5b7f.psmdcp} +2 -2
  376. package/resources/psruntime/AsyncCommandRuntime.cs +4 -0
  377. package/resources/psruntime/AsyncOperationResponse.cs +10 -11
  378. package/resources/psruntime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +3 -1
  379. package/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +94 -87
  380. package/resources/psruntime/BuildTime/Cmdlets/ExportPsd1.cs +168 -102
  381. package/resources/psruntime/BuildTime/Cmdlets/ExportTestStub.cs +22 -11
  382. package/resources/psruntime/BuildTime/Cmdlets/GetScriptCmdlet.cs +2 -1
  383. package/resources/psruntime/BuildTime/MarkdownRenderer.cs +1 -8
  384. package/resources/psruntime/BuildTime/Models/PsHelpMarkdownOutputs.cs +33 -11
  385. package/resources/psruntime/BuildTime/Models/PsHelpTypes.cs +3 -0
  386. package/resources/psruntime/BuildTime/Models/PsMarkdownTypes.cs +17 -14
  387. package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +111 -13
  388. package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +18 -3
  389. package/resources/psruntime/BuildTime/PsAttributes.cs +1 -1
  390. package/resources/psruntime/BuildTime/PsExtensions.cs +9 -0
  391. package/resources/psruntime/BuildTime/PsHelpers.cs +2 -1
  392. package/resources/psruntime/DictionaryExtensions.cs +8 -11
  393. package/resources/psruntime/EventDataExtensions.cs +1 -1
  394. package/resources/psruntime/MessageAttribute.cs +360 -0
  395. package/resources/psruntime/MessageAttributeHelper.cs +161 -0
  396. package/resources/psruntime/Properties/Resources.Designer.cs +5633 -0
  397. package/resources/psruntime/Properties/Resources.resx +1741 -0
  398. package/resources/psruntime/TypeConverterExtensions.cs +31 -10
  399. package/resources/runtime/csharp/client/Extensions.cs +7 -1
  400. package/resources/runtime/csharp/client/IAssociativeArray.cs +4 -1
  401. package/resources/runtime/csharp/client/UndeclaredResponseException.cs +10 -2
  402. package/resources/runtime/csharp/json/Customizations/IJsonSerializable.cs +21 -7
  403. package/resources/runtime/csharp/json/Nodes/JsonNumber.cs +5 -5
  404. package/resources/runtime/csharp/pipeline/ISendAsync.cs +7 -3
  405. package/resources/runtime/csharp/pipeline/PipelineMocking.cs +17 -9
  406. package/resources/utils/Unprotect-SecureString.ps1 +16 -0
  407. package/changelog.md +0 -4
  408. package/dist/llcsharp/enums/json-serializer.d.ts +0 -9
  409. package/dist/llcsharp/enums/json-serializer.d.ts.map +0 -1
  410. package/dist/llcsharp/enums/json-serializer.js +0 -41
  411. package/dist/llcsharp/enums/json-serializer.js.map +0 -1
  412. package/dist/llcsharp/model/model-class-xml.d.ts +0 -15
  413. package/dist/llcsharp/model/model-class-xml.d.ts.map +0 -1
  414. package/dist/llcsharp/model/model-class-xml.js +0 -145
  415. package/dist/llcsharp/model/model-class-xml.js.map +0 -1
  416. package/dist/plugins/add-azure-completers.d.ts +0 -3
  417. package/dist/plugins/add-azure-completers.d.ts.map +0 -1
  418. package/dist/plugins/add-azure-completers.js.map +0 -1
  419. package/dist/plugins/create-commands.d.ts +0 -38
  420. package/dist/plugins/create-commands.d.ts.map +0 -1
  421. package/dist/plugins/create-commands.js.map +0 -1
  422. package/dist/plugins/cs-namer.d.ts +0 -3
  423. package/dist/plugins/cs-namer.d.ts.map +0 -1
  424. package/dist/plugins/cs-namer.js +0 -203
  425. package/dist/plugins/cs-namer.js.map +0 -1
  426. package/dist/plugins/llcsharp.d.ts +0 -3
  427. package/dist/plugins/llcsharp.d.ts.map +0 -1
  428. package/dist/plugins/llcsharp.js.map +0 -1
  429. package/dist/plugins/modifiers.d.ts +0 -3
  430. package/dist/plugins/modifiers.d.ts.map +0 -1
  431. package/dist/plugins/modifiers.js.map +0 -1
  432. package/dist/plugins/powershell.d.ts +0 -3
  433. package/dist/plugins/powershell.d.ts.map +0 -1
  434. package/dist/plugins/powershell.js.map +0 -1
  435. package/dist/plugins/ps-namer.d.ts.map +0 -1
  436. package/dist/plugins/ps-namer.js.map +0 -1
  437. package/resources/assets/docs/readme.md +0 -11
  438. package/resources/modules/Az.Accounts/1.8.1/Accounts.format.ps1xml +0 -368
  439. package/resources/modules/Az.Accounts/1.8.1/Accounts.generated.format.ps1xml +0 -422
  440. package/resources/modules/Az.Accounts/1.8.1/Accounts.types.ps1xml +0 -281
  441. package/resources/modules/Az.Accounts/1.8.1/Az.Accounts.psd1 +0 -360
  442. package/resources/modules/Az.Accounts/1.8.1/Az.Accounts.psm1 +0 -339
  443. package/resources/modules/Az.Accounts/1.8.1/Microsoft.ApplicationInsights.dll +0 -0
  444. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
  445. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
  446. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
  447. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
  448. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
  449. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
  450. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
  451. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Common.dll +0 -0
  452. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Rest.ClientRuntime.dll +0 -0
  453. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Azure.Core.dll +0 -0
  454. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  455. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll +0 -0
  456. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll +0 -0
  457. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Numerics.Vectors.dll +0 -0
  458. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  459. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Text.Encodings.Web.dll +0 -0
  460. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Text.Json.dll +0 -0
  461. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Threading.Tasks.Extensions.dll +0 -0
  462. package/resources/modules/Az.Accounts/1.8.1/PostImportScripts/LoadAuthenticators.ps1 +0 -197
  463. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Azure.Core.dll +0 -0
  464. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  465. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll +0 -0
  466. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll +0 -0
  467. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Buffers.dll +0 -0
  468. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Diagnostics.DiagnosticSource.dll +0 -0
  469. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Numerics.Vectors.dll +0 -0
  470. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Private.ServiceModel.dll +0 -0
  471. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.4.0.dll +0 -0
  472. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.4.1.dll +0 -0
  473. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.ServiceModel.Primitives.dll +0 -0
  474. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Text.Encodings.Web.dll +0 -0
  475. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Text.Json.dll +0 -0
  476. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Threading.Tasks.Extensions.4.3.1.0.dll +0 -0
  477. package/resources/modules/Az.Accounts/1.8.1/StartupScripts/AzError.ps1 +0 -256
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License. See License.txt in the project root for license information.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const extensions_1 = require("./extensions");
8
+ const linq_1 = require("@azure-tools/linq");
9
+ const codemodel_1 = require("@azure-tools/codemodel");
10
+ var Purpose;
11
+ (function (Purpose) {
12
+ Purpose["Header"] = "Header";
13
+ })(Purpose = exports.Purpose || (exports.Purpose = {}));
14
+ // export class Schema extends Extensions implements Schema {
15
+ // public details: LanguageDetails<SchemaDetails>;
16
+ // public required = new Array<string>();
17
+ // public enum = new Array<any>();
18
+ // public allOf = new Array<Schema>();
19
+ // public oneOf = new Array<Schema>();
20
+ // public anyOf = new Array<Schema>();
21
+ // public properties = new Dictionary<Property>();
22
+ // public extensions = new Dictionary<any>();
23
+ // constructor(name: string, initializer?: DeepPartial<Schema>) {
24
+ // super();
25
+ // this.details = {
26
+ // default: {
27
+ // uid: `schema:${uid()}`,
28
+ // description: '',
29
+ // name
30
+ // }
31
+ // };
32
+ // this.apply(initializer);
33
+ // }
34
+ // }
35
+ function getPolymorphicBases(schema) {
36
+ var _a;
37
+ // are any of my parents polymorphic directly, or any of their parents?
38
+ return [...linq_1.values((_a = schema.parents) === null || _a === void 0 ? void 0 : _a.all).where(parent => parent.discriminator ? true : false)];
39
+ }
40
+ exports.getPolymorphicBases = getPolymorphicBases;
41
+ function getAllProperties(schema) {
42
+ if (codemodel_1.isObjectSchema(schema)) {
43
+ return [...linq_1.values(schema.parents ? schema.parents.immediate : []).selectMany(getAllProperties), ...linq_1.values(schema.properties)];
44
+ }
45
+ else {
46
+ return [];
47
+ }
48
+ }
49
+ exports.getAllProperties = getAllProperties;
50
+ function getAllPublicVirtualProperties(virtualProperties) {
51
+ const props = virtualProperties || {
52
+ owned: [],
53
+ inherited: [],
54
+ inlined: []
55
+ };
56
+ return linq_1.values(props.owned, props.inherited, props.inlined).where(each => !each.private).toArray();
57
+ }
58
+ exports.getAllPublicVirtualProperties = getAllPublicVirtualProperties;
59
+ function getAllVirtualProperties(virtualProperties) {
60
+ const props = virtualProperties || {
61
+ owned: [],
62
+ inherited: [],
63
+ inlined: []
64
+ };
65
+ return linq_1.values(props.owned, props.inherited, props.inlined).toArray();
66
+ }
67
+ exports.getAllVirtualProperties = getAllVirtualProperties;
68
+ function getVirtualPropertyFromPropertyName(virtualProperties, propertyName) {
69
+ const props = virtualProperties || {
70
+ owned: [],
71
+ inherited: [],
72
+ inlined: []
73
+ };
74
+ return linq_1.values([...linq_1.values(props.owned), ...linq_1.values(props.inherited), ...linq_1.values(props.inlined)]).first(each => each.property.serializedName === propertyName);
75
+ }
76
+ exports.getVirtualPropertyFromPropertyName = getVirtualPropertyFromPropertyName;
77
+ // export interface Property extends Extensions {
78
+ // details: LanguageDetails<PropertyDetails>;
79
+ // /** description can be on the property reference, so that properties can have a description different from the type description. */
80
+ // description?: string;
81
+ // schema: Schema;
82
+ // }
83
+ // export class Property extends Extensions implements Property {
84
+ // public serializedName: string;
85
+ // public details: LanguageDetails<PropertyDetails>;
86
+ // public extensions = new Dictionary<any>();
87
+ // constructor(name: string, initializer?: DeepPartial<Property>) {
88
+ // super();
89
+ // this.serializedName = name;
90
+ // this.details = {
91
+ // default: {
92
+ // readOnly: false,
93
+ // uid: `property:${uid()}`,
94
+ // description: initializer?.description || '',
95
+ // name,
96
+ // required: false
97
+ // }
98
+ // };
99
+ // this.apply(initializer);
100
+ // }
101
+ // }
102
+ class Discriminator extends extensions_1.Extensions {
103
+ constructor(propertyName, initializer) {
104
+ super();
105
+ this.propertyName = propertyName;
106
+ this.extensions = new linq_1.Dictionary();
107
+ this.mapping = new linq_1.Dictionary();
108
+ this.apply(initializer);
109
+ }
110
+ }
111
+ exports.Discriminator = Discriminator;
112
+ var JsonType;
113
+ (function (JsonType) {
114
+ JsonType["Array"] = "array";
115
+ JsonType["Boolean"] = "boolean";
116
+ JsonType["Integer"] = "integer";
117
+ JsonType["Number"] = "number";
118
+ JsonType["Object"] = "object";
119
+ JsonType["String"] = "string";
120
+ })(JsonType = exports.JsonType || (exports.JsonType = {}));
121
+ function isJsonType(type, schema) {
122
+ return schema ? schema.type === codemodel_1.SchemaType.Object : false;
123
+ }
124
+ exports.isJsonType = isJsonType;
125
+ function isSchemaObject(schema) {
126
+ return isJsonType(JsonType.Object, schema);
127
+ }
128
+ exports.isSchemaObject = isSchemaObject;
129
+ class XML extends extensions_1.Extensions {
130
+ constructor(initializer) {
131
+ super();
132
+ this.extensions = new linq_1.Dictionary();
133
+ this.attribute = false;
134
+ this.wrapped = false;
135
+ this.apply(initializer);
136
+ }
137
+ }
138
+ exports.XML = XML;
139
+ // export interface Schema extends Extensions {
140
+ // details: LanguageDetails<SchemaDetails>;
141
+ // /* common properties */
142
+ // type?: JsonType;
143
+ // title?: string;
144
+ // description?: string;
145
+ // format?: string;
146
+ // nullable: boolean;
147
+ // readOnly: boolean;
148
+ // writeOnly: boolean;
149
+ // deprecated: boolean;
150
+ // required: Array<string>;
151
+ // /* number restrictions */
152
+ // multipleOf?: number;
153
+ // maximum?: number;
154
+ // exclusiveMaximum?: boolean;
155
+ // minimum?: number;
156
+ // exclusiveMinimum?: boolean;
157
+ // /* string restrictions */
158
+ // maxLength?: number;
159
+ // minLength?: number;
160
+ // pattern?: string; // regex
161
+ // /* array restrictions */
162
+ // maxItems?: number;
163
+ // minItems?: number;
164
+ // uniqueItems?: boolean;
165
+ // /* object restrictions */
166
+ // maxProperties?: number;
167
+ // minProperties?: number;
168
+ // /* unbounded properties */
169
+ // example?: any;
170
+ // default?: any;
171
+ // /* Properties that are objects */
172
+ // discriminator?: Discriminator;
173
+ // externalDocs?: ExternalDocumentation;
174
+ // xml?: XML;
175
+ // /* Properties that are collections of things that are not references */
176
+ // enum: Array<any>;
177
+ // /* properties with potential references */
178
+ // not?: Schema;
179
+ // allOf: Array<Schema>;
180
+ // oneOf: Array<Schema>;
181
+ // anyOf: Array<Schema>;
182
+ // items?: Schema;
183
+ // properties: Dictionary<Property>;
184
+ // additionalProperties?: boolean | Schema;
185
+ // }
186
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../utils/schema.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAGhG,6CAA0C;AAE1C,4CAAuD;AAEvD,sDAAoG;AAsBpG,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,4BAAiB,CAAA;AACnB,CAAC,EAFW,OAAO,GAAP,eAAO,KAAP,eAAO,QAElB;AA6ED,6DAA6D;AAC7D,oDAAoD;AACpD,2CAA2C;AAC3C,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC,wCAAwC;AACxC,oDAAoD;AACpD,+CAA+C;AAE/C,mEAAmE;AACnE,eAAe;AACf,uBAAuB;AACvB,mBAAmB;AACnB,kCAAkC;AAClC,2BAA2B;AAC3B,eAAe;AACf,UAAU;AACV,SAAS;AACT,+BAA+B;AAC/B,MAAM;AACN,IAAI;AAEJ,SAAgB,mBAAmB,CAAC,MAAoB;;IACtD,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C1C,eAAe;AAEf,4EAA4E;AAC5E,sBAAsB;AAEtB,+CAA+C;AAC/C,kBAAkB;AAClB,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;AAC1B,oBAAoB;AACpB,sCAAsC;AACtC,6CAA6C;AAC7C,IAAI"}
@@ -0,0 +1,123 @@
1
+ import { Extensions } from './extensions';
2
+ import { ParameterLocation } from './http-operation';
3
+ import { Dictionary } from '@azure-tools/linq';
4
+ import { DeepPartial } from '@azure-tools/codegen';
5
+ export declare enum Scheme {
6
+ Bearer = "bearer"
7
+ }
8
+ export declare enum SecurityType {
9
+ ApiKey = "apiKey",
10
+ Http = "http",
11
+ OAuth2 = "oauth2",
12
+ OpenIDConnect = "openIdConnect"
13
+ }
14
+ export declare class APIKeySecurityScheme extends Extensions implements APIKeySecurityScheme {
15
+ name: string;
16
+ extensions: Dictionary<any>;
17
+ constructor(name: string, inWhere: ParameterLocation, initializer?: DeepPartial<APIKeySecurityScheme>);
18
+ }
19
+ export declare class BearerHTTPSecurityScheme extends Extensions implements BearerHTTPSecurityScheme {
20
+ extensions: Dictionary<any>;
21
+ scheme: Scheme;
22
+ constructor(initializer?: DeepPartial<BearerHTTPSecurityScheme>);
23
+ }
24
+ export declare class ImplicitOAuthFlow extends Extensions implements ImplicitOAuthFlow {
25
+ authorizationUrl: string;
26
+ extensions: Dictionary<any>;
27
+ scopes: Dictionary<string>;
28
+ constructor(authorizationUrl: string, initializer?: DeepPartial<ImplicitOAuthFlow>);
29
+ }
30
+ export declare class NonBearerHTTPSecurityScheme extends Extensions implements NonBearerHTTPSecurityScheme {
31
+ scheme: string;
32
+ extensions: Dictionary<any>;
33
+ constructor(scheme: string, initializer?: DeepPartial<NonBearerHTTPSecurityScheme>);
34
+ }
35
+ export declare class OAuth2SecurityScheme extends Extensions implements OAuth2SecurityScheme {
36
+ flows: OAuthFlows;
37
+ extensions: Dictionary<any>;
38
+ constructor(flows: OAuthFlows, initializer?: DeepPartial<OAuth2SecurityScheme>);
39
+ }
40
+ export declare class OAuthFlows extends Extensions implements OAuthFlows {
41
+ extensions: Dictionary<any>;
42
+ constructor(initializer?: DeepPartial<OAuthFlows>);
43
+ }
44
+ export interface OpenIdConnectSecurityScheme extends Extensions {
45
+ type: SecurityType.OpenIDConnect;
46
+ openIdConnectUrl: string;
47
+ description?: string;
48
+ }
49
+ export declare class OpenIdConnectSecurityScheme extends Extensions implements OpenIdConnectSecurityScheme {
50
+ openIdConnectUrl: string;
51
+ extensions: Dictionary<any>;
52
+ constructor(openIdConnectUrl: string, initializer?: DeepPartial<OpenIdConnectSecurityScheme>);
53
+ }
54
+ export interface PasswordOAuthFlow extends Extensions {
55
+ tokenUrl: string;
56
+ refreshUrl?: string;
57
+ scopes: Dictionary<string>;
58
+ }
59
+ export declare class PasswordOAuthFlow extends Extensions implements PasswordOAuthFlow {
60
+ tokenUrl: string;
61
+ extensions: Dictionary<any>;
62
+ scopes: Dictionary<string>;
63
+ constructor(tokenUrl: string, initializer?: DeepPartial<PasswordOAuthFlow>);
64
+ }
65
+ export declare type HTTPSecurityScheme = NonBearerHTTPSecurityScheme | BearerHTTPSecurityScheme;
66
+ export declare type SecurityScheme = APIKeySecurityScheme | HTTPSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme;
67
+ export interface APIKeySecurityScheme extends Extensions {
68
+ type: SecurityType.ApiKey;
69
+ name: string;
70
+ in: ParameterLocation;
71
+ description?: string;
72
+ }
73
+ export declare class AuthorizationCodeOAuthFlow extends Extensions implements AuthorizationCodeOAuthFlow {
74
+ authorizationUrl: string;
75
+ extensions: Dictionary<any>;
76
+ scopes: Dictionary<string>;
77
+ constructor(authorizationUrl: string, tokenUrl: string, initializer?: DeepPartial<AuthorizationCodeOAuthFlow>);
78
+ }
79
+ export declare class ClientCredentialsFlow extends Extensions implements ClientCredentialsFlow {
80
+ tokenUrl: string;
81
+ extensions: Dictionary<any>;
82
+ scopes: Dictionary<string>;
83
+ constructor(tokenUrl: string, initializer?: DeepPartial<ClientCredentialsFlow>);
84
+ }
85
+ export interface AuthorizationCodeOAuthFlow extends Extensions {
86
+ authorizationUrl: string;
87
+ tokenUrl: string;
88
+ refreshUrl?: string;
89
+ scopes: Dictionary<string>;
90
+ }
91
+ export interface BearerHTTPSecurityScheme extends Extensions {
92
+ scheme: Scheme.Bearer;
93
+ bearerFormat?: string;
94
+ type: SecurityType.Http;
95
+ description?: string;
96
+ }
97
+ export interface ClientCredentialsFlow extends Extensions {
98
+ tokenUrl: string;
99
+ refreshUrl?: string;
100
+ scopes: Dictionary<string>;
101
+ }
102
+ export interface ImplicitOAuthFlow extends Extensions {
103
+ authorizationUrl: string;
104
+ refreshUrl?: string;
105
+ scopes: Dictionary<string>;
106
+ }
107
+ export interface NonBearerHTTPSecurityScheme extends Extensions {
108
+ scheme: string;
109
+ description?: string;
110
+ type: SecurityType.Http;
111
+ }
112
+ export interface OAuth2SecurityScheme extends Extensions {
113
+ type: SecurityType.OAuth2;
114
+ flows: OAuthFlows;
115
+ description?: string;
116
+ }
117
+ export interface OAuthFlows extends Extensions {
118
+ implicit?: ImplicitOAuthFlow;
119
+ password?: PasswordOAuthFlow;
120
+ clientCredentials?: ClientCredentialsFlow;
121
+ authorizationCode?: AuthorizationCodeOAuthFlow;
122
+ }
123
+ //# sourceMappingURL=security-scheme.d.ts.map
@@ -0,0 +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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qBAAqB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;CAChD"}
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License. See License.txt in the project root for license information.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const extensions_1 = require("./extensions");
8
+ const linq_1 = require("@azure-tools/linq");
9
+ var Scheme;
10
+ (function (Scheme) {
11
+ Scheme["Bearer"] = "bearer";
12
+ })(Scheme = exports.Scheme || (exports.Scheme = {}));
13
+ var SecurityType;
14
+ (function (SecurityType) {
15
+ SecurityType["ApiKey"] = "apiKey";
16
+ SecurityType["Http"] = "http";
17
+ SecurityType["OAuth2"] = "oauth2";
18
+ SecurityType["OpenIDConnect"] = "openIdConnect";
19
+ })(SecurityType = exports.SecurityType || (exports.SecurityType = {}));
20
+ class APIKeySecurityScheme extends extensions_1.Extensions {
21
+ constructor(name, inWhere, initializer) {
22
+ super();
23
+ this.name = name;
24
+ this.extensions = new linq_1.Dictionary();
25
+ this.in = inWhere;
26
+ this.type = SecurityType.ApiKey;
27
+ this.apply(initializer);
28
+ }
29
+ }
30
+ exports.APIKeySecurityScheme = APIKeySecurityScheme;
31
+ class BearerHTTPSecurityScheme extends extensions_1.Extensions {
32
+ constructor(initializer) {
33
+ super();
34
+ this.extensions = new linq_1.Dictionary();
35
+ this.scheme = Scheme.Bearer;
36
+ this.type = SecurityType.Http;
37
+ this.apply(initializer);
38
+ }
39
+ }
40
+ exports.BearerHTTPSecurityScheme = BearerHTTPSecurityScheme;
41
+ class ImplicitOAuthFlow extends extensions_1.Extensions {
42
+ constructor(authorizationUrl, initializer) {
43
+ super();
44
+ this.authorizationUrl = authorizationUrl;
45
+ this.extensions = new linq_1.Dictionary();
46
+ this.scopes = new linq_1.Dictionary();
47
+ this.apply(initializer);
48
+ }
49
+ }
50
+ exports.ImplicitOAuthFlow = ImplicitOAuthFlow;
51
+ class NonBearerHTTPSecurityScheme extends extensions_1.Extensions {
52
+ constructor(scheme, initializer) {
53
+ super();
54
+ this.scheme = scheme;
55
+ this.extensions = new linq_1.Dictionary();
56
+ this.apply(initializer);
57
+ this.type = SecurityType.Http;
58
+ }
59
+ }
60
+ exports.NonBearerHTTPSecurityScheme = NonBearerHTTPSecurityScheme;
61
+ class OAuth2SecurityScheme extends extensions_1.Extensions {
62
+ constructor(flows, initializer) {
63
+ super();
64
+ this.flows = flows;
65
+ this.extensions = new linq_1.Dictionary();
66
+ this.type = SecurityType.OAuth2;
67
+ this.apply(initializer);
68
+ }
69
+ }
70
+ exports.OAuth2SecurityScheme = OAuth2SecurityScheme;
71
+ class OAuthFlows extends extensions_1.Extensions {
72
+ constructor(initializer) {
73
+ super();
74
+ this.extensions = new linq_1.Dictionary();
75
+ this.apply(initializer);
76
+ }
77
+ }
78
+ exports.OAuthFlows = OAuthFlows;
79
+ class OpenIdConnectSecurityScheme extends extensions_1.Extensions {
80
+ constructor(openIdConnectUrl, initializer) {
81
+ super();
82
+ this.openIdConnectUrl = openIdConnectUrl;
83
+ this.extensions = new linq_1.Dictionary();
84
+ this.type = SecurityType.OpenIDConnect;
85
+ this.apply(initializer);
86
+ }
87
+ }
88
+ exports.OpenIdConnectSecurityScheme = OpenIdConnectSecurityScheme;
89
+ class PasswordOAuthFlow extends extensions_1.Extensions {
90
+ constructor(tokenUrl, initializer) {
91
+ super();
92
+ this.tokenUrl = tokenUrl;
93
+ this.extensions = new linq_1.Dictionary();
94
+ this.scopes = new linq_1.Dictionary();
95
+ this.apply(initializer);
96
+ }
97
+ }
98
+ exports.PasswordOAuthFlow = PasswordOAuthFlow;
99
+ class AuthorizationCodeOAuthFlow extends extensions_1.Extensions {
100
+ constructor(authorizationUrl, tokenUrl, initializer) {
101
+ super();
102
+ this.authorizationUrl = authorizationUrl;
103
+ this.extensions = new linq_1.Dictionary();
104
+ this.scopes = new linq_1.Dictionary();
105
+ this.apply(initializer);
106
+ }
107
+ }
108
+ exports.AuthorizationCodeOAuthFlow = AuthorizationCodeOAuthFlow;
109
+ class ClientCredentialsFlow extends extensions_1.Extensions {
110
+ constructor(tokenUrl, initializer) {
111
+ super();
112
+ this.tokenUrl = tokenUrl;
113
+ this.extensions = new linq_1.Dictionary();
114
+ this.scopes = new linq_1.Dictionary();
115
+ this.apply(initializer);
116
+ }
117
+ }
118
+ exports.ClientCredentialsFlow = ClientCredentialsFlow;
119
+ //# sourceMappingURL=security-scheme.js.map
@@ -0,0 +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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AC1B,CAAC;CACF;AAPD,sDAOC"}
@@ -0,0 +1,2 @@
1
+ export declare function uid(): number;
2
+ //# sourceMappingURL=uid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uid.d.ts","sourceRoot":"","sources":["../../utils/uid.ts"],"names":[],"mappings":"AAEA,wBAAgB,GAAG,WAElB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ let n = 0;
4
+ function uid() {
5
+ return n++;
6
+ }
7
+ exports.uid = uid;
8
+ //# sourceMappingURL=uid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uid.js","sourceRoot":"","sources":["../../utils/uid.ts"],"names":[],"mappings":";;AAAA,IAAI,CAAC,GAAG,CAAC,CAAC;AAEV,SAAgB,GAAG;IACjB,OAAO,CAAC,EAAE,CAAC;AACb,CAAC;AAFD,kBAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/powershell",
3
- "version": "2.1.401",
3
+ "version": "3.0.0",
4
4
  "description": "AutoRest PowerShell Cmdlet Generator",
5
5
  "main": "dist/exports.js",
6
6
  "typings": "dist/exports.d.ts",
@@ -10,19 +10,6 @@
10
10
  "engines": {
11
11
  "node": ">=10.12.0"
12
12
  },
13
- "scripts": {
14
- "start": "node --max_old_space_size=4096 ./dist/main.js",
15
- "debug": "node --max_old_space_size=4096 --inspect-brk ./dist/main.js",
16
- "eslint-fix": "eslint . --fix --ext .ts",
17
- "eslint": "eslint . --ext .ts",
18
- "build": "tsc -p .",
19
- "watch": "tsc -p . --watch",
20
- "prepare": "npm run build",
21
- "test": "npm run build && mocha dist/test",
22
- "clean": "ver > nul 2>&1 nul && npm run --silent clean-cmd || npm run --silent clean-bash",
23
- "clean-cmd": "if exist dist rmdir /s /q dist && exit 0 || exit 0 ",
24
- "clean-bash": "rm nul && rm -rf dist && exit 0 || exit 0"
25
- },
26
13
  "repository": {
27
14
  "type": "git",
28
15
  "url": "git+https://github.com/Azure/autorest.powershell.git"
@@ -38,30 +25,44 @@
38
25
  "url": "https://github.com/Azure/autorest.powershell/issues"
39
26
  },
40
27
  "homepage": "https://github.com/Azure/autorest.powershell#readme",
41
- "readme": "https://github.com/Azure/autorest.powershell/blob/master/readme.md",
28
+ "readme": "https://github.com/Azure/autorest.powershell/blob/master/README.md",
42
29
  "devDependencies": {
43
30
  "@types/js-yaml": "3.12.1",
44
31
  "@types/mocha": "5.2.5",
45
32
  "@types/node": "12.7.2",
46
- "mocha": "5.2.0",
47
- "mocha-typescript": "1.1.17",
33
+ "mocha": "10.1.0",
34
+ "@testdeck/mocha": "0.2.1",
48
35
  "typescript": "~3.7.0-beta",
49
36
  "@types/xmlbuilder": "0.0.34",
50
- "@typescript-eslint/eslint-plugin": "~2.0.0",
37
+ "@typescript-eslint/eslint-plugin": "~5.16.0",
51
38
  "@typescript-eslint/parser": "~2.0.0",
52
39
  "@microsoft.azure/autorest.testserver": "~2.9.3",
53
- "@autorest/autorest": "~3.0.6118",
54
- "eslint": "~6.2.2"
40
+ "autorest": "~3.0.6118",
41
+ "eslint": "~8.12.0"
55
42
  },
56
43
  "dependencies": {
57
- "@azure-tools/codegen": "~2.1.0",
44
+ "js-yaml": "3.13.1",
45
+ "@azure-tools/codegen": "~2.5.276",
58
46
  "@azure-tools/codegen-csharp": "~3.0.0",
59
47
  "@azure-tools/codemodel-v3": "~3.1.0",
48
+ "@azure-tools/codemodel": "~4.13.342",
60
49
  "@azure-tools/autorest-extension-base": "~3.1.0",
61
50
  "@azure-tools/linq": "~3.1.0",
62
51
  "@azure-tools/tasks": "~3.0.0",
63
52
  "@azure-tools/async-io": "~3.0.0",
64
53
  "source-map-support": "0.5.13",
65
54
  "xmlbuilder": "10.1.1"
55
+ },
56
+ "scripts": {
57
+ "start": "node --max_old_space_size=4096 ./dist/main.js",
58
+ "debug": "node --max_old_space_size=4096 --inspect-brk ./dist/main.js",
59
+ "eslint-fix": "eslint . --fix --ext .ts",
60
+ "eslint": "eslint . --ext .ts",
61
+ "build": "tsc -p .",
62
+ "watch": "tsc -p . --watch",
63
+ "test": "npm run build && mocha dist/test",
64
+ "clean": "ver > nul 2>&1 nul && npm run --silent clean-cmd || npm run --silent clean-bash",
65
+ "clean-cmd": "if exist dist rmdir /s /q dist && exit 0 || exit 0 ",
66
+ "clean-bash": "rm nul && rm -rf dist && exit 0 || exit 0"
66
67
  }
67
68
  }
@@ -1,15 +1,5 @@
1
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.
2
+ ${$project.pwshCommentHeader}
13
3
  # ----------------------------------------------------------------------------------
14
4
  param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15
5
  $ErrorActionPreference = 'Stop'
@@ -104,13 +94,13 @@ if(Test-Path $customPsm1) {
104
94
 
105
95
  $exportsFolder = Join-Path $PSScriptRoot '${$lib.path.relative($project.baseFolder, $project.exportsFolder)}'
106
96
  if(Test-Path $exportsFolder) {
107
- $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
97
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
108
98
  }
109
99
  $null = New-Item -ItemType Directory -Force -Path $exportsFolder
110
100
 
111
101
  $internalFolder = Join-Path $PSScriptRoot '${$lib.path.relative($project.baseFolder, $project.internalFolder)}'
112
102
  if(Test-Path $internalFolder) {
113
- $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
103
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
114
104
  }
115
105
  $null = New-Item -ItemType Directory -Force -Path $internalFolder
116
106
 
@@ -120,15 +110,22 @@ $moduleName = '${$project.moduleName}'
120
110
  $examplesFolder = Join-Path $PSScriptRoot '${$lib.path.relative($project.baseFolder, $project.examplesFolder)}'
121
111
  $null = New-Item -ItemType Directory -Force -Path $examplesFolder
122
112
 
113
+ Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
114
+ $modelCmdlets = @(${$project.modelCmdlets.map(each => `'` + each + `'`).join(', ')})
115
+ if ($modelCmdlets.Count -gt 0) {
116
+ . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
117
+ CreateModelCmdlet($modelCmdlets)
118
+ }
119
+
123
120
  if($NoDocs) {
124
121
  Write-Host -ForegroundColor Green 'Creating exports...'
125
- Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
122
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
126
123
  } else {
127
124
  Write-Host -ForegroundColor Green 'Creating exports and docs...'
128
125
  $moduleDescription = '${$project.metadata.description}'
129
126
  $docsFolder = Join-Path $PSScriptRoot '${$lib.path.relative($project.baseFolder, $project.docsFolder)}'
130
127
  if(Test-Path $docsFolder) {
131
- $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
128
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
132
129
  }
133
130
  $null = New-Item -ItemType Directory -Force -Path $docsFolder
134
131
  Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
@@ -1,15 +1,5 @@
1
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.
2
+ ${$project.pwshCommentHeader}
13
3
  # ----------------------------------------------------------------------------------
14
4
  param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
15
5
  $ErrorActionPreference = 'Stop'
@@ -24,7 +14,7 @@ if(-not $Isolated) {
24
14
  function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
25
15
  if($predicate) {
26
16
  $module = Get-Module -ListAvailable -Name $moduleName
27
- if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) {
17
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) {
28
18
  $null = New-Item -ItemType Directory -Force -Path $path
29
19
  Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
30
20
  if ($requiredVersion) {
@@ -53,10 +43,10 @@ $tools = Join-Path $PSScriptRoot 'tools'
53
43
  $resourceDir = Join-Path $tools 'Resources'
54
44
  $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
55
45
 
56
- if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
46
+ if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) {
57
47
  Write-Host -ForegroundColor Green "Building local Resource module used for test..."
58
48
  Set-Location $resourceDir
59
- $null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
49
+ $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
60
50
  $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
61
51
  Set-Location $HOME/.PSSharedModules/Resources
62
52
  $null = .\build-module.ps1