@pnp/cli-microsoft365 7.0.0-beta.934602e → 7.0.0-beta.b7c2a8d

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 (1288) hide show
  1. package/{.eslintrc.js → .eslintrc.cjs} +1 -1
  2. package/dist/Auth.js +358 -392
  3. package/dist/AuthServer.js +8 -12
  4. package/dist/Command.js +183 -214
  5. package/dist/GlobalOptions.js +2 -5
  6. package/dist/api.js +5 -9
  7. package/dist/appInsights.js +17 -16
  8. package/dist/auth/FileTokenStorage.js +4 -8
  9. package/dist/auth/TokenStorage.js +1 -2
  10. package/dist/auth/msalCachePlugin.js +17 -33
  11. package/dist/autocomplete.js +12 -13
  12. package/dist/chili/chili.js +208 -232
  13. package/dist/chili/index.js +2 -13
  14. package/dist/cli/Cli.js +285 -307
  15. package/dist/cli/CommandInfo.js +1 -2
  16. package/dist/cli/CommandOptionInfo.js +1 -2
  17. package/dist/cli/Logger.js +1 -2
  18. package/dist/config.js +3 -5
  19. package/dist/index.js +14 -13
  20. package/dist/m365/aad/commands/app/app-add.js +403 -445
  21. package/dist/m365/aad/commands/app/app-get.js +91 -110
  22. package/dist/m365/aad/commands/app/app-list.js +14 -27
  23. package/dist/m365/aad/commands/app/app-remove.js +71 -86
  24. package/dist/m365/aad/commands/app/app-role-add.js +71 -88
  25. package/dist/m365/aad/commands/app/app-role-list.js +44 -59
  26. package/dist/m365/aad/commands/app/app-role-remove.js +130 -153
  27. package/dist/m365/aad/commands/app/app-set.js +190 -215
  28. package/dist/m365/aad/commands/approleassignment/ServicePrincipal.js +2 -0
  29. package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +117 -132
  30. package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +91 -112
  31. package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +119 -136
  32. package/dist/m365/aad/commands/group/group-get.js +22 -35
  33. package/dist/m365/aad/commands/group/group-list.js +31 -44
  34. package/dist/m365/aad/commands/groupsetting/groupsetting-add.js +41 -54
  35. package/dist/m365/aad/commands/groupsetting/groupsetting-get.js +25 -38
  36. package/dist/m365/aad/commands/groupsetting/groupsetting-list.js +14 -27
  37. package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +41 -54
  38. package/dist/m365/aad/commands/groupsetting/groupsetting-set.js +41 -54
  39. package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +22 -35
  40. package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-list.js +14 -27
  41. package/dist/m365/aad/commands/license/license-list.js +17 -30
  42. package/dist/m365/aad/commands/o365group/GroupExtended.js +1 -2
  43. package/dist/m365/aad/commands/o365group/o365group-add.js +137 -154
  44. package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +18 -31
  45. package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +27 -42
  46. package/dist/m365/aad/commands/o365group/o365group-get.js +30 -43
  47. package/dist/m365/aad/commands/o365group/o365group-list.js +59 -74
  48. package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +47 -62
  49. package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +20 -33
  50. package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-remove.js +69 -84
  51. package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +54 -69
  52. package/dist/m365/aad/commands/o365group/o365group-remove.js +45 -58
  53. package/dist/m365/aad/commands/o365group/o365group-renew.js +26 -39
  54. package/dist/m365/aad/commands/o365group/o365group-report-activitycounts.js +5 -7
  55. package/dist/m365/aad/commands/o365group/o365group-report-activitydetail.js +5 -7
  56. package/dist/m365/aad/commands/o365group/o365group-report-activityfilecounts.js +5 -7
  57. package/dist/m365/aad/commands/o365group/o365group-report-activitygroupcounts.js +5 -7
  58. package/dist/m365/aad/commands/o365group/o365group-report-activitystorage.js +5 -7
  59. package/dist/m365/aad/commands/o365group/o365group-set.js +116 -131
  60. package/dist/m365/aad/commands/o365group/o365group-teamify.js +56 -71
  61. package/dist/m365/aad/commands/o365group/o365group-user-add.js +39 -52
  62. package/dist/m365/aad/commands/o365group/o365group-user-list.js +40 -57
  63. package/dist/m365/aad/commands/o365group/o365group-user-remove.js +71 -84
  64. package/dist/m365/aad/commands/o365group/o365group-user-set.js +88 -105
  65. package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +35 -48
  66. package/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +30 -43
  67. package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +39 -52
  68. package/dist/m365/aad/commands/oauth2grant/oauth2grant-set.js +27 -40
  69. package/dist/m365/aad/commands/policy/policy-list.js +43 -58
  70. package/dist/m365/aad/commands/siteclassification/SiteClassificationSettings.js +1 -5
  71. package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +55 -68
  72. package/dist/m365/aad/commands/siteclassification/siteclassification-enable.js +78 -91
  73. package/dist/m365/aad/commands/siteclassification/siteclassification-get.js +62 -75
  74. package/dist/m365/aad/commands/siteclassification/siteclassification-set.js +102 -115
  75. package/dist/m365/aad/commands/sp/sp-add.js +56 -71
  76. package/dist/m365/aad/commands/sp/sp-get.js +56 -71
  77. package/dist/m365/aad/commands/sp/sp-list.js +25 -38
  78. package/dist/m365/aad/commands/user/user-add.js +43 -57
  79. package/dist/m365/aad/commands/user/user-get.js +50 -63
  80. package/dist/m365/aad/commands/user/user-guest-add.js +31 -44
  81. package/dist/m365/aad/commands/user/user-hibp.js +31 -44
  82. package/dist/m365/aad/commands/user/user-license-add.js +29 -42
  83. package/dist/m365/aad/commands/user/user-license-list.js +36 -49
  84. package/dist/m365/aad/commands/user/user-license-remove.js +47 -62
  85. package/dist/m365/aad/commands/user/user-list.js +24 -37
  86. package/dist/m365/aad/commands/user/user-password-validate.js +24 -37
  87. package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +53 -66
  88. package/dist/m365/aad/commands/user/user-recyclebinitem-list.js +17 -30
  89. package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +39 -52
  90. package/dist/m365/aad/commands/user/user-recyclebinitem-restore.js +28 -41
  91. package/dist/m365/aad/commands/user/user-remove.js +43 -58
  92. package/dist/m365/aad/commands/user/user-set.js +95 -114
  93. package/dist/m365/aad/commands/user/user-signin-list.js +33 -46
  94. package/dist/m365/aad/commands.js +1 -3
  95. package/dist/m365/adaptivecard/commands/adaptivecard-send.js +47 -60
  96. package/dist/m365/adaptivecard/commands.js +1 -3
  97. package/dist/m365/app/commands/app-get.js +23 -36
  98. package/dist/m365/app/commands/app-open.js +24 -39
  99. package/dist/m365/app/commands/permission/permission-add.js +91 -155
  100. package/dist/m365/app/commands/permission/permission-list.js +201 -227
  101. package/dist/m365/app/commands.js +1 -3
  102. package/dist/m365/base/AnonymousCommand.js +5 -19
  103. package/dist/m365/base/AppCommand.js +55 -71
  104. package/dist/m365/base/AzmgmtCommand.js +6 -9
  105. package/dist/m365/base/AzmgmtItemsListCommand.js +33 -48
  106. package/dist/m365/base/ContextCommand.js +6 -9
  107. package/dist/m365/base/DateAndPeriodBasedReport.js +11 -24
  108. package/dist/m365/base/GraphCommand.js +2 -5
  109. package/dist/m365/base/M365RcJson.js +1 -2
  110. package/dist/m365/base/O365MgmtCommand.js +2 -5
  111. package/dist/m365/base/PeriodBasedReport.js +41 -58
  112. package/dist/m365/base/PlannerCommand.js +2 -5
  113. package/dist/m365/base/PowerAppsCommand.js +6 -9
  114. package/dist/m365/base/PowerBICommand.js +2 -5
  115. package/dist/m365/base/PowerPlatformCommand.js +6 -9
  116. package/dist/m365/base/SpoCommand.js +33 -50
  117. package/dist/m365/base/YammerCommand.js +5 -8
  118. package/dist/m365/booking/commands/business/business-get.js +39 -54
  119. package/dist/m365/booking/commands/business/business-list.js +15 -28
  120. package/dist/m365/booking/commands.js +1 -3
  121. package/dist/m365/cli/commands/cli-consent.js +19 -34
  122. package/dist/m365/cli/commands/cli-doctor.js +35 -49
  123. package/dist/m365/cli/commands/cli-issue.js +23 -36
  124. package/dist/m365/cli/commands/cli-reconsent.js +22 -35
  125. package/dist/m365/cli/commands/completion/completion-clink-update.js +8 -21
  126. package/dist/m365/cli/commands/completion/completion-pwsh-setup.js +48 -59
  127. package/dist/m365/cli/commands/completion/completion-pwsh-update.js +11 -24
  128. package/dist/m365/cli/commands/completion/completion-sh-setup.js +16 -29
  129. package/dist/m365/cli/commands/completion/completion-sh-update.js +11 -24
  130. package/dist/m365/cli/commands/config/config-get.js +12 -25
  131. package/dist/m365/cli/commands/config/config-list.js +16 -0
  132. package/dist/m365/cli/commands/config/config-reset.js +17 -30
  133. package/dist/m365/cli/commands/config/config-set.js +35 -48
  134. package/dist/m365/cli/commands.js +2 -3
  135. package/dist/m365/commands/commands.js +1 -3
  136. package/dist/m365/commands/docs.js +15 -28
  137. package/dist/m365/commands/login.js +102 -118
  138. package/dist/m365/commands/logout.js +30 -45
  139. package/dist/m365/commands/request.js +65 -78
  140. package/dist/m365/commands/setup.js +90 -103
  141. package/dist/m365/commands/setupPresets.js +3 -6
  142. package/dist/m365/commands/status.js +50 -65
  143. package/dist/m365/commands/version.js +8 -21
  144. package/dist/m365/context/commands/context-init.js +7 -20
  145. package/dist/m365/context/commands/context-remove.js +25 -38
  146. package/dist/m365/context/commands/option/option-list.js +29 -42
  147. package/dist/m365/context/commands/option/option-remove.js +31 -44
  148. package/dist/m365/context/commands/option/option-set.js +38 -51
  149. package/dist/m365/context/commands.js +1 -3
  150. package/dist/m365/file/commands/convert/convert-pdf.js +254 -287
  151. package/dist/m365/file/commands/file-add.js +138 -161
  152. package/dist/m365/file/commands/file-list.js +120 -141
  153. package/dist/m365/file/commands.js +1 -3
  154. package/dist/m365/flow/commands/environment/FlowEnvironmentDetails.js +1 -2
  155. package/dist/m365/flow/commands/environment/environment-get.js +33 -45
  156. package/dist/m365/flow/commands/environment/environment-list.js +21 -41
  157. package/dist/m365/flow/commands/flow-disable.js +24 -37
  158. package/dist/m365/flow/commands/flow-enable.js +24 -37
  159. package/dist/m365/flow/commands/flow-export.js +111 -124
  160. package/dist/m365/flow/commands/flow-get.js +29 -42
  161. package/dist/m365/flow/commands/flow-list.js +45 -58
  162. package/dist/m365/flow/commands/flow-remove.js +48 -61
  163. package/dist/m365/flow/commands/owner/owner-ensure.js +64 -77
  164. package/dist/m365/flow/commands/owner/owner-list.js +31 -44
  165. package/dist/m365/flow/commands/owner/owner-remove.js +64 -77
  166. package/dist/m365/flow/commands/run/run-cancel.js +42 -55
  167. package/dist/m365/flow/commands/run/run-get.js +44 -57
  168. package/dist/m365/flow/commands/run/run-list.js +33 -51
  169. package/dist/m365/flow/commands/run/run-resubmit.js +57 -72
  170. package/dist/m365/flow/commands.js +1 -3
  171. package/dist/m365/graph/Changelog.js +1 -2
  172. package/dist/m365/graph/commands/changelog/changelog-list.js +37 -50
  173. package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +38 -51
  174. package/dist/m365/graph/commands/schemaextension/schemaextension-get.js +25 -38
  175. package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +46 -59
  176. package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +39 -52
  177. package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +65 -78
  178. package/dist/m365/graph/commands/subscription/subscription-add.js +45 -58
  179. package/dist/m365/graph/commands.js +1 -3
  180. package/dist/m365/onedrive/commands/onedrive-list.js +41 -56
  181. package/dist/m365/onedrive/commands/report/report-activityfilecounts.js +5 -7
  182. package/dist/m365/onedrive/commands/report/report-activityusercounts.js +5 -7
  183. package/dist/m365/onedrive/commands/report/report-activityuserdetail.js +5 -7
  184. package/dist/m365/onedrive/commands/report/report-usageaccountcounts.js +5 -7
  185. package/dist/m365/onedrive/commands/report/report-usageaccountdetail.js +5 -7
  186. package/dist/m365/onedrive/commands/report/report-usagefilecounts.js +5 -7
  187. package/dist/m365/onedrive/commands/report/report-usagestorage.js +5 -7
  188. package/dist/m365/onedrive/commands.js +1 -3
  189. package/dist/m365/onenote/commands/notebook/notebook-list.js +61 -80
  190. package/dist/m365/onenote/commands/page/page-list.js +50 -67
  191. package/dist/m365/onenote/commands.js +1 -3
  192. package/dist/m365/outlook/Outlook.js +1 -5
  193. package/dist/m365/outlook/commands/mail/mail-send.js +35 -49
  194. package/dist/m365/outlook/commands/message/message-get.js +43 -56
  195. package/dist/m365/outlook/commands/message/message-list.js +47 -62
  196. package/dist/m365/outlook/commands/message/message-move.js +52 -67
  197. package/dist/m365/outlook/commands/report/report-mailactivitycounts.js +5 -7
  198. package/dist/m365/outlook/commands/report/report-mailactivityusercounts.js +5 -7
  199. package/dist/m365/outlook/commands/report/report-mailactivityuserdetail.js +5 -7
  200. package/dist/m365/outlook/commands/report/report-mailappusageappsusercounts.js +5 -7
  201. package/dist/m365/outlook/commands/report/report-mailappusageusercounts.js +5 -7
  202. package/dist/m365/outlook/commands/report/report-mailappusageuserdetail.js +5 -7
  203. package/dist/m365/outlook/commands/report/report-mailappusageversionsusercounts.js +5 -7
  204. package/dist/m365/outlook/commands/report/report-mailboxusagedetail.js +5 -7
  205. package/dist/m365/outlook/commands/report/report-mailboxusagemailboxcount.js +5 -7
  206. package/dist/m365/outlook/commands/report/report-mailboxusagequotastatusmailboxcounts.js +5 -7
  207. package/dist/m365/outlook/commands/report/report-mailboxusagestorage.js +5 -7
  208. package/dist/m365/outlook/commands/room/room-list.js +18 -31
  209. package/dist/m365/outlook/commands/roomlist/roomlist-list.js +14 -27
  210. package/dist/m365/outlook/commands.js +1 -3
  211. package/dist/m365/pa/cds-project-mutator.js +4 -7
  212. package/dist/m365/pa/commands/app/app-consent-set.js +44 -59
  213. package/dist/m365/pa/commands/app/app-export.js +112 -131
  214. package/dist/m365/pa/commands/app/app-get.js +60 -75
  215. package/dist/m365/pa/commands/app/app-list.js +26 -39
  216. package/dist/m365/pa/commands/app/app-owner-set.js +41 -56
  217. package/dist/m365/pa/commands/app/app-permission-ensure.js +162 -0
  218. package/dist/m365/pa/commands/app/app-permission-list.js +31 -44
  219. package/dist/m365/pa/commands/app/app-permission-remove.js +153 -0
  220. package/dist/m365/pa/commands/app/app-remove.js +47 -60
  221. package/dist/m365/pa/commands/connector/Connector.js +1 -2
  222. package/dist/m365/pa/commands/connector/connector-export.js +113 -126
  223. package/dist/m365/pa/commands/connector/connector-list.js +26 -39
  224. package/dist/m365/pa/commands/environment/environment-get.js +31 -44
  225. package/dist/m365/pa/commands/environment/environment-list.js +28 -41
  226. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +44 -49
  227. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +44 -49
  228. package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +1 -2
  229. package/dist/m365/pa/commands/pcf/pcf-init.js +51 -62
  230. package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +1 -2
  231. package/dist/m365/pa/commands/solution/solution-init.js +62 -73
  232. package/dist/m365/pa/commands/solution/solution-reference-add.js +23 -36
  233. package/dist/m365/pa/commands.js +3 -3
  234. package/dist/m365/pa/template-instantiator.js +11 -13
  235. package/dist/m365/planner/AppliedCategories.js +1 -2
  236. package/dist/m365/planner/Task.js +1 -2
  237. package/dist/m365/planner/commands/bucket/bucket-add.js +50 -67
  238. package/dist/m365/planner/commands/bucket/bucket-get.js +71 -92
  239. package/dist/m365/planner/commands/bucket/bucket-list.js +38 -55
  240. package/dist/m365/planner/commands/bucket/bucket-remove.js +81 -100
  241. package/dist/m365/planner/commands/bucket/bucket-set.js +75 -94
  242. package/dist/m365/planner/commands/plan/plan-add.js +105 -128
  243. package/dist/m365/planner/commands/plan/plan-get.js +52 -70
  244. package/dist/m365/planner/commands/plan/plan-list.js +31 -47
  245. package/dist/m365/planner/commands/plan/plan-remove.js +57 -74
  246. package/dist/m365/planner/commands/plan/plan-set.js +149 -178
  247. package/dist/m365/planner/commands/roster/roster-add.js +26 -39
  248. package/dist/m365/planner/commands/roster/roster-get.js +24 -37
  249. package/dist/m365/planner/commands/roster/roster-member-add.js +43 -58
  250. package/dist/m365/planner/commands/roster/roster-member-get.js +36 -51
  251. package/dist/m365/planner/commands/roster/roster-member-list.js +17 -30
  252. package/dist/m365/planner/commands/roster/roster-member-remove.js +65 -84
  253. package/dist/m365/planner/commands/roster/roster-plan-list.js +39 -52
  254. package/dist/m365/planner/commands/roster/roster-remove.js +38 -53
  255. package/dist/m365/planner/commands/task/task-add.js +147 -174
  256. package/dist/m365/planner/commands/task/task-checklistitem-add.js +50 -65
  257. package/dist/m365/planner/commands/task/task-checklistitem-list.js +28 -41
  258. package/dist/m365/planner/commands/task/task-checklistitem-remove.js +53 -70
  259. package/dist/m365/planner/commands/task/task-get.js +100 -125
  260. package/dist/m365/planner/commands/task/task-list.js +79 -98
  261. package/dist/m365/planner/commands/task/task-reference-add.js +45 -55
  262. package/dist/m365/planner/commands/task/task-reference-list.js +22 -35
  263. package/dist/m365/planner/commands/task/task-reference-remove.js +70 -88
  264. package/dist/m365/planner/commands/task/task-remove.js +95 -116
  265. package/dist/m365/planner/commands/task/task-set.js +145 -174
  266. package/dist/m365/planner/commands/tenant/tenant-settings-list.js +21 -34
  267. package/dist/m365/planner/commands/tenant/tenant-settings-set.js +31 -44
  268. package/dist/m365/planner/commands.js +1 -3
  269. package/dist/m365/planner/taskPriority.js +1 -4
  270. package/dist/m365/pp/commands/Environment.js +1 -2
  271. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +44 -59
  272. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-list.js +19 -32
  273. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +60 -77
  274. package/dist/m365/pp/commands/card/card-clone.js +54 -71
  275. package/dist/m365/pp/commands/card/card-get.js +49 -64
  276. package/dist/m365/pp/commands/card/card-list.js +19 -32
  277. package/dist/m365/pp/commands/card/card-remove.js +60 -77
  278. package/dist/m365/pp/commands/chatbot/chatbot-get.js +45 -60
  279. package/dist/m365/pp/commands/chatbot/chatbot-list.js +20 -33
  280. package/dist/m365/pp/commands/chatbot/chatbot-remove.js +61 -78
  281. package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +26 -39
  282. package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +20 -33
  283. package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +40 -55
  284. package/dist/m365/pp/commands/dataverse/dataverse-table-row-list.js +35 -50
  285. package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +55 -72
  286. package/dist/m365/pp/commands/environment/environment-get.js +26 -39
  287. package/dist/m365/pp/commands/environment/environment-list.js +35 -48
  288. package/dist/m365/pp/commands/gateway/gateway-get.js +21 -34
  289. package/dist/m365/pp/commands/gateway/gateway-list.js +24 -37
  290. package/dist/m365/pp/commands/managementapp/managementapp-add.js +48 -63
  291. package/dist/m365/pp/commands/managementapp/managementapp-list.js +15 -28
  292. package/dist/m365/pp/commands/solution/Solution.js +1 -2
  293. package/dist/m365/pp/commands/solution/solution-get.js +50 -65
  294. package/dist/m365/pp/commands/solution/solution-list.js +31 -44
  295. package/dist/m365/pp/commands/solution/solution-publish.js +69 -86
  296. package/dist/m365/pp/commands/solution/solution-publisher-add.js +33 -46
  297. package/dist/m365/pp/commands/solution/solution-publisher-get.js +39 -54
  298. package/dist/m365/pp/commands/solution/solution-publisher-list.js +26 -39
  299. package/dist/m365/pp/commands/solution/solution-publisher-remove.js +60 -77
  300. package/dist/m365/pp/commands/solution/solution-remove.js +60 -77
  301. package/dist/m365/pp/commands/tenant/tenant-settings-list.js +21 -34
  302. package/dist/m365/pp/commands/tenant/tenant-settings-set.js +71 -84
  303. package/dist/m365/pp/commands.js +1 -3
  304. package/dist/m365/purview/commands/auditlog/auditlog-list.js +101 -120
  305. package/dist/m365/purview/commands/retentionevent/retentionevent-add.js +57 -72
  306. package/dist/m365/purview/commands/retentionevent/retentionevent-get.js +28 -41
  307. package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +16 -29
  308. package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +39 -54
  309. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-add.js +26 -39
  310. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-get.js +27 -40
  311. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +14 -27
  312. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +39 -54
  313. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-set.js +31 -44
  314. package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +70 -85
  315. package/dist/m365/purview/commands/retentionlabel/retentionlabel-get.js +27 -40
  316. package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +14 -27
  317. package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +39 -54
  318. package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +29 -42
  319. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-get.js +39 -52
  320. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-list.js +28 -41
  321. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-policysettings-list.js +35 -48
  322. package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +27 -40
  323. package/dist/m365/purview/commands.js +1 -3
  324. package/dist/m365/search/commands/externalconnection/externalconnection-add.js +35 -48
  325. package/dist/m365/search/commands/externalconnection/externalconnection-get.js +33 -46
  326. package/dist/m365/search/commands/externalconnection/externalconnection-list.js +14 -27
  327. package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +52 -69
  328. package/dist/m365/search/commands/externalconnection/externalconnection-schema-add.js +26 -39
  329. package/dist/m365/search/commands.js +1 -3
  330. package/dist/m365/skype/commands/report/report-activitycounts.js +5 -7
  331. package/dist/m365/skype/commands/report/report-activityusercounts.js +5 -7
  332. package/dist/m365/skype/commands/report/report-activityuserdetail.js +5 -7
  333. package/dist/m365/skype/commands.js +1 -3
  334. package/dist/m365/spfx/commands/package/package-generate.js +117 -128
  335. package/dist/m365/spfx/commands/project/JsonRule.js +3 -7
  336. package/dist/m365/spfx/commands/project/Rule.js +1 -5
  337. package/dist/m365/spfx/commands/project/WebApiPermissionRequests.js +1 -2
  338. package/dist/m365/spfx/commands/project/base-project-command.js +45 -49
  339. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.0.js +5 -7
  340. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.1.js +5 -7
  341. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.2.js +5 -7
  342. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.0.js +13 -15
  343. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.1.js +13 -15
  344. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.3.js +13 -15
  345. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.10.0.js +19 -21
  346. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.11.0.js +19 -21
  347. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.0.js +19 -21
  348. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.1.js +19 -21
  349. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.0.js +19 -21
  350. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.1.js +19 -21
  351. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.14.0.js +19 -21
  352. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.0.js +19 -21
  353. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.2.js +19 -21
  354. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.0.js +19 -21
  355. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.1.js +19 -21
  356. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.0.js +19 -21
  357. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.1.js +19 -21
  358. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.2.js +21 -23
  359. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.3.js +21 -23
  360. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.4.js +21 -23
  361. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.0-beta.1.js +19 -21
  362. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.2.0.js +13 -15
  363. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.0.js +13 -15
  364. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.1.js +13 -15
  365. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.2.js +13 -15
  366. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.4.js +15 -17
  367. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.0.js +15 -17
  368. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.1.js +15 -17
  369. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.0.js +15 -17
  370. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.1.js +15 -17
  371. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.6.0.js +15 -17
  372. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.0.js +15 -17
  373. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.1.js +15 -17
  374. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.0.js +17 -19
  375. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.1.js +17 -19
  376. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.2.js +19 -21
  377. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.9.1.js +19 -21
  378. package/dist/m365/spfx/commands/project/project-doctor/generic-rules.js +25 -28
  379. package/dist/m365/spfx/commands/project/project-doctor/rules/DependencyRule.js +5 -9
  380. package/dist/m365/spfx/commands/project/project-doctor/rules/FN001008_DEP_react.js +4 -8
  381. package/dist/m365/spfx/commands/project/project-doctor/rules/FN001009_DEP_react_dom.js +4 -8
  382. package/dist/m365/spfx/commands/project/project-doctor/rules/FN001022_DEP_office_ui_fabric_react.js +4 -8
  383. package/dist/m365/spfx/commands/project/project-doctor/rules/FN001035_DEP_fluentui_react.js +4 -8
  384. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002004_DEVDEP_gulp.js +2 -6
  385. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002007_DEVDEP_ajv.js +2 -6
  386. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002013_DEVDEP_types_webpack_env.js +2 -6
  387. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002015_DEVDEP_types_react.js +4 -8
  388. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002016_DEVDEP_types_react_dom.js +4 -8
  389. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js +2 -6
  390. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021001_PKG_spfx_deps_versions_match_project_version.js +5 -9
  391. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021002_PKG_spfx_deps_use_exact_version.js +5 -9
  392. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021003_PKG_spfx_deps_installed_as_deps.js +3 -7
  393. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021004_PKG_spfx_devdeps_installed_as_devdeps.js +3 -7
  394. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021005_PKG_types_installed_as_devdep.js +2 -6
  395. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021006_PKG_rush_stack_compiler_installed_as_devdep.js +2 -6
  396. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.js +3 -8
  397. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021008_PKG_no_duplicate_deps.js +3 -7
  398. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021009_PKG_no_duplicate_oui_deps.js +5 -10
  399. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021010_PKG_gulp_installed_as_devdep.js +2 -6
  400. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021011_PKG_ajv_installed_as_devdep.js +2 -6
  401. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021012_PKG_no_duplicate_pnpjs_deps.js +2 -6
  402. package/dist/m365/spfx/commands/project/project-doctor/spfx-deps.js +2 -5
  403. package/dist/m365/spfx/commands/project/project-doctor.js +115 -127
  404. package/dist/m365/spfx/commands/project/project-externalize/DefaultRules.js +4 -6
  405. package/dist/m365/spfx/commands/project/project-externalize/ExternalizeEntry.js +1 -2
  406. package/dist/m365/spfx/commands/project/project-externalize/FileEdit.js +1 -2
  407. package/dist/m365/spfx/commands/project/project-externalize/VisitationResult.js +1 -2
  408. package/dist/m365/spfx/commands/project/project-externalize/index.js +3 -19
  409. package/dist/m365/spfx/commands/project/project-externalize/rules/BasicDependencyRule.js +1 -5
  410. package/dist/m365/spfx/commands/project/project-externalize/rules/DynamicRule.js +67 -88
  411. package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +9 -11
  412. package/dist/m365/spfx/commands/project/project-externalize/rules/index.js +3 -19
  413. package/dist/m365/spfx/commands/project/project-externalize.js +48 -60
  414. package/dist/m365/spfx/commands/project/project-model/ConfigJson.js +1 -2
  415. package/dist/m365/spfx/commands/project/project-model/CopyAssetsJson.js +1 -2
  416. package/dist/m365/spfx/commands/project/project-model/DeployAzureStorageJson.js +1 -2
  417. package/dist/m365/spfx/commands/project/project-model/EsLintRcJs.js +1 -2
  418. package/dist/m365/spfx/commands/project/project-model/Gitignore.js +1 -2
  419. package/dist/m365/spfx/commands/project/project-model/GulpfileJs.js +1 -2
  420. package/dist/m365/spfx/commands/project/project-model/JsonFile.js +1 -2
  421. package/dist/m365/spfx/commands/project/project-model/Manifest.js +1 -2
  422. package/dist/m365/spfx/commands/project/project-model/Npmignore.js +1 -2
  423. package/dist/m365/spfx/commands/project/project-model/PackageJson.js +1 -2
  424. package/dist/m365/spfx/commands/project/project-model/PackageSolutionJson.js +1 -2
  425. package/dist/m365/spfx/commands/project/project-model/Project.js +1 -2
  426. package/dist/m365/spfx/commands/project/project-model/ScssFile.js +3 -7
  427. package/dist/m365/spfx/commands/project/project-model/ServeJson.js +1 -2
  428. package/dist/m365/spfx/commands/project/project-model/TsConfigJson.js +1 -2
  429. package/dist/m365/spfx/commands/project/project-model/TsFile.js +8 -11
  430. package/dist/m365/spfx/commands/project/project-model/TsLintJson.js +1 -2
  431. package/dist/m365/spfx/commands/project/project-model/VsCode.js +1 -2
  432. package/dist/m365/spfx/commands/project/project-model/VsCodeExtensionsJson.js +1 -2
  433. package/dist/m365/spfx/commands/project/project-model/VsCodeLaunchJson.js +1 -2
  434. package/dist/m365/spfx/commands/project/project-model/VsCodeSettingsJson.js +1 -2
  435. package/dist/m365/spfx/commands/project/project-model/WriteManifestsJson.js +1 -2
  436. package/dist/m365/spfx/commands/project/project-model/YoRcJson.js +1 -2
  437. package/dist/m365/spfx/commands/project/project-model/index.js +23 -39
  438. package/dist/m365/spfx/commands/project/project-permissions-grant.js +44 -57
  439. package/dist/m365/spfx/commands/project/project-rename.js +47 -60
  440. package/dist/m365/spfx/commands/project/project-upgrade/rules/DependencyRule.js +6 -10
  441. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001001_DEP_microsoft_sp_core_library.js +2 -6
  442. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001002_DEP_microsoft_sp_lodash_subset.js +2 -6
  443. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js +2 -6
  444. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001004_DEP_microsoft_sp_webpart_base.js +2 -6
  445. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001005_DEP_types_react.js +4 -8
  446. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001006_DEP_types_react_dom.js +4 -8
  447. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001007_DEP_types_webpack_env.js +2 -6
  448. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001008_DEP_react.js +4 -8
  449. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001009_DEP_react_dom.js +4 -8
  450. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001010_DEP_types_es6_promise.js +2 -6
  451. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001011_DEP_microsoft_sp_dialog.js +2 -6
  452. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001012_DEP_microsoft_sp_application_base.js +2 -6
  453. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001013_DEP_microsoft_decorators.js +2 -6
  454. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001014_DEP_microsoft_sp_listview_extensibility.js +2 -6
  455. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001015_DEP_types_react_addons_shallow_compare.js +4 -8
  456. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001016_DEP_types_react_addons_update.js +4 -8
  457. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001017_DEP_types_react_addons_update.js +4 -8
  458. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001018_DEP_microsoft_sp_client_base.js +2 -6
  459. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001019_DEP_knockout.js +4 -8
  460. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001020_DEP_types_knockout.js +4 -8
  461. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001021_DEP_microsoft_sp_property_pane.js +2 -6
  462. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +4 -8
  463. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001023_DEP_microsoft_sp_component_base.js +2 -6
  464. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001024_DEP_microsoft_sp_diagnostics.js +2 -6
  465. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001025_DEP_microsoft_sp_dynamic_data.js +2 -6
  466. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001026_DEP_microsoft_sp_extension_base.js +2 -6
  467. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001027_DEP_microsoft_sp_http.js +2 -6
  468. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001028_DEP_microsoft_sp_list_subscription.js +2 -6
  469. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001029_DEP_microsoft_sp_loader.js +2 -6
  470. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001030_DEP_microsoft_sp_module_interfaces.js +2 -6
  471. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001031_DEP_microsoft_sp_odata_types.js +2 -6
  472. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001032_DEP_microsoft_sp_page_context.js +2 -6
  473. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001033_DEP_tslib.js +2 -6
  474. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js +2 -6
  475. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001035_DEP_fluentui_react.js +4 -8
  476. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002001_DEVDEP_microsoft_sp_build_web.js +2 -6
  477. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js +2 -6
  478. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002003_DEVDEP_microsoft_sp_webpart_workbench.js +2 -6
  479. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002004_DEVDEP_gulp.js +2 -6
  480. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002005_DEVDEP_types_chai.js +2 -6
  481. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002006_DEVDEP_types_mocha.js +2 -6
  482. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002007_DEVDEP_ajv.js +2 -6
  483. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002008_DEVDEP_tslint_microsoft_contrib.js +2 -6
  484. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002009_DEVDEP_microsoft_sp_tslint_rules.js +2 -6
  485. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002010_DEVDEP_microsoft_rush_stack_compiler_2_7.js +2 -6
  486. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002011_DEVDEP_microsoft_rush_stack_compiler_2_9.js +2 -6
  487. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002012_DEVDEP_microsoft_rush_stack_compiler_3_3.js +2 -6
  488. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002013_DEVDEP_types_webpack_env.js +2 -6
  489. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002014_DEVDEP_types_es6_promise.js +2 -6
  490. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002015_DEVDEP_types_react.js +4 -8
  491. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002016_DEVDEP_types_react_dom.js +4 -8
  492. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7.js +2 -6
  493. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9.js +2 -6
  494. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002019_DEVDEP_spfx_fast_serve_helpers.js +2 -6
  495. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5.js +2 -6
  496. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js +2 -6
  497. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js +2 -6
  498. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js +2 -6
  499. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002024_DEVDEP_eslint.js +2 -6
  500. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002025_DEVDEP_eslint_plugin_react_hooks.js +4 -8
  501. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002026_DEVDEP_typescript.js +2 -6
  502. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002027_DEVDEP_fluentui_react.js +2 -6
  503. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003001_CFG_schema.js +2 -6
  504. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003002_CFG_version.js +2 -6
  505. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003003_CFG_bundles.js +2 -6
  506. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003004_CFG_entries.js +2 -6
  507. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003005_CFG_localizedResource_pathLib.js +2 -6
  508. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN004001_CFG_CA_schema.js +2 -6
  509. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN004002_CFG_CA_deployCdnPath.js +2 -6
  510. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN005001_CFG_DAS_schema.js +2 -6
  511. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN005002_CFG_DAS_workingDir.js +2 -6
  512. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006001_CFG_PS_schema.js +2 -6
  513. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006002_CFG_PS_includeClientSideAssets.js +2 -6
  514. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006003_CFG_PS_isDomainIsolated.js +2 -6
  515. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006004_CFG_PS_developer.js +2 -6
  516. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006005_CFG_PS_metadata.js +3 -8
  517. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +4 -9
  518. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007001_CFG_S_schema.js +2 -6
  519. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007002_CFG_S_initialPage.js +2 -6
  520. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007003_CFG_S_api.js +2 -6
  521. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008001_CFG_TSL_schema.js +2 -6
  522. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008002_CFG_TSL_removeRule.js +2 -6
  523. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008003_CFG_TSL_preferConst.js +2 -6
  524. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN009001_CFG_WM_schema.js +2 -6
  525. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010001_YORC_version.js +3 -8
  526. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010002_YORC_isCreatingSolution.js +3 -8
  527. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010003_YORC_packageManager.js +3 -8
  528. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010004_YORC_componentType.js +3 -8
  529. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010005_YORC_environment.js +3 -8
  530. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010006_YORC_framework.js +4 -9
  531. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010007_YORC_isDomainIsolated.js +3 -8
  532. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +4 -9
  533. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010009_YORC_sdkVersions_microsoft_graph_client.js +4 -9
  534. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010010_YORC_sdkVersions_teams_js.js +4 -9
  535. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011001_MAN_webpart_schema.js +2 -6
  536. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011002_MAN_applicationCustomizer_schema.js +2 -6
  537. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011003_MAN_listViewCommandSet_schema.js +2 -6
  538. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011004_MAN_fieldCustomizer_schema.js +2 -6
  539. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011005_MAN_webpart_defaultGroup.js +2 -6
  540. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011006_MAN_listViewCommandSet_items.js +4 -8
  541. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011007_MAN_listViewCommandSet_removeCommands.js +2 -6
  542. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011008_MAN_requiresCustomScript.js +2 -6
  543. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011009_MAN_webpart_safeWithCustomScriptDisabled.js +2 -6
  544. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011010_MAN_webpart_version.js +2 -6
  545. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011011_MAN_webpart_supportedHosts.js +2 -6
  546. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012001_TSC_module.js +2 -6
  547. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012002_TSC_moduleResolution.js +2 -6
  548. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012003_TSC_skipLibCheck.js +2 -6
  549. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012004_TSC_typeRoots_types.js +2 -6
  550. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012005_TSC_typeRoots_microsoft.js +2 -6
  551. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012006_TSC_types_es6_collections.js +2 -6
  552. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012007_TSC_lib_es5.js +2 -6
  553. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012008_TSC_lib_dom.js +2 -6
  554. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012009_TSC_lib_es2015_collection.js +2 -6
  555. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012010_TSC_experimentalDecorators.js +2 -6
  556. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012011_TSC_outDir.js +2 -6
  557. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012012_TSC_include.js +2 -6
  558. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012013_TSC_exclude.js +2 -6
  559. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012014_TSC_inlineSources.js +2 -6
  560. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012015_TSC_strictNullChecks.js +2 -6
  561. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012016_TSC_noUnusedLocals.js +2 -6
  562. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012017_TSC_extends.js +2 -6
  563. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012018_TSC_lib_es2015_promise.js +2 -6
  564. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012019_TSC_types_es6_promise.js +2 -6
  565. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012020_TSC_noImplicitAny.js +2 -6
  566. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN013001_GULP_msGridSassSuppression.js +2 -6
  567. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN013002_GULP_serveTask.js +2 -6
  568. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014001_CODE_settings_jsonSchemas.js +2 -6
  569. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014002_CODE_extensions.js +2 -6
  570. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014003_CODE_launch.js +2 -6
  571. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014004_CODE_settings_jsonSchemas_configJson_url.js +2 -6
  572. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014005_CODE_settingsfile.js +4 -8
  573. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014006_CODE_launch_sourceMapPathOverrides.js +3 -7
  574. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014007_CODE_launch_localWorkbench.js +3 -7
  575. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014008_CODE_launch_hostedWorkbench_type.js +3 -7
  576. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014009_CODE_launch_hostedWorkbench_url.js +3 -7
  577. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015001_FILE_typings_tsd_d_ts.js +2 -6
  578. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015002_FILE_typings__ms_odsp_d_ts.js +2 -6
  579. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015003_FILE_tslint_json.js +2 -6
  580. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015004_FILE_config_tslint_json.js +2 -6
  581. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015005_FILE_src_index_ts.js +2 -6
  582. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015007_FILE_config_copy_assets_json.js +2 -6
  583. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +4 -8
  584. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015009_FILE_config_sass_json.js +2 -6
  585. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016001_TS_msgraphclient_packageName.js +4 -8
  586. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016002_TS_msgraphclient_instance.js +5 -9
  587. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016003_TS_aadhttpclient_instance.js +4 -8
  588. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016004_TS_property_pane_property_import.js +4 -8
  589. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN017001_MISC_npm_dedupe.js +2 -6
  590. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018001_TEAMS_folder.js +4 -8
  591. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018002_TEAMS_manifest.js +4 -8
  592. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018003_TEAMS_tab20x20_png.js +6 -8
  593. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018004_TEAMS_tab96x96_png.js +6 -8
  594. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018005_TEAMS_deprecated_manifest.js +4 -8
  595. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN019001_TSL_rulesDirectory.js +2 -6
  596. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN019002_TSL_extends.js +2 -6
  597. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN020001_RES_types_react.js +4 -8
  598. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021001_PKG_main.js +2 -6
  599. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021002_PKG_engines.js +2 -6
  600. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +2 -6
  601. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022001_SCSS_remove_fabric_react.js +4 -8
  602. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022002_SCSS_add_fabric_react.js +4 -8
  603. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023001_GITIGNORE_release.js +2 -6
  604. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023002_GITIGNORE_heft.js +2 -6
  605. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN024001_NPMIGNORE_file.js +2 -6
  606. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025001_ESLINTRCJS_overrides.js +4 -8
  607. package/dist/m365/spfx/commands/project/project-upgrade/rules/FileAddRemoveRule.js +4 -8
  608. package/dist/m365/spfx/commands/project/project-upgrade/rules/ManifestRule.js +3 -7
  609. package/dist/m365/spfx/commands/project/project-upgrade/rules/PackageRule.js +2 -6
  610. package/dist/m365/spfx/commands/project/project-upgrade/rules/ResolutionRule.js +2 -6
  611. package/dist/m365/spfx/commands/project/project-upgrade/rules/ScssRule.js +3 -7
  612. package/dist/m365/spfx/commands/project/project-upgrade/rules/TsRule.js +3 -7
  613. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.0.1.js +5 -7
  614. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.0.2.js +9 -11
  615. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.1.0.js +57 -59
  616. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.1.1.js +15 -17
  617. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.1.3.js +9 -11
  618. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.10.0.js +57 -59
  619. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.11.0.js +71 -73
  620. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.0.js +87 -89
  621. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.1.js +55 -57
  622. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.0.js +79 -81
  623. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.1.js +49 -51
  624. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0.js +57 -59
  625. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.0.js +82 -84
  626. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +61 -63
  627. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.0.js +73 -75
  628. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.1.js +53 -55
  629. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.0.js +63 -65
  630. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.1.js +51 -53
  631. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.2.js +57 -59
  632. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.3.js +55 -57
  633. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.4.js +51 -53
  634. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.0-beta.1.js +57 -59
  635. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.2.0.js +69 -71
  636. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.0.js +39 -41
  637. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.1.js +3 -5
  638. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.2.js +3 -5
  639. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.4.js +45 -47
  640. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.4.0.js +73 -75
  641. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.4.1.js +41 -43
  642. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.5.0.js +83 -85
  643. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.5.1.js +43 -45
  644. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.6.0.js +63 -65
  645. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.7.0.js +71 -73
  646. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.7.1.js +53 -55
  647. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.8.0.js +73 -75
  648. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.8.1.js +49 -51
  649. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.8.2.js +63 -65
  650. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.9.1.js +71 -73
  651. package/dist/m365/spfx/commands/project/project-upgrade.js +198 -210
  652. package/dist/m365/spfx/commands/project/report-model/Finding.js +1 -2
  653. package/dist/m365/spfx/commands/project/report-model/FindingToReport.js +1 -2
  654. package/dist/m365/spfx/commands/project/report-model/FindingTour.js +1 -2
  655. package/dist/m365/spfx/commands/project/report-model/FindingTourStep.js +1 -2
  656. package/dist/m365/spfx/commands/project/report-model/Occurrence.js +1 -2
  657. package/dist/m365/spfx/commands/project/report-model/ReportData.js +1 -2
  658. package/dist/m365/spfx/commands/project/report-model/index.js +5 -21
  659. package/dist/m365/spfx/commands/spfx-doctor.js +184 -228
  660. package/dist/m365/spfx/commands.js +1 -3
  661. package/dist/m365/spo/ClientSideComponent.js +1 -2
  662. package/dist/m365/spo/StandardWebPartTypes.js +1 -5
  663. package/dist/m365/spo/base-permissions.js +3 -7
  664. package/dist/m365/spo/commands/app/AppMetadata.js +1 -2
  665. package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +4 -8
  666. package/dist/m365/spo/commands/app/app-add.js +43 -56
  667. package/dist/m365/spo/commands/app/app-deploy.js +47 -60
  668. package/dist/m365/spo/commands/app/app-get.js +42 -55
  669. package/dist/m365/spo/commands/app/app-install.js +28 -41
  670. package/dist/m365/spo/commands/app/app-instance-list.js +33 -46
  671. package/dist/m365/spo/commands/app/app-list.js +31 -44
  672. package/dist/m365/spo/commands/app/app-remove.js +46 -59
  673. package/dist/m365/spo/commands/app/app-retract.js +46 -59
  674. package/dist/m365/spo/commands/app/app-teamspackage-download.js +99 -117
  675. package/dist/m365/spo/commands/app/app-uninstall.js +43 -56
  676. package/dist/m365/spo/commands/app/app-upgrade.js +28 -41
  677. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +34 -47
  678. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +61 -76
  679. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +16 -29
  680. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +66 -83
  681. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +70 -87
  682. package/dist/m365/spo/commands/apppage/apppage-add.js +45 -58
  683. package/dist/m365/spo/commands/apppage/apppage-set.js +27 -40
  684. package/dist/m365/spo/commands/cdn/cdn-get.js +43 -56
  685. package/dist/m365/spo/commands/cdn/cdn-origin-add.js +38 -51
  686. package/dist/m365/spo/commands/cdn/cdn-origin-list.js +41 -54
  687. package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +54 -67
  688. package/dist/m365/spo/commands/cdn/cdn-policy-list.js +49 -62
  689. package/dist/m365/spo/commands/cdn/cdn-policy-set.js +45 -58
  690. package/dist/m365/spo/commands/cdn/cdn-set.js +71 -84
  691. package/dist/m365/spo/commands/commandset/commandset-add.js +44 -57
  692. package/dist/m365/spo/commands/commandset/commandset-get.js +49 -62
  693. package/dist/m365/spo/commands/commandset/commandset-list.js +20 -33
  694. package/dist/m365/spo/commands/commandset/commandset-remove.js +70 -87
  695. package/dist/m365/spo/commands/commandset/commandset-set.js +71 -86
  696. package/dist/m365/spo/commands/contenttype/FieldLink.js +1 -2
  697. package/dist/m365/spo/commands/contenttype/contenttype-add.js +122 -143
  698. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +126 -143
  699. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +193 -215
  700. package/dist/m365/spo/commands/contenttype/contenttype-get.js +57 -70
  701. package/dist/m365/spo/commands/contenttype/contenttype-list.js +20 -33
  702. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +69 -82
  703. package/dist/m365/spo/commands/contenttype/contenttype-set.js +123 -148
  704. package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +35 -48
  705. package/dist/m365/spo/commands/customaction/customaction-add.js +57 -70
  706. package/dist/m365/spo/commands/customaction/customaction-clear.js +42 -57
  707. package/dist/m365/spo/commands/customaction/customaction-get.js +67 -82
  708. package/dist/m365/spo/commands/customaction/customaction-list.js +30 -43
  709. package/dist/m365/spo/commands/customaction/customaction-remove.js +75 -94
  710. package/dist/m365/spo/commands/customaction/customaction-set.js +59 -76
  711. package/dist/m365/spo/commands/customaction/customaction.js +1 -2
  712. package/dist/m365/spo/commands/eventreceiver/EventReceiver.js +1 -2
  713. package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +63 -78
  714. package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +39 -52
  715. package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +71 -88
  716. package/dist/m365/spo/commands/externaluser/ExternalUser.js +1 -2
  717. package/dist/m365/spo/commands/externaluser/ExternalUserCollection.js +1 -2
  718. package/dist/m365/spo/commands/externaluser/GetExternalUsersResults.js +1 -2
  719. package/dist/m365/spo/commands/externaluser/externaluser-list.js +62 -75
  720. package/dist/m365/spo/commands/feature/Feature.js +1 -2
  721. package/dist/m365/spo/commands/feature/feature-disable.js +32 -45
  722. package/dist/m365/spo/commands/feature/feature-enable.js +34 -47
  723. package/dist/m365/spo/commands/feature/feature-list.js +24 -37
  724. package/dist/m365/spo/commands/field/field-add.js +46 -59
  725. package/dist/m365/spo/commands/field/field-get.js +47 -60
  726. package/dist/m365/spo/commands/field/field-list.js +32 -45
  727. package/dist/m365/spo/commands/field/field-remove.js +91 -104
  728. package/dist/m365/spo/commands/field/field-set.js +74 -87
  729. package/dist/m365/spo/commands/file/FileProperties.js +1 -2
  730. package/dist/m365/spo/commands/file/FilePropertiesCollection.js +2 -0
  731. package/dist/m365/spo/commands/file/FileSharingPrincipalType.js +2 -5
  732. package/dist/m365/spo/commands/file/file-add.js +313 -338
  733. package/dist/m365/spo/commands/file/file-checkin.js +48 -61
  734. package/dist/m365/spo/commands/file/file-checkout-undo.js +52 -65
  735. package/dist/m365/spo/commands/file/file-checkout.js +35 -48
  736. package/dist/m365/spo/commands/file/file-copy.js +84 -65
  737. package/dist/m365/spo/commands/file/file-get.js +85 -98
  738. package/dist/m365/spo/commands/file/file-list.js +92 -109
  739. package/dist/m365/spo/commands/file/file-move.js +101 -116
  740. package/dist/m365/spo/commands/file/file-remove.js +63 -76
  741. package/dist/m365/spo/commands/file/file-rename.js +62 -79
  742. package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +68 -85
  743. package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +68 -85
  744. package/dist/m365/spo/commands/file/file-roleassignment-add.js +99 -122
  745. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +94 -113
  746. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +62 -77
  747. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +61 -76
  748. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +78 -93
  749. package/dist/m365/spo/commands/file/file-sharinglink-add.js +37 -50
  750. package/dist/m365/spo/commands/file/file-sharinglink-clear.js +59 -74
  751. package/dist/m365/spo/commands/file/file-sharinglink-get.js +31 -44
  752. package/dist/m365/spo/commands/file/file-sharinglink-list.js +39 -52
  753. package/dist/m365/spo/commands/file/file-sharinglink-remove.js +44 -57
  754. package/dist/m365/spo/commands/file/file-sharinglink-set.js +36 -49
  755. package/dist/m365/spo/commands/file/file-version-clear.js +51 -66
  756. package/dist/m365/spo/commands/file/file-version-get.js +42 -57
  757. package/dist/m365/spo/commands/file/file-version-list.js +31 -44
  758. package/dist/m365/spo/commands/file/file-version-remove.js +51 -66
  759. package/dist/m365/spo/commands/file/file-version-restore.js +51 -66
  760. package/dist/m365/spo/commands/folder/FileFolderCollection.js +2 -0
  761. package/dist/m365/spo/commands/folder/FolderProperties.js +1 -2
  762. package/dist/m365/spo/commands/folder/folder-add.js +31 -46
  763. package/dist/m365/spo/commands/folder/folder-copy.js +55 -68
  764. package/dist/m365/spo/commands/folder/folder-get.js +53 -66
  765. package/dist/m365/spo/commands/folder/folder-list.js +64 -79
  766. package/dist/m365/spo/commands/folder/folder-move.js +57 -70
  767. package/dist/m365/spo/commands/folder/folder-remove.js +55 -67
  768. package/dist/m365/spo/commands/folder/folder-rename.js +34 -51
  769. package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +69 -84
  770. package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +83 -100
  771. package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +111 -134
  772. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +82 -101
  773. package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +47 -60
  774. package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +46 -59
  775. package/dist/m365/spo/commands/group/AssociatedGroupPropertiesCollection.js +1 -2
  776. package/dist/m365/spo/commands/group/GroupProperties.js +1 -2
  777. package/dist/m365/spo/commands/group/SharingResult.js +1 -2
  778. package/dist/m365/spo/commands/group/group-add.js +33 -46
  779. package/dist/m365/spo/commands/group/group-get.js +49 -62
  780. package/dist/m365/spo/commands/group/group-list.js +44 -62
  781. package/dist/m365/spo/commands/group/group-member-add.js +95 -113
  782. package/dist/m365/spo/commands/group/group-member-list.js +25 -38
  783. package/dist/m365/spo/commands/group/group-member-remove.js +107 -126
  784. package/dist/m365/spo/commands/group/group-remove.js +54 -67
  785. package/dist/m365/spo/commands/group/group-set.js +71 -88
  786. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +25 -38
  787. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +27 -40
  788. package/dist/m365/spo/commands/homesite/homesite-get.js +24 -37
  789. package/dist/m365/spo/commands/homesite/homesite-remove.js +45 -58
  790. package/dist/m365/spo/commands/homesite/homesite-set.js +37 -50
  791. package/dist/m365/spo/commands/hubsite/AssociatedSite.js +1 -2
  792. package/dist/m365/spo/commands/hubsite/HubSite.js +1 -2
  793. package/dist/m365/spo/commands/hubsite/HubSiteProperties.js +1 -2
  794. package/dist/m365/spo/commands/hubsite/QueryListResult.js +1 -2
  795. package/dist/m365/spo/commands/hubsite/hubsite-connect.js +46 -61
  796. package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +31 -44
  797. package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +78 -93
  798. package/dist/m365/spo/commands/hubsite/hubsite-get.js +73 -92
  799. package/dist/m365/spo/commands/hubsite/hubsite-list.js +71 -86
  800. package/dist/m365/spo/commands/hubsite/hubsite-register.js +26 -39
  801. package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +40 -53
  802. package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +52 -65
  803. package/dist/m365/spo/commands/hubsite/hubsite-set.js +45 -58
  804. package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +42 -55
  805. package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +32 -45
  806. package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +49 -62
  807. package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +34 -47
  808. package/dist/m365/spo/commands/list/DraftVisibilityType.js +2 -5
  809. package/dist/m365/spo/commands/list/ListExperience.js +2 -5
  810. package/dist/m365/spo/commands/list/ListInstance.js +1 -2
  811. package/dist/m365/spo/commands/list/ListPrincipalType.js +2 -5
  812. package/dist/m365/spo/commands/list/ListTemplateType.js +2 -5
  813. package/dist/m365/spo/commands/list/list-add.js +48 -61
  814. package/dist/m365/spo/commands/list/list-contenttype-add.js +47 -60
  815. package/dist/m365/spo/commands/list/list-contenttype-default-set.js +112 -131
  816. package/dist/m365/spo/commands/list/list-contenttype-list.js +36 -49
  817. package/dist/m365/spo/commands/list/list-contenttype-remove.js +59 -72
  818. package/dist/m365/spo/commands/list/list-get.js +56 -69
  819. package/dist/m365/spo/commands/list/list-list.js +26 -39
  820. package/dist/m365/spo/commands/list/list-remove.js +53 -66
  821. package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +48 -83
  822. package/dist/m365/spo/commands/list/list-retentionlabel-get.js +58 -71
  823. package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +72 -89
  824. package/dist/m365/spo/commands/list/list-roleassignment-add.js +62 -79
  825. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +92 -111
  826. package/dist/m365/spo/commands/list/list-roleinheritance-break.js +60 -74
  827. package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +56 -70
  828. package/dist/m365/spo/commands/list/list-sensitivitylabel-ensure.js +59 -74
  829. package/dist/m365/spo/commands/list/list-set.js +59 -72
  830. package/dist/m365/spo/commands/list/list-sitescript-get.js +60 -73
  831. package/dist/m365/spo/commands/list/list-view-add.js +43 -56
  832. package/dist/m365/spo/commands/list/list-view-field-add.js +77 -92
  833. package/dist/m365/spo/commands/list/list-view-field-remove.js +74 -89
  834. package/dist/m365/spo/commands/list/list-view-field-set.js +58 -73
  835. package/dist/m365/spo/commands/list/list-view-get.js +42 -55
  836. package/dist/m365/spo/commands/list/list-view-list.js +32 -45
  837. package/dist/m365/spo/commands/list/list-view-remove.js +62 -75
  838. package/dist/m365/spo/commands/list/list-view-set.js +45 -58
  839. package/dist/m365/spo/commands/list/list-webhook-add.js +55 -68
  840. package/dist/m365/spo/commands/list/list-webhook-get.js +46 -59
  841. package/dist/m365/spo/commands/list/list-webhook-list.js +42 -55
  842. package/dist/m365/spo/commands/list/list-webhook-remove.js +60 -73
  843. package/dist/m365/spo/commands/list/list-webhook-set.js +49 -62
  844. package/dist/m365/spo/commands/listitem/ListItemFieldValueResult.js +1 -2
  845. package/dist/m365/spo/commands/listitem/ListItemInstance.js +1 -2
  846. package/dist/m365/spo/commands/listitem/ListItemInstanceCollection.js +1 -2
  847. package/dist/m365/spo/commands/listitem/ListItemRetentionLabel.js +1 -2
  848. package/dist/m365/spo/commands/listitem/SiteRetentionLabel.js +1 -2
  849. package/dist/m365/spo/commands/listitem/listitem-add.js +120 -132
  850. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +44 -57
  851. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +68 -107
  852. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +131 -177
  853. package/dist/m365/spo/commands/listitem/listitem-get.js +59 -72
  854. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +79 -92
  855. package/dist/m365/spo/commands/listitem/listitem-list.js +127 -147
  856. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +62 -75
  857. package/dist/m365/spo/commands/listitem/listitem-record-lock.js +48 -61
  858. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +55 -68
  859. package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +48 -61
  860. package/dist/m365/spo/commands/listitem/listitem-remove.js +64 -77
  861. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +102 -121
  862. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +63 -78
  863. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +97 -118
  864. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +93 -114
  865. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +59 -75
  866. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +56 -72
  867. package/dist/m365/spo/commands/listitem/listitem-set.js +169 -183
  868. package/dist/m365/spo/commands/mail/mail-send.js +54 -67
  869. package/dist/m365/spo/commands/navigation/NavigationNode.js +1 -2
  870. package/dist/m365/spo/commands/navigation/navigation-node-add.js +50 -64
  871. package/dist/m365/spo/commands/navigation/navigation-node-get.js +28 -41
  872. package/dist/m365/spo/commands/navigation/navigation-node-list.js +21 -34
  873. package/dist/m365/spo/commands/navigation/navigation-node-remove.js +44 -59
  874. package/dist/m365/spo/commands/navigation/navigation-node-set.js +57 -70
  875. package/dist/m365/spo/commands/orgassetslibrary/OrgAssets.js +1 -2
  876. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +37 -50
  877. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +45 -58
  878. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +45 -60
  879. package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +31 -44
  880. package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +46 -61
  881. package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +31 -44
  882. package/dist/m365/spo/commands/page/ClientSideControl.js +1 -2
  883. package/dist/m365/spo/commands/page/ClientSidePageProperties.js +1 -2
  884. package/dist/m365/spo/commands/page/Page.js +47 -72
  885. package/dist/m365/spo/commands/page/PageControl.js +1 -2
  886. package/dist/m365/spo/commands/page/PageHeader.js +1 -2
  887. package/dist/m365/spo/commands/page/PageItem.js +1 -2
  888. package/dist/m365/spo/commands/page/PageTemplate.js +1 -2
  889. package/dist/m365/spo/commands/page/canvasContent.js +1 -2
  890. package/dist/m365/spo/commands/page/clientsidepages.js +9 -19
  891. package/dist/m365/spo/commands/page/page-add.js +197 -212
  892. package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +249 -264
  893. package/dist/m365/spo/commands/page/page-column-get.js +32 -45
  894. package/dist/m365/spo/commands/page/page-column-list.js +27 -40
  895. package/dist/m365/spo/commands/page/page-control-get.js +48 -60
  896. package/dist/m365/spo/commands/page/page-control-list.js +42 -54
  897. package/dist/m365/spo/commands/page/page-control-set.js +115 -120
  898. package/dist/m365/spo/commands/page/page-copy.js +58 -71
  899. package/dist/m365/spo/commands/page/page-get.js +51 -64
  900. package/dist/m365/spo/commands/page/page-header-set.js +243 -256
  901. package/dist/m365/spo/commands/page/page-list.js +35 -45
  902. package/dist/m365/spo/commands/page/page-remove.js +51 -66
  903. package/dist/m365/spo/commands/page/page-section-add.js +73 -86
  904. package/dist/m365/spo/commands/page/page-section-get.js +23 -36
  905. package/dist/m365/spo/commands/page/page-section-list.js +30 -43
  906. package/dist/m365/spo/commands/page/page-set.js +240 -255
  907. package/dist/m365/spo/commands/page/page-template-list.js +24 -37
  908. package/dist/m365/spo/commands/page/page-text-add.js +61 -74
  909. package/dist/m365/spo/commands/page/pageMethods.js +1 -5
  910. package/dist/m365/spo/commands/propertybag/propertybag-base.js +18 -22
  911. package/dist/m365/spo/commands/propertybag/propertybag-get.js +30 -43
  912. package/dist/m365/spo/commands/propertybag/propertybag-list.js +24 -37
  913. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +42 -55
  914. package/dist/m365/spo/commands/propertybag/propertybag-set.js +30 -43
  915. package/dist/m365/spo/commands/report/report-activityfilecounts.js +5 -7
  916. package/dist/m365/spo/commands/report/report-activitypages.js +5 -7
  917. package/dist/m365/spo/commands/report/report-activityusercounts.js +5 -7
  918. package/dist/m365/spo/commands/report/report-activityuserdetail.js +5 -7
  919. package/dist/m365/spo/commands/report/report-siteusagedetail.js +5 -7
  920. package/dist/m365/spo/commands/report/report-siteusagefilecounts.js +5 -7
  921. package/dist/m365/spo/commands/report/report-siteusagepages.js +5 -7
  922. package/dist/m365/spo/commands/report/report-siteusagesitecounts.js +5 -7
  923. package/dist/m365/spo/commands/report/report-siteusagestorage.js +5 -7
  924. package/dist/m365/spo/commands/roledefinition/RoleDefinition.js +1 -2
  925. package/dist/m365/spo/commands/roledefinition/RoleType.js +2 -5
  926. package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -58
  927. package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +35 -48
  928. package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +21 -34
  929. package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +45 -60
  930. package/dist/m365/spo/commands/search/datatypes/QueryResult.js +1 -2
  931. package/dist/m365/spo/commands/search/datatypes/RefinementResult.js +1 -2
  932. package/dist/m365/spo/commands/search/datatypes/RelevantResults.js +1 -2
  933. package/dist/m365/spo/commands/search/datatypes/ResultTable.js +1 -2
  934. package/dist/m365/spo/commands/search/datatypes/ResultTableRow.js +1 -2
  935. package/dist/m365/spo/commands/search/datatypes/SearchResult.js +1 -2
  936. package/dist/m365/spo/commands/search/datatypes/SearchResultProperty.js +1 -2
  937. package/dist/m365/spo/commands/search/datatypes/SpecialTermResult.js +1 -2
  938. package/dist/m365/spo/commands/serviceprincipal/SPOWebAppServicePrincipalPermissionGrant.js +1 -2
  939. package/dist/m365/spo/commands/serviceprincipal/SPOWebAppServicePrincipalPermissionRequest.js +1 -2
  940. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +37 -50
  941. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +40 -53
  942. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +32 -45
  943. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +68 -85
  944. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +36 -49
  945. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +78 -95
  946. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +51 -64
  947. package/dist/m365/spo/commands/site/DeletedSiteProperties.js +1 -2
  948. package/dist/m365/spo/commands/site/SPOSitePropertiesEnumerable.js +1 -2
  949. package/dist/m365/spo/commands/site/SharingCapabilities.js +2 -5
  950. package/dist/m365/spo/commands/site/SiteProperties.js +1 -2
  951. package/dist/m365/spo/commands/site/site-add.js +196 -213
  952. package/dist/m365/spo/commands/site/site-appcatalog-add.js +38 -51
  953. package/dist/m365/spo/commands/site/site-appcatalog-list.js +18 -31
  954. package/dist/m365/spo/commands/site/site-appcatalog-remove.js +38 -51
  955. package/dist/m365/spo/commands/site/site-apppermission-add.js +30 -43
  956. package/dist/m365/spo/commands/site/site-apppermission-get.js +27 -40
  957. package/dist/m365/spo/commands/site/site-apppermission-list.js +26 -39
  958. package/dist/m365/spo/commands/site/site-apppermission-remove.js +42 -55
  959. package/dist/m365/spo/commands/site/site-apppermission-set.js +34 -47
  960. package/dist/m365/spo/commands/site/site-chrome-set.js +58 -71
  961. package/dist/m365/spo/commands/site/site-commsite-enable.js +30 -43
  962. package/dist/m365/spo/commands/site/site-ensure.js +132 -151
  963. package/dist/m365/spo/commands/site/site-get.js +23 -36
  964. package/dist/m365/spo/commands/site/site-groupify.js +41 -54
  965. package/dist/m365/spo/commands/site/site-hubsite-connect.js +29 -42
  966. package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +42 -55
  967. package/dist/m365/spo/commands/site/site-hubsite-theme-sync.js +24 -37
  968. package/dist/m365/spo/commands/site/site-inplacerecordsmanagement-set.js +31 -44
  969. package/dist/m365/spo/commands/site/site-list.js +30 -43
  970. package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +51 -66
  971. package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +35 -48
  972. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +49 -64
  973. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +46 -61
  974. package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +42 -55
  975. package/dist/m365/spo/commands/site/site-remove.js +93 -106
  976. package/dist/m365/spo/commands/site/site-rename.js +72 -87
  977. package/dist/m365/spo/commands/site/site-set.js +87 -100
  978. package/dist/m365/spo/commands/sitedesign/SiteDesign.js +1 -2
  979. package/dist/m365/spo/commands/sitedesign/SiteDesignPrincipal.js +1 -2
  980. package/dist/m365/spo/commands/sitedesign/SiteDesignRun.js +1 -2
  981. package/dist/m365/spo/commands/sitedesign/SiteDesignTask.js +1 -2
  982. package/dist/m365/spo/commands/sitedesign/SiteScriptActionStatus.js +1 -2
  983. package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +49 -62
  984. package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +37 -50
  985. package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +31 -44
  986. package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +23 -36
  987. package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +45 -58
  988. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +35 -48
  989. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +34 -47
  990. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +48 -61
  991. package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +36 -49
  992. package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +31 -44
  993. package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +59 -72
  994. package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +31 -44
  995. package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +23 -36
  996. package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +44 -59
  997. package/dist/m365/spo/commands/sitescript/sitescript-add.js +30 -43
  998. package/dist/m365/spo/commands/sitescript/sitescript-get.js +31 -44
  999. package/dist/m365/spo/commands/sitescript/sitescript-list.js +26 -39
  1000. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +45 -60
  1001. package/dist/m365/spo/commands/sitescript/sitescript-set.js +44 -57
  1002. package/dist/m365/spo/commands/spo-get.js +11 -24
  1003. package/dist/m365/spo/commands/spo-search.js +62 -77
  1004. package/dist/m365/spo/commands/spo-set.js +16 -29
  1005. package/dist/m365/spo/commands/storageentity/TenantProperty.js +1 -2
  1006. package/dist/m365/spo/commands/storageentity/storageentity-get.js +33 -46
  1007. package/dist/m365/spo/commands/storageentity/storageentity-list.js +44 -57
  1008. package/dist/m365/spo/commands/storageentity/storageentity-remove.js +49 -64
  1009. package/dist/m365/spo/commands/storageentity/storageentity-set.js +38 -51
  1010. package/dist/m365/spo/commands/tenant/DeletedSiteProperties.js +1 -2
  1011. package/dist/m365/spo/commands/tenant/DeletedSitePropertiesEnumerable.js +1 -2
  1012. package/dist/m365/spo/commands/tenant/Solution.js +1 -2
  1013. package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +72 -88
  1014. package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +27 -40
  1015. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +109 -130
  1016. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +47 -60
  1017. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +23 -36
  1018. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +75 -92
  1019. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +141 -162
  1020. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +109 -130
  1021. package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +50 -63
  1022. package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +26 -39
  1023. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +76 -93
  1024. package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +99 -199
  1025. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +35 -48
  1026. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +67 -82
  1027. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +28 -41
  1028. package/dist/m365/spo/commands/tenant/tenant-settings-list.js +53 -66
  1029. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +63 -76
  1030. package/dist/m365/spo/commands/term/Term.js +1 -2
  1031. package/dist/m365/spo/commands/term/TermCollection.js +1 -2
  1032. package/dist/m365/spo/commands/term/TermGroup.js +1 -2
  1033. package/dist/m365/spo/commands/term/TermGroupCollection.js +1 -2
  1034. package/dist/m365/spo/commands/term/TermSet.js +1 -2
  1035. package/dist/m365/spo/commands/term/TermSetCollection.js +1 -2
  1036. package/dist/m365/spo/commands/term/TermStore.js +1 -2
  1037. package/dist/m365/spo/commands/term/term-add.js +101 -114
  1038. package/dist/m365/spo/commands/term/term-get.js +74 -89
  1039. package/dist/m365/spo/commands/term/term-group-add.js +76 -89
  1040. package/dist/m365/spo/commands/term/term-group-get.js +44 -57
  1041. package/dist/m365/spo/commands/term/term-group-list.js +43 -56
  1042. package/dist/m365/spo/commands/term/term-list.js +93 -110
  1043. package/dist/m365/spo/commands/term/term-set-add.js +87 -100
  1044. package/dist/m365/spo/commands/term/term-set-get.js +46 -59
  1045. package/dist/m365/spo/commands/term/term-set-list.js +47 -60
  1046. package/dist/m365/spo/commands/theme/theme-apply.js +63 -76
  1047. package/dist/m365/spo/commands/theme/theme-get.js +34 -47
  1048. package/dist/m365/spo/commands/theme/theme-list.js +31 -44
  1049. package/dist/m365/spo/commands/theme/theme-remove.js +42 -55
  1050. package/dist/m365/spo/commands/theme/theme-set.js +40 -53
  1051. package/dist/m365/spo/commands/user/user-ensure.js +40 -55
  1052. package/dist/m365/spo/commands/user/user-get.js +40 -53
  1053. package/dist/m365/spo/commands/user/user-list.js +29 -42
  1054. package/dist/m365/spo/commands/user/user-remove.js +50 -63
  1055. package/dist/m365/spo/commands/userprofile/userprofile-get.js +32 -45
  1056. package/dist/m365/spo/commands/userprofile/userprofile-set.js +37 -50
  1057. package/dist/m365/spo/commands/web/GetClientSideWebPartsRsp.js +1 -2
  1058. package/dist/m365/spo/commands/web/WebProperties.js +1 -2
  1059. package/dist/m365/spo/commands/web/WebPropertiesCollection.js +1 -2
  1060. package/dist/m365/spo/commands/web/web-add.js +80 -93
  1061. package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +35 -48
  1062. package/dist/m365/spo/commands/web/web-get.js +35 -48
  1063. package/dist/m365/spo/commands/web/web-installedlanguage-list.js +26 -39
  1064. package/dist/m365/spo/commands/web/web-list.js +23 -36
  1065. package/dist/m365/spo/commands/web/web-reindex.js +55 -68
  1066. package/dist/m365/spo/commands/web/web-remove.js +41 -54
  1067. package/dist/m365/spo/commands/web/web-retentionlabel-list.js +21 -34
  1068. package/dist/m365/spo/commands/web/web-roleassignment-add.js +36 -49
  1069. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +47 -60
  1070. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +42 -55
  1071. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +43 -56
  1072. package/dist/m365/spo/commands/web/web-set.js +71 -84
  1073. package/dist/m365/spo/commands.js +1 -3
  1074. package/dist/m365/teams/Tab.js +2 -0
  1075. package/dist/m365/teams/TeamsAppInstallation.js +2 -0
  1076. package/dist/m365/teams/commands/app/app-install.js +62 -78
  1077. package/dist/m365/teams/commands/app/app-list.js +19 -32
  1078. package/dist/m365/teams/commands/app/app-publish.js +30 -43
  1079. package/dist/m365/teams/commands/app/app-remove.js +41 -54
  1080. package/dist/m365/teams/commands/app/app-uninstall.js +40 -53
  1081. package/dist/m365/teams/commands/app/app-update.js +49 -64
  1082. package/dist/m365/teams/commands/cache/cache-remove.js +99 -117
  1083. package/dist/m365/teams/commands/channel/channel-add.js +65 -82
  1084. package/dist/m365/teams/commands/channel/channel-get.js +60 -77
  1085. package/dist/m365/teams/commands/channel/channel-list.js +32 -47
  1086. package/dist/m365/teams/commands/channel/channel-member-add.js +100 -123
  1087. package/dist/m365/teams/commands/channel/channel-member-list.js +58 -75
  1088. package/dist/m365/teams/commands/channel/channel-member-remove.js +107 -131
  1089. package/dist/m365/teams/commands/channel/channel-member-set.js +86 -108
  1090. package/dist/m365/teams/commands/channel/channel-remove.js +75 -92
  1091. package/dist/m365/teams/commands/channel/channel-set.js +59 -76
  1092. package/dist/m365/teams/commands/chat/chat-get.js +68 -89
  1093. package/dist/m365/teams/commands/chat/chat-list.js +31 -44
  1094. package/dist/m365/teams/commands/chat/chat-member-add.js +36 -49
  1095. package/dist/m365/teams/commands/chat/chat-member-list.js +19 -32
  1096. package/dist/m365/teams/commands/chat/chat-member-remove.js +62 -77
  1097. package/dist/m365/teams/commands/chat/chat-message-list.js +35 -48
  1098. package/dist/m365/teams/commands/chat/chat-message-send.js +96 -120
  1099. package/dist/m365/teams/commands/chat/chatUtil.js +19 -35
  1100. package/dist/m365/teams/commands/funsettings/funsettings-list.js +29 -42
  1101. package/dist/m365/teams/commands/funsettings/funsettings-set.js +38 -51
  1102. package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +26 -39
  1103. package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +32 -45
  1104. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +52 -67
  1105. package/dist/m365/teams/commands/meeting/meeting-get.js +60 -75
  1106. package/dist/m365/teams/commands/meeting/meeting-list.js +119 -82
  1107. package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +48 -61
  1108. package/dist/m365/teams/commands/membersettings/membersettings-list.js +26 -39
  1109. package/dist/m365/teams/commands/membersettings/membersettings-set.js +32 -45
  1110. package/dist/m365/teams/commands/message/message-get.js +26 -39
  1111. package/dist/m365/teams/commands/message/message-list.js +27 -40
  1112. package/dist/m365/teams/commands/message/message-reply-list.js +24 -37
  1113. package/dist/m365/teams/commands/message/message-send.js +32 -45
  1114. package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +26 -39
  1115. package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +32 -45
  1116. package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +5 -7
  1117. package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +5 -7
  1118. package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +5 -7
  1119. package/dist/m365/teams/commands/report/report-directroutingcalls.js +28 -41
  1120. package/dist/m365/teams/commands/report/report-pstncalls.js +28 -41
  1121. package/dist/m365/teams/commands/report/report-useractivitycounts.js +5 -7
  1122. package/dist/m365/teams/commands/report/report-useractivityusercounts.js +5 -7
  1123. package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +5 -7
  1124. package/dist/m365/teams/commands/tab/tab-add.js +30 -43
  1125. package/dist/m365/teams/commands/tab/tab-get.js +72 -91
  1126. package/dist/m365/teams/commands/tab/tab-list.js +24 -37
  1127. package/dist/m365/teams/commands/tab/tab-remove.js +42 -55
  1128. package/dist/m365/teams/commands/team/team-add.js +85 -102
  1129. package/dist/m365/teams/commands/team/team-app-list.js +46 -61
  1130. package/dist/m365/teams/commands/team/team-archive.js +41 -56
  1131. package/dist/m365/teams/commands/team/team-clone.js +41 -54
  1132. package/dist/m365/teams/commands/team/team-get.js +37 -52
  1133. package/dist/m365/teams/commands/team/team-list.js +46 -61
  1134. package/dist/m365/teams/commands/team/team-remove.js +50 -65
  1135. package/dist/m365/teams/commands/team/team-set.js +27 -40
  1136. package/dist/m365/teams/commands/team/team-unarchive.js +38 -53
  1137. package/dist/m365/teams/commands/user/user-app-add.js +29 -42
  1138. package/dist/m365/teams/commands/user/user-app-list.js +51 -66
  1139. package/dist/m365/teams/commands/user/user-app-remove.js +40 -53
  1140. package/dist/m365/teams/commands/user/user-list.js +37 -54
  1141. package/dist/m365/teams/commands.js +1 -3
  1142. package/dist/m365/tenant/commands/id/id-get.js +33 -46
  1143. package/dist/m365/tenant/commands/report/report-activeusercounts.js +5 -7
  1144. package/dist/m365/tenant/commands/report/report-activeuserdetail.js +5 -7
  1145. package/dist/m365/tenant/commands/report/report-office365activationcounts.js +31 -46
  1146. package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +31 -46
  1147. package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +31 -46
  1148. package/dist/m365/tenant/commands/report/report-servicesusercounts.js +5 -7
  1149. package/dist/m365/tenant/commands/security/security-alerts-list.js +43 -58
  1150. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +15 -28
  1151. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +28 -43
  1152. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +22 -35
  1153. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +19 -32
  1154. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +26 -39
  1155. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +19 -32
  1156. package/dist/m365/tenant/commands.js +1 -3
  1157. package/dist/m365/todo/ToDoList.js +1 -2
  1158. package/dist/m365/todo/ToDoTask.js +1 -2
  1159. package/dist/m365/todo/commands/list/list-add.js +26 -39
  1160. package/dist/m365/todo/commands/list/list-get.js +33 -48
  1161. package/dist/m365/todo/commands/list/list-list.js +14 -27
  1162. package/dist/m365/todo/commands/list/list-remove.js +46 -63
  1163. package/dist/m365/todo/commands/list/list-set.js +40 -55
  1164. package/dist/m365/todo/commands/task/task-add.js +63 -80
  1165. package/dist/m365/todo/commands/task/task-get.js +44 -59
  1166. package/dist/m365/todo/commands/task/task-list.js +30 -43
  1167. package/dist/m365/todo/commands/task/task-remove.js +53 -66
  1168. package/dist/m365/todo/commands/task/task-set.js +36 -50
  1169. package/dist/m365/todo/commands.js +1 -3
  1170. package/dist/m365/util/commands/accesstoken/accesstoken-get.js +24 -37
  1171. package/dist/m365/util/commands.js +1 -3
  1172. package/dist/m365/viva/commands/connections/connections-app-create.js +117 -130
  1173. package/dist/m365/viva/commands.js +1 -3
  1174. package/dist/m365/yammer/commands/group/group-list.js +45 -60
  1175. package/dist/m365/yammer/commands/group/group-user-add.js +27 -40
  1176. package/dist/m365/yammer/commands/group/group-user-remove.js +46 -59
  1177. package/dist/m365/yammer/commands/message/message-add.js +33 -46
  1178. package/dist/m365/yammer/commands/message/message-get.js +24 -37
  1179. package/dist/m365/yammer/commands/message/message-like-set.js +48 -61
  1180. package/dist/m365/yammer/commands/message/message-list.js +31 -44
  1181. package/dist/m365/yammer/commands/message/message-remove.js +38 -51
  1182. package/dist/m365/yammer/commands/network/network-list.js +24 -37
  1183. package/dist/m365/yammer/commands/report/report-activitycounts.js +5 -7
  1184. package/dist/m365/yammer/commands/report/report-activityusercounts.js +5 -7
  1185. package/dist/m365/yammer/commands/report/report-activityuserdetail.js +5 -7
  1186. package/dist/m365/yammer/commands/report/report-deviceusagedistributionusercounts.js +5 -7
  1187. package/dist/m365/yammer/commands/report/report-deviceusageusercounts.js +5 -7
  1188. package/dist/m365/yammer/commands/report/report-deviceusageuserdetail.js +5 -7
  1189. package/dist/m365/yammer/commands/report/report-groupsactivitycounts.js +5 -7
  1190. package/dist/m365/yammer/commands/report/report-groupsactivitydetail.js +5 -7
  1191. package/dist/m365/yammer/commands/report/report-groupsactivitygroupcounts.js +5 -7
  1192. package/dist/m365/yammer/commands/user/user-get.js +32 -45
  1193. package/dist/m365/yammer/commands/user/user-list.js +18 -31
  1194. package/dist/m365/yammer/commands/yammer-search.js +85 -99
  1195. package/dist/m365/yammer/commands.js +1 -3
  1196. package/dist/request.js +27 -22
  1197. package/dist/settingsNames.js +1 -4
  1198. package/dist/telemetry.js +10 -13
  1199. package/dist/utils/aadGroup.js +24 -40
  1200. package/dist/utils/aadUser.js +39 -57
  1201. package/dist/utils/accessToken.js +5 -8
  1202. package/dist/utils/app.js +12 -0
  1203. package/dist/utils/basic.js +8 -0
  1204. package/dist/utils/browserUtil.js +5 -19
  1205. package/dist/utils/cache.js +8 -11
  1206. package/dist/utils/formatting.js +9 -12
  1207. package/dist/utils/fsUtil.js +5 -8
  1208. package/dist/utils/md.js +11 -14
  1209. package/dist/utils/misc.js +1 -4
  1210. package/dist/utils/odata.js +20 -35
  1211. package/dist/utils/packageManager.js +13 -16
  1212. package/dist/utils/pid.js +11 -14
  1213. package/dist/utils/planner.js +29 -44
  1214. package/dist/utils/powerPlatform.js +25 -39
  1215. package/dist/utils/session.js +5 -8
  1216. package/dist/utils/sinonUtil.js +1 -4
  1217. package/dist/utils/spfx.js +3 -8
  1218. package/dist/utils/spo.js +253 -293
  1219. package/dist/utils/tsUtil.js +8 -0
  1220. package/dist/utils/types.js +1 -2
  1221. package/dist/utils/urlUtil.js +3 -6
  1222. package/dist/utils/validation.js +2 -5
  1223. package/docs/docs/_clisettings.mdx +1 -1
  1224. package/docs/docs/cmd/_global.mdx +1 -1
  1225. package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
  1226. package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
  1227. package/docs/docs/cmd/flow/environment/environment-get.mdx +1 -2
  1228. package/docs/docs/cmd/flow/environment/environment-list.mdx +1 -2
  1229. package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
  1230. package/docs/docs/cmd/flow/run/run-list.mdx +1 -3
  1231. package/docs/docs/cmd/login.mdx +6 -0
  1232. package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
  1233. package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
  1234. package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
  1235. package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
  1236. package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
  1237. package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
  1238. package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
  1239. package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
  1240. package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
  1241. package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
  1242. package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
  1243. package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
  1244. package/docs/docs/cmd/spo/file/file-move.mdx +2 -2
  1245. package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
  1246. package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
  1247. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
  1248. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
  1249. package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
  1250. package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
  1251. package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
  1252. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
  1253. package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
  1254. package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
  1255. package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
  1256. package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
  1257. package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
  1258. package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
  1259. package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
  1260. package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
  1261. package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
  1262. package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
  1263. package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
  1264. package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
  1265. package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
  1266. package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
  1267. package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
  1268. package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
  1269. package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
  1270. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
  1271. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
  1272. package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
  1273. package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
  1274. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
  1275. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
  1276. package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +2 -11
  1277. package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
  1278. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  1279. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +2 -2
  1280. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +1 -1
  1281. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
  1282. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  1283. package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
  1284. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  1285. package/docs/docs/cmd/teams/meeting/meeting-list.mdx +135 -92
  1286. package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
  1287. package/npm-shrinkwrap.json +1486 -5242
  1288. package/package.json +24 -22
package/dist/Auth.js CHANGED
@@ -1,41 +1,29 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Auth = exports.CertificateType = exports.AuthType = exports.Service = exports.CloudType = void 0;
13
- const msal_common_1 = require("@azure/msal-common");
14
- const FileTokenStorage_1 = require("./auth/FileTokenStorage");
15
- const msalCachePlugin_1 = require("./auth/msalCachePlugin");
16
- const Cli_1 = require("./cli/Cli");
17
- const Command_1 = require("./Command");
18
- const config_1 = require("./config");
19
- const request_1 = require("./request");
20
- const settingsNames_1 = require("./settingsNames");
21
- const browserUtil_1 = require("./utils/browserUtil");
22
- var CloudType;
1
+ import { AzureCloudInstance } from '@azure/msal-common';
2
+ import { CommandError } from './Command.js';
3
+ import { FileTokenStorage } from './auth/FileTokenStorage.js';
4
+ import { msalCachePlugin } from './auth/msalCachePlugin.js';
5
+ import { Cli } from './cli/Cli.js';
6
+ import config from './config.js';
7
+ import request from './request.js';
8
+ import { settingsNames } from './settingsNames.js';
9
+ import { browserUtil } from './utils/browserUtil.js';
10
+ export var CloudType;
23
11
  (function (CloudType) {
24
12
  CloudType[CloudType["Public"] = 0] = "Public";
25
13
  CloudType[CloudType["USGov"] = 1] = "USGov";
26
14
  CloudType[CloudType["USGovHigh"] = 2] = "USGovHigh";
27
15
  CloudType[CloudType["USGovDoD"] = 3] = "USGovDoD";
28
16
  CloudType[CloudType["China"] = 4] = "China";
29
- })(CloudType = exports.CloudType || (exports.CloudType = {}));
30
- class Service {
17
+ })(CloudType || (CloudType = {}));
18
+ export class Service {
31
19
  constructor() {
32
20
  this.connected = false;
33
21
  this.authType = AuthType.DeviceCode;
34
22
  this.certificateType = CertificateType.Unknown;
35
23
  this.cloudType = CloudType.Public;
36
24
  this.accessTokens = {};
37
- this.appId = config_1.default.cliAadAppId;
38
- this.tenant = config_1.default.tenant;
25
+ this.appId = config.cliAadAppId;
26
+ this.tenant = config.tenant;
39
27
  this.cloudType = CloudType.Public;
40
28
  }
41
29
  logout() {
@@ -49,12 +37,11 @@ class Service {
49
37
  this.thumbprint = undefined;
50
38
  this.spoUrl = undefined;
51
39
  this.tenantId = undefined;
52
- this.appId = config_1.default.cliAadAppId;
53
- this.tenant = config_1.default.tenant;
40
+ this.appId = config.cliAadAppId;
41
+ this.tenant = config.tenant;
54
42
  }
55
43
  }
56
- exports.Service = Service;
57
- var AuthType;
44
+ export var AuthType;
58
45
  (function (AuthType) {
59
46
  AuthType[AuthType["DeviceCode"] = 0] = "DeviceCode";
60
47
  AuthType[AuthType["Password"] = 1] = "Password";
@@ -62,14 +49,14 @@ var AuthType;
62
49
  AuthType[AuthType["Identity"] = 3] = "Identity";
63
50
  AuthType[AuthType["Browser"] = 4] = "Browser";
64
51
  AuthType[AuthType["Secret"] = 5] = "Secret";
65
- })(AuthType = exports.AuthType || (exports.AuthType = {}));
66
- var CertificateType;
52
+ })(AuthType || (AuthType = {}));
53
+ export var CertificateType;
67
54
  (function (CertificateType) {
68
55
  CertificateType[CertificateType["Unknown"] = 0] = "Unknown";
69
56
  CertificateType[CertificateType["Base64"] = 1] = "Base64";
70
57
  CertificateType[CertificateType["Binary"] = 2] = "Binary";
71
- })(CertificateType = exports.CertificateType || (exports.CertificateType = {}));
72
- class Auth {
58
+ })(CertificateType || (CertificateType = {}));
59
+ export class Auth {
73
60
  get service() {
74
61
  return this._service;
75
62
  }
@@ -109,130 +96,126 @@ class Auth {
109
96
  'https://login.microsoftonline.com': 'https://login.chinacloudapi.cn'
110
97
  };
111
98
  }
112
- restoreAuth() {
113
- return __awaiter(this, void 0, void 0, function* () {
114
- // check if auth has been restored previously
115
- if (this._service.connected) {
116
- return Promise.resolve();
117
- }
118
- try {
119
- const service = yield this.getServiceConnectionInfo();
120
- this._service = Object.assign(this._service, service);
121
- }
122
- catch (_a) {
123
- }
124
- });
99
+ async restoreAuth() {
100
+ // check if auth has been restored previously
101
+ if (this._service.connected) {
102
+ return Promise.resolve();
103
+ }
104
+ try {
105
+ const service = await this.getServiceConnectionInfo();
106
+ this._service = Object.assign(this._service, service);
107
+ }
108
+ catch {
109
+ }
125
110
  }
126
- ensureAccessToken(resource, logger, debug = false, fetchNew = false) {
127
- return __awaiter(this, void 0, void 0, function* () {
128
- const now = new Date();
129
- const accessToken = this.service.accessTokens[resource];
130
- const expiresOn = accessToken && accessToken.expiresOn ?
131
- // if expiresOn is serialized from the service file, it's set as a string
132
- // if it's coming from MSAL, it's a Date
133
- typeof accessToken.expiresOn === 'string' ? new Date(accessToken.expiresOn) : accessToken.expiresOn
134
- : new Date(0);
135
- if (!fetchNew && accessToken && expiresOn > now) {
136
- if (debug) {
137
- logger.logToStderr(`Existing access token ${accessToken.accessToken} still valid. Returning...`);
138
- }
139
- return accessToken.accessToken;
111
+ async ensureAccessToken(resource, logger, debug = false, fetchNew = false) {
112
+ const now = new Date();
113
+ const accessToken = this.service.accessTokens[resource];
114
+ const expiresOn = accessToken && accessToken.expiresOn ?
115
+ // if expiresOn is serialized from the service file, it's set as a string
116
+ // if it's coming from MSAL, it's a Date
117
+ typeof accessToken.expiresOn === 'string' ? new Date(accessToken.expiresOn) : accessToken.expiresOn
118
+ : new Date(0);
119
+ if (!fetchNew && accessToken && expiresOn > now) {
120
+ if (debug) {
121
+ await logger.logToStderr(`Existing access token ${accessToken.accessToken} still valid. Returning...`);
140
122
  }
141
- else {
142
- if (debug) {
143
- if (!accessToken) {
144
- logger.logToStderr(`No token found for resource ${resource}`);
145
- }
146
- else {
147
- logger.logToStderr(`Access token expired. Token: ${accessToken.accessToken}, ExpiresAt: ${accessToken.expiresOn}`);
148
- }
123
+ return accessToken.accessToken;
124
+ }
125
+ else {
126
+ if (debug) {
127
+ if (!accessToken) {
128
+ await logger.logToStderr(`No token found for resource ${resource}`);
149
129
  }
150
- }
151
- let getTokenPromise;
152
- // when using cert, you can't retrieve token silently, because there is
153
- // no account. Also cert auth instantiates clientApplication itself
154
- // after inspecting the specified cert and calculating thumbprint if one
155
- // wasn't specified
156
- if (this.service.authType !== AuthType.Certificate) {
157
- this.clientApplication = this.getClientApplication(logger, debug);
158
- if (this.clientApplication) {
159
- const accounts = yield this.clientApplication.getTokenCache().getAllAccounts();
160
- if (accounts.length > 0) {
161
- getTokenPromise = this.ensureAccessTokenSilent.bind(this);
162
- }
130
+ else {
131
+ await logger.logToStderr(`Access token expired. Token: ${accessToken.accessToken}, ExpiresAt: ${accessToken.expiresOn}`);
163
132
  }
164
133
  }
165
- if (!getTokenPromise) {
166
- switch (this.service.authType) {
167
- case AuthType.DeviceCode:
168
- getTokenPromise = this.ensureAccessTokenWithDeviceCode.bind(this);
169
- break;
170
- case AuthType.Password:
171
- getTokenPromise = this.ensureAccessTokenWithPassword.bind(this);
172
- break;
173
- case AuthType.Certificate:
174
- getTokenPromise = this.ensureAccessTokenWithCertificate.bind(this);
175
- break;
176
- case AuthType.Identity:
177
- getTokenPromise = this.ensureAccessTokenWithIdentity.bind(this);
178
- break;
179
- case AuthType.Browser:
180
- getTokenPromise = this.ensureAccessTokenWithBrowser.bind(this);
181
- break;
182
- case AuthType.Secret:
183
- getTokenPromise = this.ensureAccessTokenWithSecret.bind(this);
184
- break;
134
+ }
135
+ let getTokenPromise;
136
+ // when using cert, you can't retrieve token silently, because there is
137
+ // no account. Also cert auth instantiates clientApplication itself
138
+ // after inspecting the specified cert and calculating thumbprint if one
139
+ // wasn't specified
140
+ if (this.service.authType !== AuthType.Certificate) {
141
+ this.clientApplication = await this.getClientApplication(logger, debug);
142
+ if (this.clientApplication) {
143
+ const accounts = await this.clientApplication.getTokenCache().getAllAccounts();
144
+ if (accounts.length > 0) {
145
+ getTokenPromise = this.ensureAccessTokenSilent.bind(this);
185
146
  }
186
147
  }
187
- const response = yield getTokenPromise(resource, logger, debug, fetchNew);
188
- if (!response) {
189
- if (debug) {
190
- logger.logToStderr(`getTokenPromise authentication result is null`);
191
- }
192
- throw `Failed to retrieve an access token. Please try again`;
148
+ }
149
+ if (!getTokenPromise) {
150
+ switch (this.service.authType) {
151
+ case AuthType.DeviceCode:
152
+ getTokenPromise = this.ensureAccessTokenWithDeviceCode.bind(this);
153
+ break;
154
+ case AuthType.Password:
155
+ getTokenPromise = this.ensureAccessTokenWithPassword.bind(this);
156
+ break;
157
+ case AuthType.Certificate:
158
+ getTokenPromise = this.ensureAccessTokenWithCertificate.bind(this);
159
+ break;
160
+ case AuthType.Identity:
161
+ getTokenPromise = this.ensureAccessTokenWithIdentity.bind(this);
162
+ break;
163
+ case AuthType.Browser:
164
+ getTokenPromise = this.ensureAccessTokenWithBrowser.bind(this);
165
+ break;
166
+ case AuthType.Secret:
167
+ getTokenPromise = this.ensureAccessTokenWithSecret.bind(this);
168
+ break;
193
169
  }
194
- else {
195
- if (debug) {
196
- logger.logToStderr('Response');
197
- logger.logToStderr(response);
198
- logger.logToStderr('');
199
- }
170
+ }
171
+ const response = await getTokenPromise(resource, logger, debug, fetchNew);
172
+ if (!response) {
173
+ if (debug) {
174
+ await logger.logToStderr(`getTokenPromise authentication result is null`);
200
175
  }
201
- this.service.accessTokens[resource] = {
202
- expiresOn: response.expiresOn,
203
- accessToken: response.accessToken
204
- };
205
- this.service.connected = true;
206
- try {
207
- yield this.storeConnectionInfo();
176
+ throw `Failed to retrieve an access token. Please try again`;
177
+ }
178
+ else {
179
+ if (debug) {
180
+ await logger.logToStderr('Response');
181
+ await logger.logToStderr(response);
182
+ await logger.logToStderr('');
208
183
  }
209
- catch (ex) {
210
- // error could happen due to an issue with persisting the access
211
- // token which shouldn't fail the overall token retrieval process
212
- if (debug) {
213
- logger.logToStderr(new Command_1.CommandError(ex));
214
- }
184
+ }
185
+ this.service.accessTokens[resource] = {
186
+ expiresOn: response.expiresOn,
187
+ accessToken: response.accessToken
188
+ };
189
+ this.service.connected = true;
190
+ try {
191
+ await this.storeConnectionInfo();
192
+ }
193
+ catch (ex) {
194
+ // error could happen due to an issue with persisting the access
195
+ // token which shouldn't fail the overall token retrieval process
196
+ if (debug) {
197
+ await logger.logToStderr(new CommandError(ex));
215
198
  }
216
- return response.accessToken;
217
- });
199
+ }
200
+ return response.accessToken;
218
201
  }
219
- getClientApplication(logger, debug) {
202
+ async getClientApplication(logger, debug) {
220
203
  switch (this.service.authType) {
221
204
  case AuthType.DeviceCode:
222
205
  case AuthType.Password:
223
206
  case AuthType.Browser:
224
- return this.getPublicClient(logger, debug);
207
+ return await this.getPublicClient(logger, debug);
225
208
  case AuthType.Certificate:
226
- return this.getConfidentialClient(logger, debug, this.service.thumbprint, this.service.password, undefined);
209
+ return await this.getConfidentialClient(logger, debug, this.service.thumbprint, this.service.password, undefined);
227
210
  case AuthType.Identity:
228
211
  // msal-node doesn't support managed identity so we need to do it manually
229
212
  return undefined;
230
213
  case AuthType.Secret:
231
- return this.getConfidentialClient(logger, debug, undefined, undefined, this.service.secret);
214
+ return await this.getConfidentialClient(logger, debug, undefined, undefined, this.service.secret);
232
215
  }
233
216
  }
234
- getAuthClientConfiguration(logger, debug, certificateThumbprint, certificatePrivateKey, clientSecret) {
235
- const msal = require('@azure/msal-node');
217
+ async getAuthClientConfiguration(logger, debug, certificateThumbprint, certificatePrivateKey, clientSecret) {
218
+ const msal = await import('@azure/msal-node');
236
219
  const { LogLevel } = msal;
237
220
  const cert = !certificateThumbprint ? undefined : {
238
221
  thumbprint: certificateThumbprint,
@@ -241,15 +224,15 @@ class Auth {
241
224
  let azureCloudInstance = 0;
242
225
  switch (this.service.cloudType) {
243
226
  case CloudType.Public:
244
- azureCloudInstance = msal_common_1.AzureCloudInstance.AzurePublic;
227
+ azureCloudInstance = AzureCloudInstance.AzurePublic;
245
228
  break;
246
229
  case CloudType.China:
247
- azureCloudInstance = msal_common_1.AzureCloudInstance.AzureChina;
230
+ azureCloudInstance = AzureCloudInstance.AzureChina;
248
231
  break;
249
232
  case CloudType.USGov:
250
233
  case CloudType.USGovHigh:
251
234
  case CloudType.USGovDoD:
252
- azureCloudInstance = msal_common_1.AzureCloudInstance.AzureUsGovernment;
235
+ azureCloudInstance = AzureCloudInstance.AzureUsGovernment;
253
236
  break;
254
237
  }
255
238
  const config = {
@@ -261,19 +244,20 @@ class Auth {
261
244
  }
262
245
  };
263
246
  const authConfig = cert
264
- ? Object.assign(Object.assign({}, config), { clientCertificate: cert }) : Object.assign(Object.assign({}, config), { clientSecret });
247
+ ? { ...config, clientCertificate: cert }
248
+ : { ...config, clientSecret };
265
249
  return {
266
250
  auth: authConfig,
267
251
  cache: {
268
- cachePlugin: msalCachePlugin_1.msalCachePlugin
252
+ cachePlugin: msalCachePlugin
269
253
  },
270
254
  system: {
271
255
  loggerOptions: {
272
256
  // loggerCallback is called by MSAL which we're not testing
273
257
  /* c8 ignore next 4 */
274
- loggerCallback: (level, message) => {
258
+ loggerCallback: async (level, message) => {
275
259
  if (level === LogLevel.Error || debug) {
276
- logger.logToStderr(message);
260
+ await logger.logToStderr(message);
277
261
  }
278
262
  },
279
263
  piiLoggingEnabled: false,
@@ -282,8 +266,8 @@ class Auth {
282
266
  }
283
267
  };
284
268
  }
285
- getPublicClient(logger, debug) {
286
- const msal = require('@azure/msal-node');
269
+ async getPublicClient(logger, debug) {
270
+ const msal = await import('@azure/msal-node');
287
271
  const { PublicClientApplication } = msal;
288
272
  if (this.service.authType === AuthType.Password &&
289
273
  this.service.tenant === 'common') {
@@ -291,291 +275,277 @@ class Auth {
291
275
  // organizations
292
276
  this.service.tenant = 'organizations';
293
277
  }
294
- return new PublicClientApplication(this.getAuthClientConfiguration(logger, debug));
278
+ return new PublicClientApplication(await this.getAuthClientConfiguration(logger, debug));
295
279
  }
296
- getConfidentialClient(logger, debug, certificateThumbprint, certificatePrivateKey, clientSecret) {
297
- const msal = require('@azure/msal-node');
280
+ async getConfidentialClient(logger, debug, certificateThumbprint, certificatePrivateKey, clientSecret) {
281
+ const msal = await import('@azure/msal-node');
298
282
  const { ConfidentialClientApplication } = msal;
299
- return new ConfidentialClientApplication(this.getAuthClientConfiguration(logger, debug, certificateThumbprint, certificatePrivateKey, clientSecret));
283
+ return new ConfidentialClientApplication(await this.getAuthClientConfiguration(logger, debug, certificateThumbprint, certificatePrivateKey, clientSecret));
300
284
  }
301
285
  retrieveAuthCodeWithBrowser(resource, logger, debug) {
302
- return new Promise((resolve, reject) => {
286
+ return new Promise(async (resolve, reject) => {
303
287
  // _authServer is never set before hitting this line, but this check
304
288
  // is implemented so that we can support lazy loading
305
289
  // but also stub it for testing
306
290
  /* c8 ignore next 3 */
307
291
  if (!this._authServer) {
308
- this._authServer = require('./AuthServer').default;
292
+ this._authServer = (await import('./AuthServer')).default;
309
293
  }
310
294
  this._authServer.initializeServer(this.service, resource, resolve, reject, logger, debug);
311
295
  });
312
296
  }
313
- ensureAccessTokenWithBrowser(resource, logger, debug) {
314
- return __awaiter(this, void 0, void 0, function* () {
315
- if (debug) {
316
- logger.logToStderr(`Retrieving new access token using interactive browser session...`);
317
- }
318
- const response = yield this.retrieveAuthCodeWithBrowser(resource, logger, debug);
319
- if (debug) {
320
- logger.logToStderr(`The service returned the code '${response.code}'`);
321
- }
322
- return this.clientApplication.acquireTokenByCode({
323
- code: response.code,
324
- redirectUri: response.redirectUri,
325
- scopes: [`${resource}/.default`]
326
- });
297
+ async ensureAccessTokenWithBrowser(resource, logger, debug) {
298
+ if (debug) {
299
+ await logger.logToStderr(`Retrieving new access token using interactive browser session...`);
300
+ }
301
+ const response = await this.retrieveAuthCodeWithBrowser(resource, logger, debug);
302
+ if (debug) {
303
+ await logger.logToStderr(`The service returned the code '${response.code}'`);
304
+ }
305
+ return this.clientApplication.acquireTokenByCode({
306
+ code: response.code,
307
+ redirectUri: response.redirectUri,
308
+ scopes: [`${resource}/.default`]
327
309
  });
328
310
  }
329
- ensureAccessTokenSilent(resource, logger, debug, fetchNew) {
330
- return __awaiter(this, void 0, void 0, function* () {
331
- if (debug) {
332
- logger.logToStderr(`Retrieving new access token silently`);
333
- }
334
- const accounts = yield this.clientApplication
335
- .getTokenCache().getAllAccounts();
336
- return this.clientApplication.acquireTokenSilent({
337
- account: accounts[0],
338
- scopes: [`${resource}/.default`],
339
- forceRefresh: fetchNew
340
- });
311
+ async ensureAccessTokenSilent(resource, logger, debug, fetchNew) {
312
+ if (debug) {
313
+ await logger.logToStderr(`Retrieving new access token silently`);
314
+ }
315
+ const accounts = await this.clientApplication
316
+ .getTokenCache().getAllAccounts();
317
+ return this.clientApplication.acquireTokenSilent({
318
+ account: accounts[0],
319
+ scopes: [`${resource}/.default`],
320
+ forceRefresh: fetchNew
341
321
  });
342
322
  }
343
- ensureAccessTokenWithDeviceCode(resource, logger, debug) {
344
- return __awaiter(this, void 0, void 0, function* () {
345
- if (debug) {
346
- logger.logToStderr(`Starting Auth.ensureAccessTokenWithDeviceCode. resource: ${resource}, debug: ${debug}`);
347
- }
348
- this.deviceCodeRequest = {
349
- // deviceCodeCallback is called by MSAL which we're not testing
350
- /* c8 ignore next 1 */
351
- deviceCodeCallback: response => this.processDeviceCodeCallback(response, logger, debug),
352
- scopes: [`${resource}/.default`]
353
- };
354
- return this.clientApplication.acquireTokenByDeviceCode(this.deviceCodeRequest);
355
- });
323
+ async ensureAccessTokenWithDeviceCode(resource, logger, debug) {
324
+ if (debug) {
325
+ await logger.logToStderr(`Starting Auth.ensureAccessTokenWithDeviceCode. resource: ${resource}, debug: ${debug}`);
326
+ }
327
+ this.deviceCodeRequest = {
328
+ // deviceCodeCallback is called by MSAL which we're not testing
329
+ /* c8 ignore next 1 */
330
+ deviceCodeCallback: response => this.processDeviceCodeCallback(response, logger, debug),
331
+ scopes: [`${resource}/.default`]
332
+ };
333
+ return this.clientApplication.acquireTokenByDeviceCode(this.deviceCodeRequest);
356
334
  }
357
- processDeviceCodeCallback(response, logger, debug) {
335
+ async processDeviceCodeCallback(response, logger, debug) {
358
336
  if (debug) {
359
- logger.logToStderr('Response:');
360
- logger.logToStderr(response);
361
- logger.logToStderr('');
337
+ await logger.logToStderr('Response:');
338
+ await logger.logToStderr(response);
339
+ await logger.logToStderr('');
362
340
  }
363
- logger.log(response.message);
364
- if (Cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.autoOpenLinksInBrowser, false)) {
365
- browserUtil_1.browserUtil.open(response.verificationUri);
341
+ await logger.log(response.message);
342
+ if (Cli.getInstance().getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false)) {
343
+ browserUtil.open(response.verificationUri);
366
344
  }
367
- if (Cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.copyDeviceCodeToClipboard, false)) {
345
+ if (Cli.getInstance().getSettingWithDefaultValue(settingsNames.copyDeviceCodeToClipboard, false)) {
368
346
  // _clipboardy is never set before hitting this line, but this check
369
347
  // is implemented so that we can support lazy loading
370
348
  // but also stub it for testing
371
349
  /* c8 ignore next 3 */
372
350
  if (!this._clipboardy) {
373
- this._clipboardy = require('clipboardy');
351
+ this._clipboardy = (await import('clipboardy')).default;
374
352
  }
375
353
  this._clipboardy.writeSync(response.userCode);
376
354
  }
377
355
  }
378
- ensureAccessTokenWithPassword(resource, logger, debug) {
379
- return __awaiter(this, void 0, void 0, function* () {
380
- if (debug) {
381
- logger.logToStderr(`Retrieving new access token using credentials...`);
382
- }
383
- return this.clientApplication.acquireTokenByUsernamePassword({
384
- username: this.service.userName,
385
- password: this.service.password,
386
- scopes: [`${resource}/.default`]
387
- });
356
+ async ensureAccessTokenWithPassword(resource, logger, debug) {
357
+ if (debug) {
358
+ await logger.logToStderr(`Retrieving new access token using credentials...`);
359
+ }
360
+ return this.clientApplication.acquireTokenByUsernamePassword({
361
+ username: this.service.userName,
362
+ password: this.service.password,
363
+ scopes: [`${resource}/.default`]
388
364
  });
389
365
  }
390
- ensureAccessTokenWithCertificate(resource, logger, debug) {
391
- return __awaiter(this, void 0, void 0, function* () {
392
- const nodeForge = require('node-forge');
393
- const { pem, pki, asn1, pkcs12 } = nodeForge;
394
- if (debug) {
395
- logger.logToStderr(`Retrieving new access token using certificate...`);
396
- }
397
- let cert = '';
398
- const buf = Buffer.from(this.service.certificate, 'base64');
399
- if (this.service.certificateType === CertificateType.Unknown || this.service.certificateType === CertificateType.Base64) {
400
- // First time this method is called, we don't know if certificate is PEM or PFX (type is Unknown)
401
- // We assume it is PEM but when parsing of PEM fails, we assume it could be PFX
402
- // Type is persisted on service so subsequent calls only run through the correct parsing flow
403
- try {
404
- cert = buf.toString('utf8');
405
- const pemObjs = pem.decode(cert);
406
- if (this.service.thumbprint === undefined) {
407
- const pemCertObj = pemObjs.find(pem => pem.type === "CERTIFICATE");
408
- const pemCertStr = pem.encode(pemCertObj);
409
- const pemCert = pki.certificateFromPem(pemCertStr);
410
- this.service.thumbprint = this.calculateThumbprint(pemCert);
411
- }
412
- }
413
- catch (e) {
414
- this.service.certificateType = CertificateType.Binary;
415
- }
416
- }
417
- if (this.service.certificateType === CertificateType.Binary) {
418
- const p12Asn1 = asn1.fromDer(buf.toString('binary'), false);
419
- const p12Parsed = pkcs12.pkcs12FromAsn1(p12Asn1, false, this.service.password);
420
- let keyBags = p12Parsed.getBags({ bagType: pki.oids.pkcs8ShroudedKeyBag });
421
- const pkcs8ShroudedKeyBag = keyBags[pki.oids.pkcs8ShroudedKeyBag][0];
422
- if (debug) {
423
- // check if there is something in the keyBag as well as
424
- // the pkcs8ShroudedKeyBag. This will give us more information
425
- // whether there is a cert that can potentially store keys in the keyBag.
426
- // I could not find a way to add something to the keyBag with all
427
- // my attempts, but lets keep it here for troubleshooting purposes.
428
- logger.logToStderr(`pkcs8ShroudedKeyBagkeyBags length is ${[pki.oids.pkcs8ShroudedKeyBag].length}`);
429
- keyBags = p12Parsed.getBags({ bagType: pki.oids.keyBag });
430
- logger.logToStderr(`keyBag length is ${keyBags[pki.oids.keyBag].length}`);
431
- }
432
- // convert a Forge private key to an ASN.1 RSAPrivateKey
433
- const rsaPrivateKey = pki.privateKeyToAsn1(pkcs8ShroudedKeyBag.key);
434
- // wrap an RSAPrivateKey ASN.1 object in a PKCS#8 ASN.1 PrivateKeyInfo
435
- const privateKeyInfo = pki.wrapRsaPrivateKey(rsaPrivateKey);
436
- // convert a PKCS#8 ASN.1 PrivateKeyInfo to PEM
437
- cert = pki.privateKeyInfoToPem(privateKeyInfo);
366
+ async ensureAccessTokenWithCertificate(resource, logger, debug) {
367
+ const nodeForge = (await import('node-forge')).default;
368
+ const { pem, pki, asn1, pkcs12 } = nodeForge;
369
+ if (debug) {
370
+ await logger.logToStderr(`Retrieving new access token using certificate...`);
371
+ }
372
+ let cert = '';
373
+ const buf = Buffer.from(this.service.certificate, 'base64');
374
+ if (this.service.certificateType === CertificateType.Unknown || this.service.certificateType === CertificateType.Base64) {
375
+ // First time this method is called, we don't know if certificate is PEM or PFX (type is Unknown)
376
+ // We assume it is PEM but when parsing of PEM fails, we assume it could be PFX
377
+ // Type is persisted on service so subsequent calls only run through the correct parsing flow
378
+ try {
379
+ cert = buf.toString('utf8');
380
+ const pemObjs = pem.decode(cert);
438
381
  if (this.service.thumbprint === undefined) {
439
- const certBags = p12Parsed.getBags({ bagType: pki.oids.certBag });
440
- const certBag = certBags[pki.oids.certBag][0];
441
- this.service.thumbprint = this.calculateThumbprint(certBag.cert);
382
+ const pemCertObj = pemObjs.find(pem => pem.type === "CERTIFICATE");
383
+ const pemCertStr = pem.encode(pemCertObj);
384
+ const pemCert = pki.certificateFromPem(pemCertStr);
385
+ this.service.thumbprint = await this.calculateThumbprint(pemCert);
442
386
  }
443
387
  }
444
- this.clientApplication = this.getConfidentialClient(logger, debug, this.service.thumbprint, cert);
445
- return this.clientApplication.acquireTokenByClientCredential({
446
- scopes: [`${resource}/.default`]
447
- });
388
+ catch (e) {
389
+ this.service.certificateType = CertificateType.Binary;
390
+ }
391
+ }
392
+ if (this.service.certificateType === CertificateType.Binary) {
393
+ const p12Asn1 = asn1.fromDer(buf.toString('binary'), false);
394
+ const p12Parsed = pkcs12.pkcs12FromAsn1(p12Asn1, false, this.service.password);
395
+ let keyBags = p12Parsed.getBags({ bagType: pki.oids.pkcs8ShroudedKeyBag });
396
+ const pkcs8ShroudedKeyBag = keyBags[pki.oids.pkcs8ShroudedKeyBag][0];
397
+ if (debug) {
398
+ // check if there is something in the keyBag as well as
399
+ // the pkcs8ShroudedKeyBag. This will give us more information
400
+ // whether there is a cert that can potentially store keys in the keyBag.
401
+ // I could not find a way to add something to the keyBag with all
402
+ // my attempts, but lets keep it here for troubleshooting purposes.
403
+ await logger.logToStderr(`pkcs8ShroudedKeyBagkeyBags length is ${[pki.oids.pkcs8ShroudedKeyBag].length}`);
404
+ keyBags = p12Parsed.getBags({ bagType: pki.oids.keyBag });
405
+ await logger.logToStderr(`keyBag length is ${keyBags[pki.oids.keyBag].length}`);
406
+ }
407
+ // convert a Forge private key to an ASN.1 RSAPrivateKey
408
+ const rsaPrivateKey = pki.privateKeyToAsn1(pkcs8ShroudedKeyBag.key);
409
+ // wrap an RSAPrivateKey ASN.1 object in a PKCS#8 ASN.1 PrivateKeyInfo
410
+ const privateKeyInfo = pki.wrapRsaPrivateKey(rsaPrivateKey);
411
+ // convert a PKCS#8 ASN.1 PrivateKeyInfo to PEM
412
+ cert = pki.privateKeyInfoToPem(privateKeyInfo);
413
+ if (this.service.thumbprint === undefined) {
414
+ const certBags = p12Parsed.getBags({ bagType: pki.oids.certBag });
415
+ const certBag = (certBags[pki.oids.certBag])[0];
416
+ this.service.thumbprint = await this.calculateThumbprint(certBag.cert);
417
+ }
418
+ }
419
+ this.clientApplication = await this.getConfidentialClient(logger, debug, this.service.thumbprint, cert);
420
+ return this.clientApplication.acquireTokenByClientCredential({
421
+ scopes: [`${resource}/.default`]
448
422
  });
449
423
  }
450
- ensureAccessTokenWithIdentity(resource, logger, debug) {
451
- return __awaiter(this, void 0, void 0, function* () {
452
- const userName = this.service.userName;
424
+ async ensureAccessTokenWithIdentity(resource, logger, debug) {
425
+ const userName = this.service.userName;
426
+ if (debug) {
427
+ await logger.logToStderr('Will try to retrieve access token using identity...');
428
+ }
429
+ const requestOptions = {
430
+ url: '',
431
+ headers: {
432
+ accept: 'application/json',
433
+ Metadata: true,
434
+ 'x-anonymous': true
435
+ },
436
+ responseType: 'json'
437
+ };
438
+ if (process.env.IDENTITY_ENDPOINT && process.env.IDENTITY_HEADER) {
453
439
  if (debug) {
454
- logger.logToStderr('Will try to retrieve access token using identity...');
440
+ await logger.logToStderr('IDENTITY_ENDPOINT and IDENTITY_HEADER env variables found it is Azure Function, WebApp...');
455
441
  }
456
- const requestOptions = {
457
- url: '',
458
- headers: {
459
- accept: 'application/json',
460
- Metadata: true,
461
- 'x-anonymous': true
462
- },
463
- responseType: 'json'
464
- };
465
- if (process.env.IDENTITY_ENDPOINT && process.env.IDENTITY_HEADER) {
466
- if (debug) {
467
- logger.logToStderr('IDENTITY_ENDPOINT and IDENTITY_HEADER env variables found it is Azure Function, WebApp...');
468
- }
469
- requestOptions.url = `${process.env.IDENTITY_ENDPOINT}?resource=${encodeURIComponent(resource)}&api-version=2019-08-01`;
470
- requestOptions.headers['X-IDENTITY-HEADER'] = process.env.IDENTITY_HEADER;
442
+ requestOptions.url = `${process.env.IDENTITY_ENDPOINT}?resource=${encodeURIComponent(resource)}&api-version=2019-08-01`;
443
+ requestOptions.headers['X-IDENTITY-HEADER'] = process.env.IDENTITY_HEADER;
444
+ }
445
+ else if (process.env.MSI_ENDPOINT && process.env.MSI_SECRET) {
446
+ if (debug) {
447
+ await logger.logToStderr('MSI_ENDPOINT and MSI_SECRET env variables found it is Azure Function or WebApp, but using the old names of the env variables...');
471
448
  }
472
- else if (process.env.MSI_ENDPOINT && process.env.MSI_SECRET) {
473
- if (debug) {
474
- logger.logToStderr('MSI_ENDPOINT and MSI_SECRET env variables found it is Azure Function or WebApp, but using the old names of the env variables...');
475
- }
476
- requestOptions.url = `${process.env.MSI_ENDPOINT}?resource=${encodeURIComponent(resource)}&api-version=2019-08-01`;
477
- requestOptions.headers['X-IDENTITY-HEADER'] = process.env.MSI_SECRET;
449
+ requestOptions.url = `${process.env.MSI_ENDPOINT}?resource=${encodeURIComponent(resource)}&api-version=2019-08-01`;
450
+ requestOptions.headers['X-IDENTITY-HEADER'] = process.env.MSI_SECRET;
451
+ }
452
+ else if (process.env.IDENTITY_ENDPOINT) {
453
+ if (debug) {
454
+ await logger.logToStderr('IDENTITY_ENDPOINT env variable found it is Azure Could Shell...');
478
455
  }
479
- else if (process.env.IDENTITY_ENDPOINT) {
480
- if (debug) {
481
- logger.logToStderr('IDENTITY_ENDPOINT env variable found it is Azure Could Shell...');
482
- }
483
- if (userName && process.env.ACC_CLOUD) {
484
- // reject for now since the Azure Cloud Shell does not support user-managed identity
485
- return Promise.reject('Azure Cloud Shell does not support user-managed identity. You can execute the command without the --userName option to login with user identity');
486
- }
487
- requestOptions.url = `${process.env.IDENTITY_ENDPOINT}?resource=${encodeURIComponent(resource)}`;
456
+ if (userName && process.env.ACC_CLOUD) {
457
+ // reject for now since the Azure Cloud Shell does not support user-managed identity
458
+ return Promise.reject('Azure Cloud Shell does not support user-managed identity. You can execute the command without the --userName option to login with user identity');
488
459
  }
489
- else if (process.env.MSI_ENDPOINT) {
490
- if (debug) {
491
- logger.logToStderr('MSI_ENDPOINT env variable found it is Azure Could Shell, but using the old names of the env variables...');
492
- }
493
- if (userName && process.env.ACC_CLOUD) {
494
- // reject for now since the Azure Cloud Shell does not support user-managed identity
495
- return Promise.reject('Azure Cloud Shell does not support user-managed identity. You can execute the command without the --userName option to login with user identity');
496
- }
497
- requestOptions.url = `${process.env.MSI_ENDPOINT}?resource=${encodeURIComponent(resource)}`;
460
+ requestOptions.url = `${process.env.IDENTITY_ENDPOINT}?resource=${encodeURIComponent(resource)}`;
461
+ }
462
+ else if (process.env.MSI_ENDPOINT) {
463
+ if (debug) {
464
+ await logger.logToStderr('MSI_ENDPOINT env variable found it is Azure Could Shell, but using the old names of the env variables...');
498
465
  }
499
- else {
500
- if (debug) {
501
- logger.logToStderr('IDENTITY_ENDPOINT and MSI_ENDPOINT env variables not found. Attempt to get Managed Identity token by using the Azure Virtual Machine API...');
502
- }
503
- requestOptions.url = `http://169.254.169.254/metadata/identity/oauth2/token?resource=${encodeURIComponent(resource)}&api-version=2018-02-01`;
466
+ if (userName && process.env.ACC_CLOUD) {
467
+ // reject for now since the Azure Cloud Shell does not support user-managed identity
468
+ return Promise.reject('Azure Cloud Shell does not support user-managed identity. You can execute the command without the --userName option to login with user identity');
504
469
  }
505
- if (userName) {
506
- // if name present then the identity is user-assigned managed identity
507
- // the name option in this case is either client_id or principal_id (object_id)
508
- // of the managed identity service principal
509
- requestOptions.url += `&client_id=${encodeURIComponent(userName)}`;
510
- if (debug) {
511
- logger.logToStderr('Wil try to get token using client_id param...');
512
- }
470
+ requestOptions.url = `${process.env.MSI_ENDPOINT}?resource=${encodeURIComponent(resource)}`;
471
+ }
472
+ else {
473
+ if (debug) {
474
+ await logger.logToStderr('IDENTITY_ENDPOINT and MSI_ENDPOINT env variables not found. Attempt to get Managed Identity token by using the Azure Virtual Machine API...');
475
+ }
476
+ requestOptions.url = `http://169.254.169.254/metadata/identity/oauth2/token?resource=${encodeURIComponent(resource)}&api-version=2018-02-01`;
477
+ }
478
+ if (userName) {
479
+ // if name present then the identity is user-assigned managed identity
480
+ // the name option in this case is either client_id or principal_id (object_id)
481
+ // of the managed identity service principal
482
+ requestOptions.url += `&client_id=${encodeURIComponent(userName)}`;
483
+ if (debug) {
484
+ await logger.logToStderr('Wil try to get token using client_id param...');
485
+ }
486
+ }
487
+ try {
488
+ const accessTokenResponse = await request.get(requestOptions);
489
+ return {
490
+ accessToken: accessTokenResponse.access_token,
491
+ expiresOn: new Date(parseInt(accessTokenResponse.expires_on) * 1000)
492
+ };
493
+ }
494
+ catch (e) {
495
+ if (!userName) {
496
+ throw e;
497
+ }
498
+ // since the userName option can be either client_id or principal_id (object_id)
499
+ // and the first attempt was using client_id
500
+ // now lets see if the api returned 'not found' response and
501
+ // try to get token using principal_id (object_id)
502
+ let isNotFoundResponse = false;
503
+ if (e.error && e.error.Message) {
504
+ // check if it is Azure Function api 'not found' response
505
+ isNotFoundResponse = (e.error.Message.indexOf("No Managed Identity found") !== -1);
506
+ }
507
+ else if (e.error && e.error.error_description) {
508
+ // check if it is Azure VM api 'not found' response
509
+ isNotFoundResponse = (e.error.error_description === "Identity not found");
510
+ }
511
+ if (!isNotFoundResponse) {
512
+ // it is not a 'not found' response then exit with error
513
+ throw e;
513
514
  }
515
+ if (debug) {
516
+ await logger.logToStderr('Wil try to get token using principal_id (also known as object_id) param ...');
517
+ }
518
+ requestOptions.url = requestOptions.url.replace('&client_id=', '&principal_id=');
519
+ requestOptions.headers['x-anonymous'] = true;
514
520
  try {
515
- const accessTokenResponse = yield request_1.default.get(requestOptions);
521
+ const accessTokenResponse = await request.get(requestOptions);
516
522
  return {
517
523
  accessToken: accessTokenResponse.access_token,
518
524
  expiresOn: new Date(parseInt(accessTokenResponse.expires_on) * 1000)
519
525
  };
520
526
  }
521
- catch (e) {
522
- if (!userName) {
523
- throw e;
524
- }
525
- // since the userName option can be either client_id or principal_id (object_id)
526
- // and the first attempt was using client_id
527
- // now lets see if the api returned 'not found' response and
528
- // try to get token using principal_id (object_id)
529
- let isNotFoundResponse = false;
530
- if (e.error && e.error.Message) {
531
- // check if it is Azure Function api 'not found' response
532
- isNotFoundResponse = (e.error.Message.indexOf("No Managed Identity found") !== -1);
533
- }
534
- else if (e.error && e.error.error_description) {
535
- // check if it is Azure VM api 'not found' response
536
- isNotFoundResponse = (e.error.error_description === "Identity not found");
537
- }
538
- if (!isNotFoundResponse) {
539
- // it is not a 'not found' response then exit with error
540
- throw e;
541
- }
542
- if (debug) {
543
- logger.logToStderr('Wil try to get token using principal_id (also known as object_id) param ...');
527
+ catch (err) {
528
+ // will give up and not try any further with the 'msi_res_id' (resource id) query string param
529
+ // since it does not work with the Azure Functions api, but just with the Azure VM api
530
+ if (err.error.code === 'EACCES') {
531
+ // the CLI does not know if managed identity is actually assigned when EACCES code thrown
532
+ // so show meaningful message since the raw error response could be misleading
533
+ return Promise.reject('Error while logging with Managed Identity. Please check if a Managed Identity is assigned to the current Azure resource.');
544
534
  }
545
- requestOptions.url = requestOptions.url.replace('&client_id=', '&principal_id=');
546
- requestOptions.headers['x-anonymous'] = true;
547
- try {
548
- const accessTokenResponse = yield request_1.default.get(requestOptions);
549
- return {
550
- accessToken: accessTokenResponse.access_token,
551
- expiresOn: new Date(parseInt(accessTokenResponse.expires_on) * 1000)
552
- };
553
- }
554
- catch (err) {
555
- // will give up and not try any further with the 'msi_res_id' (resource id) query string param
556
- // since it does not work with the Azure Functions api, but just with the Azure VM api
557
- if (err.error.code === 'EACCES') {
558
- // the CLI does not know if managed identity is actually assigned when EACCES code thrown
559
- // so show meaningful message since the raw error response could be misleading
560
- return Promise.reject('Error while logging with Managed Identity. Please check if a Managed Identity is assigned to the current Azure resource.');
561
- }
562
- else {
563
- throw err;
564
- }
535
+ else {
536
+ throw err;
565
537
  }
566
538
  }
567
- });
539
+ }
568
540
  }
569
- ensureAccessTokenWithSecret(resource, logger, debug) {
570
- return __awaiter(this, void 0, void 0, function* () {
571
- this.clientApplication = this.getConfidentialClient(logger, debug, undefined, undefined, this.service.secret);
572
- return this.clientApplication.acquireTokenByClientCredential({
573
- scopes: [`${resource}/.default`]
574
- });
541
+ async ensureAccessTokenWithSecret(resource, logger, debug) {
542
+ this.clientApplication = await this.getConfidentialClient(logger, debug, undefined, undefined, this.service.secret);
543
+ return this.clientApplication.acquireTokenByClientCredential({
544
+ scopes: [`${resource}/.default`]
575
545
  });
576
546
  }
577
- calculateThumbprint(certificate) {
578
- const nodeForge = require('node-forge');
547
+ async calculateThumbprint(certificate) {
548
+ const nodeForge = (await import('node-forge')).default;
579
549
  const { md, asn1, pki } = nodeForge;
580
550
  const messageDigest = md.sha1.create();
581
551
  messageDigest.update(asn1.toDer(pki.certificateToAsn1(certificate)).getBytes());
@@ -588,7 +558,8 @@ class Auth {
588
558
  resource = resource.substr(0, pos);
589
559
  }
590
560
  if (resource === 'https://api.bap.microsoft.com' ||
591
- resource === 'https://api.powerapps.com') {
561
+ resource === 'https://api.powerapps.com' ||
562
+ resource.endsWith('.api.bap.microsoft.com')) {
592
563
  resource = 'https://service.powerapps.com/';
593
564
  }
594
565
  if (resource === 'https://api.powerbi.com') {
@@ -598,32 +569,28 @@ class Auth {
598
569
  }
599
570
  return resource;
600
571
  }
601
- getServiceConnectionInfo() {
602
- return __awaiter(this, void 0, void 0, function* () {
603
- const tokenStorage = this.getTokenStorage();
604
- const json = yield tokenStorage.get();
605
- return JSON.parse(json);
606
- });
572
+ async getServiceConnectionInfo() {
573
+ const tokenStorage = this.getTokenStorage();
574
+ const json = await tokenStorage.get();
575
+ return JSON.parse(json);
607
576
  }
608
577
  storeConnectionInfo() {
609
578
  const tokenStorage = this.getTokenStorage();
610
579
  return tokenStorage.set(JSON.stringify(this.service));
611
580
  }
612
- clearConnectionInfo() {
613
- return __awaiter(this, void 0, void 0, function* () {
614
- const tokenStorage = this.getTokenStorage();
615
- yield tokenStorage.remove();
616
- // we need to manually clear MSAL cache, because MSAL doesn't have support
617
- // for logging out when using cert-based auth
618
- const msalCache = this.getMsalCacheStorage();
619
- yield msalCache.remove();
620
- });
581
+ async clearConnectionInfo() {
582
+ const tokenStorage = this.getTokenStorage();
583
+ await tokenStorage.remove();
584
+ // we need to manually clear MSAL cache, because MSAL doesn't have support
585
+ // for logging out when using cert-based auth
586
+ const msalCache = this.getMsalCacheStorage();
587
+ await msalCache.remove();
621
588
  }
622
589
  getTokenStorage() {
623
- return new FileTokenStorage_1.FileTokenStorage(FileTokenStorage_1.FileTokenStorage.connectionInfoFilePath());
590
+ return new FileTokenStorage(FileTokenStorage.connectionInfoFilePath());
624
591
  }
625
592
  getMsalCacheStorage() {
626
- return new FileTokenStorage_1.FileTokenStorage(FileTokenStorage_1.FileTokenStorage.msalCacheFilePath());
593
+ return new FileTokenStorage(FileTokenStorage.msalCacheFilePath());
627
594
  }
628
595
  static getEndpointForResource(resource, cloudType) {
629
596
  if (Auth.cloudEndpoints[cloudType] &&
@@ -635,8 +602,7 @@ class Auth {
635
602
  }
636
603
  }
637
604
  }
638
- exports.Auth = Auth;
639
605
  Auth.cloudEndpoints = [];
640
606
  Auth.initialize();
641
- exports.default = new Auth();
607
+ export default new Auth();
642
608
  //# sourceMappingURL=Auth.js.map