@pnp/cli-microsoft365 6.7.0 → 6.8.0-beta.00c3a00

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 (267) hide show
  1. package/.eslintrc.js +2 -0
  2. package/.mocharc.json +1 -0
  3. package/README.md +6 -1
  4. package/dist/Command.js +6 -0
  5. package/dist/chili/chili.js +298 -0
  6. package/dist/chili/index.js +20 -0
  7. package/dist/cli/Cli.js +2 -2
  8. package/dist/m365/aad/commands/user/user-add.js +30 -21
  9. package/dist/m365/app/commands/permission/permission-add.js +279 -0
  10. package/dist/m365/app/commands.js +1 -0
  11. package/dist/m365/commands/commands.js +2 -0
  12. package/dist/m365/commands/docs.js +42 -0
  13. package/dist/m365/commands/login.js +1 -1
  14. package/dist/m365/commands/setup.js +180 -0
  15. package/dist/m365/commands/setupPresets.js +25 -0
  16. package/dist/m365/pa/commands/app/app-consent-set.js +101 -0
  17. package/dist/m365/pa/commands.js +1 -0
  18. package/dist/m365/planner/commands/roster/roster-plan-list.js +102 -0
  19. package/dist/m365/planner/commands.js +1 -0
  20. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-get.js +97 -0
  21. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-list.js +85 -0
  22. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-policysettings-list.js +89 -0
  23. package/dist/m365/purview/commands.js +3 -0
  24. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +2 -0
  25. package/dist/m365/spfx/commands/spfx-doctor.js +14 -30
  26. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +146 -0
  27. package/dist/m365/spo/commands/file/file-checkin.js +8 -3
  28. package/dist/m365/spo/commands/file/file-checkout.js +8 -3
  29. package/dist/m365/spo/commands/file/file-copy.js +4 -4
  30. package/dist/m365/spo/commands/file/file-get.js +3 -1
  31. package/dist/m365/spo/commands/file/file-list.js +17 -6
  32. package/dist/m365/spo/commands/file/file-move.js +6 -7
  33. package/dist/m365/spo/commands/file/file-remove.js +6 -12
  34. package/dist/m365/spo/commands/file/file-rename.js +3 -3
  35. package/dist/m365/spo/commands/file/file-roleassignment-add.js +2 -1
  36. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -3
  37. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -1
  38. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -1
  39. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -2
  40. package/dist/m365/spo/commands/file/file-version-clear.js +3 -1
  41. package/dist/m365/spo/commands/file/file-version-get.js +3 -1
  42. package/dist/m365/spo/commands/file/file-version-remove.js +3 -1
  43. package/dist/m365/spo/commands/file/file-version-restore.js +3 -1
  44. package/dist/m365/spo/commands/folder/folder-copy.js +4 -4
  45. package/dist/m365/spo/commands/folder/folder-get.js +5 -2
  46. package/dist/m365/spo/commands/folder/folder-move.js +3 -2
  47. package/dist/m365/spo/commands/folder/folder-rename.js +5 -2
  48. package/dist/m365/spo/commands/list/list-get.js +30 -3
  49. package/dist/m365/spo/commands/list/list-list.js +39 -2
  50. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +308 -0
  51. package/dist/m365/spo/commands/page/page-section-add.js +2 -3
  52. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +46 -1
  53. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +119 -0
  54. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +106 -0
  55. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +30 -39
  56. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +47 -0
  57. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +151 -0
  58. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +152 -0
  59. package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +203 -0
  60. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -0
  61. package/dist/m365/spo/commands/term/term-add.js +13 -4
  62. package/dist/m365/spo/commands/term/term-get.js +14 -5
  63. package/dist/m365/spo/commands/term/term-group-get.js +12 -3
  64. package/dist/m365/spo/commands/term/term-group-list.js +39 -4
  65. package/dist/m365/spo/commands/term/term-list.js +18 -9
  66. package/dist/m365/spo/commands/term/term-set-add.js +13 -4
  67. package/dist/m365/spo/commands/term/term-set-get.js +12 -3
  68. package/dist/m365/spo/commands/term/term-set-list.js +12 -3
  69. package/dist/m365/spo/commands.js +9 -0
  70. package/dist/m365/teams/commands/chat/chat-member-remove.js +137 -0
  71. package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +124 -0
  72. package/dist/m365/teams/commands.js +2 -0
  73. package/dist/utils/formatting.js +35 -11
  74. package/dist/utils/pid.js +5 -0
  75. package/dist/utils/spo.js +1 -1
  76. package/docs/docs/cmd/aad/o365group/o365group-get.md +0 -12
  77. package/docs/docs/cmd/aad/user/user-add.md +4 -0
  78. package/docs/docs/cmd/aad/user/user-set.md +2 -2
  79. package/docs/docs/cmd/app/permission/permission-add.md +53 -0
  80. package/docs/docs/cmd/cli/cli-consent.md +6 -0
  81. package/docs/docs/cmd/cli/cli-doctor.md +17 -0
  82. package/docs/docs/cmd/cli/cli-issue.md +6 -0
  83. package/docs/docs/cmd/cli/cli-reconsent.md +6 -0
  84. package/docs/docs/cmd/cli/completion/completion-sh-setup.md +6 -0
  85. package/docs/docs/cmd/cli/config/config-get.md +6 -0
  86. package/docs/docs/cmd/docs.md +51 -0
  87. package/docs/docs/cmd/flow/environment/environment-list.md +18 -0
  88. package/docs/docs/cmd/flow/flow-get.md +20 -0
  89. package/docs/docs/cmd/flow/flow-list.md +17 -0
  90. package/docs/docs/cmd/graph/changelog/changelog-list.md +52 -0
  91. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.md +61 -0
  92. package/docs/docs/cmd/graph/schemaextension/schemaextension-get.md +61 -0
  93. package/docs/docs/cmd/graph/schemaextension/schemaextension-list.md +61 -0
  94. package/docs/docs/cmd/graph/schemaextension/schemaextension-remove.md +4 -0
  95. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.md +4 -0
  96. package/docs/docs/cmd/graph/subscription/subscription-add.md +73 -0
  97. package/docs/docs/cmd/login.md +1 -1
  98. package/docs/docs/cmd/onedrive/onedrive-list.md +225 -0
  99. package/docs/docs/cmd/onedrive/report/report-activityfilecounts.md +39 -0
  100. package/docs/docs/cmd/onedrive/report/report-activityusercounts.md +39 -0
  101. package/docs/docs/cmd/onedrive/report/report-activityuserdetail.md +43 -0
  102. package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.md +38 -0
  103. package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.md +43 -0
  104. package/docs/docs/cmd/onedrive/report/report-usagefilecounts.md +38 -0
  105. package/docs/docs/cmd/onedrive/report/report-usagestorage.md +37 -0
  106. package/docs/docs/cmd/onenote/notebook/notebook-list.md +79 -0
  107. package/docs/docs/cmd/pa/app/app-consent-set.md +47 -0
  108. package/docs/docs/cmd/planner/plan/plan-get.md +1 -1
  109. package/docs/docs/cmd/planner/plan/plan-list.md +1 -1
  110. package/docs/docs/cmd/planner/roster/roster-add.md +2 -1
  111. package/docs/docs/cmd/planner/roster/roster-get.md +1 -1
  112. package/docs/docs/cmd/planner/roster/roster-plan-list.md +109 -0
  113. package/docs/docs/cmd/planner/roster/roster-remove.md +2 -1
  114. package/docs/docs/cmd/planner/task/task-get.md +0 -6
  115. package/docs/docs/cmd/planner/task/task-set.md +1 -1
  116. package/docs/docs/cmd/purview/retentionevent/retentionevent-add.md +6 -7
  117. package/docs/docs/cmd/purview/retentionevent/retentionevent-get.md +6 -7
  118. package/docs/docs/cmd/purview/retentionevent/retentionevent-list.md +4 -4
  119. package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.md +4 -4
  120. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.md +10 -10
  121. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.md +11 -11
  122. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.md +10 -10
  123. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.md +10 -10
  124. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.md +10 -10
  125. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.md +12 -12
  126. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.md +8 -9
  127. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.md +8 -9
  128. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.md +8 -8
  129. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +8 -8
  130. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.md +118 -0
  131. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.md +111 -0
  132. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.md +97 -0
  133. package/docs/docs/cmd/search/externalconnection/externalconnection-get.md +17 -0
  134. package/docs/docs/cmd/search/externalconnection/externalconnection-list.md +17 -0
  135. package/docs/docs/cmd/setup.md +86 -0
  136. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.md +1 -1
  137. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-remove.md +77 -0
  138. package/docs/docs/cmd/spo/commandset/commandset-set.md +1 -1
  139. package/docs/docs/cmd/spo/contenttype/contenttype-set.md +2 -2
  140. package/docs/docs/cmd/spo/customaction/customaction-add.md +1 -1
  141. package/docs/docs/cmd/spo/customaction/customaction-set.md +1 -1
  142. package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
  143. package/docs/docs/cmd/spo/file/file-add.md +1 -1
  144. package/docs/docs/cmd/spo/file/file-checkin.md +1 -1
  145. package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
  146. package/docs/docs/cmd/spo/file/file-copy.md +1 -1
  147. package/docs/docs/cmd/spo/file/file-get.md +1 -1
  148. package/docs/docs/cmd/spo/file/file-list.md +9 -6
  149. package/docs/docs/cmd/spo/file/file-move.md +3 -3
  150. package/docs/docs/cmd/spo/file/file-remove.md +12 -0
  151. package/docs/docs/cmd/spo/file/file-rename.md +1 -1
  152. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.md +3 -3
  153. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.md +2 -2
  154. package/docs/docs/cmd/spo/file/file-roleassignment-add.md +1 -1
  155. package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +1 -1
  156. package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +1 -1
  157. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.md +1 -1
  158. package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +1 -1
  159. package/docs/docs/cmd/spo/file/file-sharinglink-add.md +1 -1
  160. package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +1 -1
  161. package/docs/docs/cmd/spo/file/file-sharinglink-get.md +1 -1
  162. package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
  163. package/docs/docs/cmd/spo/file/file-sharinglink-remove.md +1 -1
  164. package/docs/docs/cmd/spo/file/file-sharinglink-set.md +1 -1
  165. package/docs/docs/cmd/spo/file/file-version-clear.md +2 -2
  166. package/docs/docs/cmd/spo/file/file-version-get.md +1 -1
  167. package/docs/docs/cmd/spo/file/file-version-list.md +1 -1
  168. package/docs/docs/cmd/spo/file/file-version-remove.md +1 -1
  169. package/docs/docs/cmd/spo/file/file-version-restore.md +1 -1
  170. package/docs/docs/cmd/spo/folder/folder-add.md +9 -3
  171. package/docs/docs/cmd/spo/folder/folder-copy.md +2 -2
  172. package/docs/docs/cmd/spo/folder/folder-get.md +7 -7
  173. package/docs/docs/cmd/spo/folder/folder-list.md +11 -11
  174. package/docs/docs/cmd/spo/folder/folder-move.md +1 -1
  175. package/docs/docs/cmd/spo/folder/folder-remove.md +7 -7
  176. package/docs/docs/cmd/spo/folder/folder-rename.md +11 -5
  177. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.md +3 -3
  178. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.md +1 -1
  179. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +1 -1
  180. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +4 -4
  181. package/docs/docs/cmd/spo/list/list-get.md +10 -0
  182. package/docs/docs/cmd/spo/list/list-list.md +28 -0
  183. package/docs/docs/cmd/spo/listitem/listitem-batch-set.md +67 -0
  184. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.md +19 -0
  185. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.md +12 -0
  186. package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.md +6 -0
  187. package/docs/docs/cmd/spo/page/page-column-get.md +15 -0
  188. package/docs/docs/cmd/spo/page/page-column-list.md +16 -0
  189. package/docs/docs/cmd/spo/page/page-control-get.md +18 -0
  190. package/docs/docs/cmd/spo/page/page-control-list.md +18 -0
  191. package/docs/docs/cmd/spo/page/page-copy.md +35 -0
  192. package/docs/docs/cmd/spo/page/page-get.md +39 -0
  193. package/docs/docs/cmd/spo/page/page-list.md +53 -0
  194. package/docs/docs/cmd/spo/page/page-section-get.md +12 -0
  195. package/docs/docs/cmd/spo/page/page-section-list.md +13 -0
  196. package/docs/docs/cmd/spo/page/page-template-list.md +31 -0
  197. package/docs/docs/cmd/spo/propertybag/propertybag-get.md +6 -0
  198. package/docs/docs/cmd/spo/propertybag/propertybag-list.md +13 -0
  199. package/docs/docs/cmd/spo/report/report-activityfilecounts.md +7 -0
  200. package/docs/docs/cmd/spo/report/report-activitypages.md +7 -0
  201. package/docs/docs/cmd/spo/report/report-activityusercounts.md +7 -0
  202. package/docs/docs/cmd/spo/report/report-activityuserdetail.md +7 -0
  203. package/docs/docs/cmd/spo/report/report-siteusagedetail.md +7 -0
  204. package/docs/docs/cmd/spo/report/report-siteusagefilecounts.md +7 -0
  205. package/docs/docs/cmd/spo/report/report-siteusagepages.md +7 -0
  206. package/docs/docs/cmd/spo/report/report-siteusagesitecounts.md +7 -0
  207. package/docs/docs/cmd/spo/report/report-siteusagestorage.md +7 -0
  208. package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +20 -0
  209. package/docs/docs/cmd/spo/roledefinition/roledefinition-list.md +20 -0
  210. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-add.md +20 -0
  211. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.md +18 -0
  212. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +20 -0
  213. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-list.md +17 -0
  214. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-set.md +13 -0
  215. package/docs/docs/cmd/spo/site/site-recyclebinitem-move.md +43 -0
  216. package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.md +45 -0
  217. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.md +1 -1
  218. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.md +103 -0
  219. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.md +49 -0
  220. package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.md +49 -0
  221. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.md +57 -0
  222. package/docs/docs/cmd/spo/tenant/tenant-settings-set.md +57 -54
  223. package/docs/docs/cmd/spo/term/term-add.md +107 -6
  224. package/docs/docs/cmd/spo/term/term-get.md +111 -10
  225. package/docs/docs/cmd/spo/term/term-group-get.md +71 -5
  226. package/docs/docs/cmd/spo/term/term-group-list.md +70 -2
  227. package/docs/docs/cmd/spo/term/term-list.md +80 -8
  228. package/docs/docs/cmd/spo/term/term-set-add.md +95 -11
  229. package/docs/docs/cmd/spo/term/term-set-get.md +92 -8
  230. package/docs/docs/cmd/spo/term/term-set-list.md +85 -5
  231. package/docs/docs/cmd/teams/app/app-list.md +17 -0
  232. package/docs/docs/cmd/teams/app/app-publish.md +18 -1
  233. package/docs/docs/cmd/teams/channel/channel-add.md +20 -0
  234. package/docs/docs/cmd/teams/channel/channel-get.md +21 -0
  235. package/docs/docs/cmd/teams/channel/channel-list.md +21 -0
  236. package/docs/docs/cmd/teams/channel/channel-member-list.md +20 -0
  237. package/docs/docs/cmd/teams/channel/channel-member-set.md +21 -0
  238. package/docs/docs/cmd/teams/chat/chat-get.md +22 -0
  239. package/docs/docs/cmd/teams/chat/chat-list.md +22 -0
  240. package/docs/docs/cmd/teams/chat/chat-member-list.md +20 -0
  241. package/docs/docs/cmd/teams/chat/chat-member-remove.md +52 -0
  242. package/docs/docs/cmd/teams/chat/chat-message-list.md +23 -0
  243. package/docs/docs/cmd/teams/funsettings/funsettings-list.md +15 -0
  244. package/docs/docs/cmd/teams/guestsettings/guestsettings-list.md +13 -0
  245. package/docs/docs/cmd/teams/meeting/meeting-transcript-list.md +96 -0
  246. package/docs/docs/cmd/teams/membersettings/membersettings-list.md +17 -0
  247. package/docs/docs/cmd/teams/tab/tab-remove.md +1 -1
  248. package/docs/docs/cmd/version.md +1 -1
  249. package/docs/docs/cmd/yammer/group/group-list.md +42 -0
  250. package/docs/docs/cmd/yammer/message/message-add.md +32 -0
  251. package/docs/docs/cmd/yammer/message/message-get.md +32 -0
  252. package/docs/docs/cmd/yammer/message/message-list.md +34 -0
  253. package/docs/docs/cmd/yammer/network/network-list.md +70 -0
  254. package/docs/docs/cmd/yammer/report/report-activitycounts.md +7 -0
  255. package/docs/docs/cmd/yammer/report/report-activityusercounts.md +7 -0
  256. package/docs/docs/cmd/yammer/report/report-activityuserdetail.md +7 -0
  257. package/docs/docs/cmd/yammer/report/report-deviceusagedistributionusercounts.md +7 -0
  258. package/docs/docs/cmd/yammer/report/report-deviceusageusercounts.md +7 -0
  259. package/docs/docs/cmd/yammer/report/report-deviceusageuserdetail.md +7 -0
  260. package/docs/docs/cmd/yammer/report/report-groupsactivitycounts.md +7 -0
  261. package/docs/docs/cmd/yammer/report/report-groupsactivitydetail.md +7 -0
  262. package/docs/docs/cmd/yammer/report/report-groupsactivitygroupcounts.md +7 -0
  263. package/docs/docs/cmd/yammer/user/user-get.md +55 -0
  264. package/docs/docs/cmd/yammer/user/user-list.md +55 -0
  265. package/docs/docs/cmd/yammer/yammer-search.md +15 -3
  266. package/npm-shrinkwrap.json +269 -336
  267. package/package.json +15 -13
@@ -0,0 +1,102 @@
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
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _PlannerRosterPlanListCommand_instances, _PlannerRosterPlanListCommand_initTelemetry, _PlannerRosterPlanListCommand_initOptions, _PlannerRosterPlanListCommand_initValidators, _PlannerRosterPlanListCommand_initOptionSets;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Auth_1 = require("../../../../Auth");
19
+ const GraphCommand_1 = require("../../../base/GraphCommand");
20
+ const commands_1 = require("../../commands");
21
+ const validation_1 = require("../../../../utils/validation");
22
+ const accessToken_1 = require("../../../../utils/accessToken");
23
+ const odata_1 = require("../../../../utils/odata");
24
+ class PlannerRosterPlanListCommand extends GraphCommand_1.default {
25
+ get name() {
26
+ return commands_1.default.ROSTER_PLAN_LIST;
27
+ }
28
+ get description() {
29
+ return 'Lists all Microsoft Planner Roster plans for a specific user';
30
+ }
31
+ constructor() {
32
+ super();
33
+ _PlannerRosterPlanListCommand_instances.add(this);
34
+ __classPrivateFieldGet(this, _PlannerRosterPlanListCommand_instances, "m", _PlannerRosterPlanListCommand_initTelemetry).call(this);
35
+ __classPrivateFieldGet(this, _PlannerRosterPlanListCommand_instances, "m", _PlannerRosterPlanListCommand_initOptions).call(this);
36
+ __classPrivateFieldGet(this, _PlannerRosterPlanListCommand_instances, "m", _PlannerRosterPlanListCommand_initValidators).call(this);
37
+ __classPrivateFieldGet(this, _PlannerRosterPlanListCommand_instances, "m", _PlannerRosterPlanListCommand_initOptionSets).call(this);
38
+ }
39
+ defaultProperties() {
40
+ return ['id', 'title', 'createdDateTime', 'owner'];
41
+ }
42
+ commandAction(logger, args) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken);
45
+ if (isAppOnlyAccessToken && !args.options.userId && !args.options.userName) {
46
+ this.handleError(`Specify at least 'userId' or 'userName' when using application permissions.`);
47
+ }
48
+ else if (!isAppOnlyAccessToken && (args.options.userId || args.options.userName)) {
49
+ this.handleError(`The options 'userId' or 'userName' cannot be used when obtaining Microsoft Planner Roster plans using delegated permissions.`);
50
+ }
51
+ if (this.verbose) {
52
+ logger.logToStderr(`Retrieving Microsoft Planner Roster plans for user: ${args.options.userId || args.options.userName || 'current user'}.`);
53
+ }
54
+ let requestUrl = `${this.resource}/beta/`;
55
+ if (args.options.userId || args.options.userName) {
56
+ requestUrl += `users/${args.options.userId || args.options.userName}`;
57
+ }
58
+ else {
59
+ requestUrl += 'me';
60
+ }
61
+ requestUrl += `/planner/rosterPlans`;
62
+ try {
63
+ const items = yield odata_1.odata.getAllItems(requestUrl);
64
+ logger.log(items);
65
+ }
66
+ catch (err) {
67
+ this.handleRejectedODataJsonPromise(err);
68
+ }
69
+ });
70
+ }
71
+ }
72
+ _PlannerRosterPlanListCommand_instances = new WeakSet(), _PlannerRosterPlanListCommand_initTelemetry = function _PlannerRosterPlanListCommand_initTelemetry() {
73
+ this.telemetry.push((args) => {
74
+ Object.assign(this.telemetryProperties, {
75
+ userId: typeof args.options.userId !== 'undefined',
76
+ userName: typeof args.options.userName !== 'undefined'
77
+ });
78
+ });
79
+ }, _PlannerRosterPlanListCommand_initOptions = function _PlannerRosterPlanListCommand_initOptions() {
80
+ this.options.unshift({
81
+ option: '--userId [userId]'
82
+ }, {
83
+ option: '--userName [userName]'
84
+ });
85
+ }, _PlannerRosterPlanListCommand_initValidators = function _PlannerRosterPlanListCommand_initValidators() {
86
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
87
+ if (args.options.userId && !validation_1.validation.isValidGuid(args.options.userId)) {
88
+ return `${args.options.userId} is not a valid GUID`;
89
+ }
90
+ if (args.options.userName && !validation_1.validation.isValidUserPrincipalName(args.options.userName)) {
91
+ return `${args.options.userName} is not a valid user principal name (UPN)`;
92
+ }
93
+ return true;
94
+ }));
95
+ }, _PlannerRosterPlanListCommand_initOptionSets = function _PlannerRosterPlanListCommand_initOptionSets() {
96
+ this.optionSets.push({
97
+ options: ['userId', 'userName'],
98
+ runsWhen: (args) => args.options.userId || args.options.userName
99
+ });
100
+ };
101
+ module.exports = new PlannerRosterPlanListCommand();
102
+ //# sourceMappingURL=roster-plan-list.js.map
@@ -18,6 +18,7 @@ exports.default = {
18
18
  ROSTER_MEMBER_GET: `${prefix} roster member get`,
19
19
  ROSTER_MEMBER_LIST: `${prefix} roster member list`,
20
20
  ROSTER_MEMBER_REMOVE: `${prefix} roster member remove`,
21
+ ROSTER_PLAN_LIST: `${prefix} roster plan list`,
21
22
  ROSTER_REMOVE: `${prefix} roster remove`,
22
23
  TASK_ADD: `${prefix} task add`,
23
24
  TASK_CHECKLISTITEM_ADD: `${prefix} task checklistitem add`,
@@ -0,0 +1,97 @@
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
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _PurviewSensitivityLabelGetCommand_instances, _PurviewSensitivityLabelGetCommand_initTelemetry, _PurviewSensitivityLabelGetCommand_initOptions, _PurviewSensitivityLabelGetCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Auth_1 = require("../../../../Auth");
19
+ const GraphCommand_1 = require("../../../base/GraphCommand");
20
+ const commands_1 = require("../../commands");
21
+ const request_1 = require("../../../../request");
22
+ const validation_1 = require("../../../../utils/validation");
23
+ const accessToken_1 = require("../../../../utils/accessToken");
24
+ class PurviewSensitivityLabelGetCommand extends GraphCommand_1.default {
25
+ get name() {
26
+ return commands_1.default.SENSITIVITYLABEL_GET;
27
+ }
28
+ get description() {
29
+ return 'Retrieve the specified sensitivity label';
30
+ }
31
+ constructor() {
32
+ super();
33
+ _PurviewSensitivityLabelGetCommand_instances.add(this);
34
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelGetCommand_instances, "m", _PurviewSensitivityLabelGetCommand_initTelemetry).call(this);
35
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelGetCommand_instances, "m", _PurviewSensitivityLabelGetCommand_initOptions).call(this);
36
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelGetCommand_instances, "m", _PurviewSensitivityLabelGetCommand_initValidators).call(this);
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken);
41
+ if (isAppOnlyAccessToken && !args.options.userId && !args.options.userName) {
42
+ this.handleError(`Specify at least 'userId' or 'userName' when using application permissions.`);
43
+ }
44
+ if (this.verbose) {
45
+ logger.logToStderr(`Retrieving sensitivity label with id ${args.options.id}`);
46
+ }
47
+ const requestUrl = args.options.userId || args.options.userName
48
+ ? `${this.resource}/beta/users/${args.options.userId || args.options.userName}/security/informationProtection/sensitivityLabels/${args.options.id}`
49
+ : `${this.resource}/beta/me/security/informationProtection/sensitivityLabels/${args.options.id}`;
50
+ const requestOptions = {
51
+ url: requestUrl,
52
+ headers: {
53
+ accept: 'application/json;odata.metadata=none'
54
+ },
55
+ responseType: 'json'
56
+ };
57
+ try {
58
+ const res = yield request_1.default.get(requestOptions);
59
+ logger.log(res);
60
+ }
61
+ catch (err) {
62
+ this.handleRejectedODataJsonPromise(err);
63
+ }
64
+ });
65
+ }
66
+ }
67
+ _PurviewSensitivityLabelGetCommand_instances = new WeakSet(), _PurviewSensitivityLabelGetCommand_initTelemetry = function _PurviewSensitivityLabelGetCommand_initTelemetry() {
68
+ this.telemetry.push((args) => {
69
+ Object.assign(this.telemetryProperties, {
70
+ userId: typeof args.options.userId !== 'undefined',
71
+ userName: typeof args.options.userName !== 'undefined'
72
+ });
73
+ });
74
+ }, _PurviewSensitivityLabelGetCommand_initOptions = function _PurviewSensitivityLabelGetCommand_initOptions() {
75
+ this.options.unshift({
76
+ option: '-i, --id <id>'
77
+ }, {
78
+ option: '--userId [userId]'
79
+ }, {
80
+ option: '--userName [userName]'
81
+ });
82
+ }, _PurviewSensitivityLabelGetCommand_initValidators = function _PurviewSensitivityLabelGetCommand_initValidators() {
83
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
84
+ if (!validation_1.validation.isValidGuid(args.options.id)) {
85
+ return `'${args.options.id}' is not a valid GUID.`;
86
+ }
87
+ if (args.options.userId && !validation_1.validation.isValidGuid(args.options.userId)) {
88
+ return `${args.options.userId} is not a valid GUID`;
89
+ }
90
+ if (args.options.userName && !validation_1.validation.isValidUserPrincipalName(args.options.userName)) {
91
+ return `${args.options.userName} is not a valid user principal name (UPN)`;
92
+ }
93
+ return true;
94
+ }));
95
+ };
96
+ module.exports = new PurviewSensitivityLabelGetCommand();
97
+ //# sourceMappingURL=sensitivitylabel-get.js.map
@@ -0,0 +1,85 @@
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
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _PurviewSensitivityLabelListCommand_instances, _PurviewSensitivityLabelListCommand_initTelemetry, _PurviewSensitivityLabelListCommand_initOptions, _PurviewSensitivityLabelListCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Auth_1 = require("../../../../Auth");
19
+ const GraphCommand_1 = require("../../../base/GraphCommand");
20
+ const commands_1 = require("../../commands");
21
+ const validation_1 = require("../../../../utils/validation");
22
+ const accessToken_1 = require("../../../../utils/accessToken");
23
+ const odata_1 = require("../../../../utils/odata");
24
+ class PurviewSensitivityLabelListCommand extends GraphCommand_1.default {
25
+ get name() {
26
+ return commands_1.default.SENSITIVITYLABEL_LIST;
27
+ }
28
+ get description() {
29
+ return 'Get a list of sensitivity labels';
30
+ }
31
+ constructor() {
32
+ super();
33
+ _PurviewSensitivityLabelListCommand_instances.add(this);
34
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelListCommand_instances, "m", _PurviewSensitivityLabelListCommand_initTelemetry).call(this);
35
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelListCommand_instances, "m", _PurviewSensitivityLabelListCommand_initOptions).call(this);
36
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelListCommand_instances, "m", _PurviewSensitivityLabelListCommand_initValidators).call(this);
37
+ }
38
+ defaultProperties() {
39
+ return ['id', 'name', 'isActive'];
40
+ }
41
+ commandAction(logger, args) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken);
44
+ if (isAppOnlyAccessToken && !args.options.userId && !args.options.userName) {
45
+ this.handleError(`Specify at least 'userId' or 'userName' when using application permissions.`);
46
+ }
47
+ const requestUrl = args.options.userId || args.options.userName
48
+ ? `${this.resource}/beta/users/${args.options.userId || args.options.userName}/security/informationProtection/sensitivityLabels`
49
+ : `${this.resource}/beta/me/security/informationProtection/sensitivityLabels`;
50
+ try {
51
+ const items = yield odata_1.odata.getAllItems(requestUrl);
52
+ logger.log(items);
53
+ }
54
+ catch (err) {
55
+ this.handleRejectedODataJsonPromise(err);
56
+ }
57
+ });
58
+ }
59
+ }
60
+ _PurviewSensitivityLabelListCommand_instances = new WeakSet(), _PurviewSensitivityLabelListCommand_initTelemetry = function _PurviewSensitivityLabelListCommand_initTelemetry() {
61
+ this.telemetry.push((args) => {
62
+ Object.assign(this.telemetryProperties, {
63
+ userId: typeof args.options.userId !== 'undefined',
64
+ userName: typeof args.options.userName !== 'undefined'
65
+ });
66
+ });
67
+ }, _PurviewSensitivityLabelListCommand_initOptions = function _PurviewSensitivityLabelListCommand_initOptions() {
68
+ this.options.unshift({
69
+ option: '--userId [userId]'
70
+ }, {
71
+ option: '--userName [userName]'
72
+ });
73
+ }, _PurviewSensitivityLabelListCommand_initValidators = function _PurviewSensitivityLabelListCommand_initValidators() {
74
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
75
+ if (args.options.userId && !validation_1.validation.isValidGuid(args.options.userId)) {
76
+ return `${args.options.userId} is not a valid GUID`;
77
+ }
78
+ if (args.options.userName && !validation_1.validation.isValidUserPrincipalName(args.options.userName)) {
79
+ return `${args.options.userName} is not a valid user principal name (UPN)`;
80
+ }
81
+ return true;
82
+ }));
83
+ };
84
+ module.exports = new PurviewSensitivityLabelListCommand();
85
+ //# sourceMappingURL=sensitivitylabel-list.js.map
@@ -0,0 +1,89 @@
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
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _PurviewSensitivityLabelPolicySettingsListCommand_instances, _PurviewSensitivityLabelPolicySettingsListCommand_initTelemetry, _PurviewSensitivityLabelPolicySettingsListCommand_initOptions, _PurviewSensitivityLabelPolicySettingsListCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Auth_1 = require("../../../../Auth");
19
+ const GraphCommand_1 = require("../../../base/GraphCommand");
20
+ const commands_1 = require("../../commands");
21
+ const request_1 = require("../../../../request");
22
+ const validation_1 = require("../../../../utils/validation");
23
+ const accessToken_1 = require("../../../../utils/accessToken");
24
+ class PurviewSensitivityLabelPolicySettingsListCommand extends GraphCommand_1.default {
25
+ get name() {
26
+ return commands_1.default.SENSITIVITYLABEL_POLICYSETTINGS_LIST;
27
+ }
28
+ get description() {
29
+ return 'Get a list of policy settings for a sensitivity label';
30
+ }
31
+ constructor() {
32
+ super();
33
+ _PurviewSensitivityLabelPolicySettingsListCommand_instances.add(this);
34
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelPolicySettingsListCommand_instances, "m", _PurviewSensitivityLabelPolicySettingsListCommand_initTelemetry).call(this);
35
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelPolicySettingsListCommand_instances, "m", _PurviewSensitivityLabelPolicySettingsListCommand_initOptions).call(this);
36
+ __classPrivateFieldGet(this, _PurviewSensitivityLabelPolicySettingsListCommand_instances, "m", _PurviewSensitivityLabelPolicySettingsListCommand_initValidators).call(this);
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken);
41
+ if (isAppOnlyAccessToken && !args.options.userId && !args.options.userName) {
42
+ this.handleError(`Specify at least 'userId' or 'userName' when using application permissions.`);
43
+ }
44
+ const requestUrl = args.options.userId || args.options.userName
45
+ ? `${this.resource}/beta/users/${args.options.userId || args.options.userName}/security/informationProtection/labelPolicySettings`
46
+ : `${this.resource}/beta/me/security/informationProtection/labelPolicySettings`;
47
+ const requestOptions = {
48
+ url: requestUrl,
49
+ headers: {
50
+ accept: 'application/json;odata.metadata=none'
51
+ },
52
+ responseType: 'json'
53
+ };
54
+ try {
55
+ const res = yield request_1.default.get(requestOptions);
56
+ logger.log(res);
57
+ }
58
+ catch (err) {
59
+ this.handleRejectedODataJsonPromise(err);
60
+ }
61
+ });
62
+ }
63
+ }
64
+ _PurviewSensitivityLabelPolicySettingsListCommand_instances = new WeakSet(), _PurviewSensitivityLabelPolicySettingsListCommand_initTelemetry = function _PurviewSensitivityLabelPolicySettingsListCommand_initTelemetry() {
65
+ this.telemetry.push((args) => {
66
+ Object.assign(this.telemetryProperties, {
67
+ userId: typeof args.options.userId !== 'undefined',
68
+ userName: typeof args.options.userName !== 'undefined'
69
+ });
70
+ });
71
+ }, _PurviewSensitivityLabelPolicySettingsListCommand_initOptions = function _PurviewSensitivityLabelPolicySettingsListCommand_initOptions() {
72
+ this.options.unshift({
73
+ option: '--userId [userId]'
74
+ }, {
75
+ option: '--userName [userName]'
76
+ });
77
+ }, _PurviewSensitivityLabelPolicySettingsListCommand_initValidators = function _PurviewSensitivityLabelPolicySettingsListCommand_initValidators() {
78
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
79
+ if (args.options.userId && !validation_1.validation.isValidGuid(args.options.userId)) {
80
+ return `${args.options.userId} is not a valid GUID`;
81
+ }
82
+ if (args.options.userName && !validation_1.validation.isValidUserPrincipalName(args.options.userName)) {
83
+ return `${args.options.userName} is not a valid user principal name (UPN)`;
84
+ }
85
+ return true;
86
+ }));
87
+ };
88
+ module.exports = new PurviewSensitivityLabelPolicySettingsListCommand();
89
+ //# sourceMappingURL=sensitivitylabel-policysettings-list.js.map
@@ -17,6 +17,9 @@ exports.default = {
17
17
  RETENTIONLABEL_LIST: `${prefix} retentionlabel list`,
18
18
  RETENTIONLABEL_REMOVE: `${prefix} retentionlabel remove`,
19
19
  RETENTIONLABEL_SET: `${prefix} retentionlabel set`,
20
+ SENSITIVITYLABEL_GET: `${prefix} sensitivitylabel get`,
21
+ SENSITIVITYLABEL_LIST: `${prefix} sensitivitylabel list`,
22
+ SENSITIVITYLABEL_POLICYSETTINGS_LIST: `${prefix} sensitivitylabel policysettings list`,
20
23
  THREATASSESSMENT_GET: `${prefix} threatassessment get`
21
24
  };
22
25
  //# sourceMappingURL=commands.js.map
@@ -22,6 +22,7 @@ const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_m
22
22
  const FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1 = require("./rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base");
23
23
  const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
24
24
  const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
25
+ const FN002019_DEVDEP_spfx_fast_serve_helpers_1 = require("./rules/FN002019_DEVDEP_spfx_fast_serve_helpers");
25
26
  const FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1 = require("./rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx");
26
27
  const FN002023_DEVDEP_microsoft_eslint_config_spfx_1 = require("./rules/FN002023_DEVDEP_microsoft_eslint_config_spfx");
27
28
  const FN002026_DEVDEP_typescript_1 = require("./rules/FN002026_DEVDEP_typescript");
@@ -54,6 +55,7 @@ module.exports = [
54
55
  new FN002023_DEVDEP_microsoft_eslint_config_spfx_1.FN002023_DEVDEP_microsoft_eslint_config_spfx('1.15.2'),
55
56
  new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.2'),
56
57
  new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.2'),
58
+ new FN002019_DEVDEP_spfx_fast_serve_helpers_1.FN002019_DEVDEP_spfx_fast_serve_helpers('1.15.4'),
57
59
  new FN002026_DEVDEP_typescript_1.FN002026_DEVDEP_typescript('4.5.5'),
58
60
  new FN010001_YORC_version_1.FN010001_YORC_version('1.15.2'),
59
61
  new FN012020_TSC_noImplicitAny_1.FN012020_TSC_noImplicitAny(true),
@@ -15,19 +15,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
15
15
  };
16
16
  var _SpfxDoctorCommand_instances, _SpfxDoctorCommand_initTelemetry, _SpfxDoctorCommand_initOptions, _SpfxDoctorCommand_initValidators;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- const chalk = require("chalk");
19
18
  const child_process = require("child_process");
20
19
  const semver_1 = require("semver");
20
+ const formatting_1 = require("../../../utils/formatting");
21
21
  const commands_1 = require("../commands");
22
22
  const base_project_command_1 = require("./project/base-project-command");
23
- /**
24
- * Has the particular check passed or failed
25
- */
26
- var CheckStatus;
27
- (function (CheckStatus) {
28
- CheckStatus[CheckStatus["Success"] = 0] = "Success";
29
- CheckStatus[CheckStatus["Failure"] = 1] = "Failure";
30
- })(CheckStatus || (CheckStatus = {}));
31
23
  /**
32
24
  * Where to search for the particular npm package: only in the current project,
33
25
  * in global packages or both
@@ -520,12 +512,12 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
520
512
  try {
521
513
  spfxVersion = (_a = args.options.spfxVersion) !== null && _a !== void 0 ? _a : yield this.getSharePointFrameworkVersion(logger);
522
514
  if (!spfxVersion) {
523
- logger.log(this.getStatus(CheckStatus.Failure, `SharePoint Framework`));
515
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `SharePoint Framework`));
524
516
  throw `SharePoint Framework not found`;
525
517
  }
526
518
  prerequisites = this.versions[spfxVersion];
527
519
  if (!prerequisites) {
528
- logger.log(this.getStatus(CheckStatus.Failure, `SharePoint Framework v${spfxVersion}`));
520
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `SharePoint Framework v${spfxVersion}`));
529
521
  throw `spfx doctor doesn't support SPFx v${spfxVersion} at this moment`;
530
522
  }
531
523
  if (args.options.spfxVersion) {
@@ -533,7 +525,7 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
533
525
  }
534
526
  else {
535
527
  // spfx was detected and if we are here, it means that we support it
536
- logger.log(this.getStatus(CheckStatus.Success, `SharePoint Framework v${spfxVersion}`));
528
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Success, `SharePoint Framework v${spfxVersion}`));
537
529
  }
538
530
  yield this.checkSharePointCompatibility(spfxVersion, prerequisites, args, fixes, logger);
539
531
  yield this.checkNodeVersion(prerequisites, fixes, logger);
@@ -566,11 +558,11 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
566
558
  if (args.options.env) {
567
559
  const sp = this.spVersionStringToEnum(args.options.env);
568
560
  if ((prerequisites.sp & sp) === sp) {
569
- logger.log(this.getStatus(CheckStatus.Success, `Supported in ${SharePointVersion[sp]}`));
561
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Success, `Supported in ${SharePointVersion[sp]}`));
570
562
  resolve();
571
563
  }
572
564
  else {
573
- logger.log(this.getStatus(CheckStatus.Failure, `Not supported in ${SharePointVersion[sp]}`));
565
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `Not supported in ${SharePointVersion[sp]}`));
574
566
  fixes.push(`Use SharePoint Framework v${(sp === SharePointVersion.SP2016 ? '1.1' : '1.4.1')}`);
575
567
  reject(`SharePoint Framework v${spfxVersion} is not supported in ${SharePointVersion[sp]}`);
576
568
  }
@@ -601,7 +593,7 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
601
593
  this.checkStatus(`SharePoint Framework`, spfxVersionDetected, versionCheck, OptionalOrRequired.Required, fixes, logger);
602
594
  }
603
595
  else {
604
- logger.log(this.getStatus(CheckStatus.Failure, `SharePoint Framework v${spfxVersionRequested} not found`));
596
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `SharePoint Framework v${spfxVersionRequested} not found`));
605
597
  fixes.push(versionCheck.fix);
606
598
  }
607
599
  });
@@ -614,7 +606,7 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
614
606
  this.checkStatus('yo', yoVersion, prerequisites.yo, OptionalOrRequired.Required, fixes, logger);
615
607
  }
616
608
  else {
617
- logger.log(this.getStatus(CheckStatus.Failure, `yo not found`));
609
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `yo not found`));
618
610
  fixes.push(prerequisites.yo.fix);
619
611
  }
620
612
  });
@@ -627,7 +619,7 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
627
619
  this.checkStatus('gulp-cli', gulpCliVersion, prerequisites.gulpCli, OptionalOrRequired.Required, fixes, logger);
628
620
  }
629
621
  else {
630
- logger.log(this.getStatus(CheckStatus.Failure, `gulp-cli not found`));
622
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `gulp-cli not found`));
631
623
  fixes.push(prerequisites.gulpCli.fix);
632
624
  }
633
625
  });
@@ -637,7 +629,7 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
637
629
  .getPackageVersion('gulp', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger)
638
630
  .then((gulpVersion) => {
639
631
  if (gulpVersion) {
640
- logger.log(this.getStatus(CheckStatus.Failure, `gulp should be removed`));
632
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `gulp should be removed`));
641
633
  fixes.push('npm un -g gulp');
642
634
  }
643
635
  });
@@ -647,11 +639,11 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
647
639
  .getPackageVersion('typescript', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger)
648
640
  .then((typeScriptVersion) => {
649
641
  if (typeScriptVersion) {
650
- logger.log(this.getStatus(CheckStatus.Failure, `typescript v${typeScriptVersion} installed in the project`));
642
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `typescript v${typeScriptVersion} installed in the project`));
651
643
  fixes.push('npm un typescript');
652
644
  }
653
645
  else {
654
- logger.log(this.getStatus(CheckStatus.Success, `bundled typescript used`));
646
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Success, `bundled typescript used`));
655
647
  }
656
648
  });
657
649
  }
@@ -775,22 +767,14 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
775
767
  checkStatus(what, versionFound, versionCheck, optionalOrRequired, fixes, logger) {
776
768
  if (versionFound) {
777
769
  if ((0, semver_1.satisfies)(versionFound, versionCheck.range)) {
778
- logger.log(this.getStatus(CheckStatus.Success, `${what} v${versionFound}`));
770
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Success, `${what} v${versionFound}`));
779
771
  }
780
772
  else {
781
- logger.log(this.getStatus(CheckStatus.Failure, `${what} v${versionFound} found, v${versionCheck.range} required`));
773
+ logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `${what} v${versionFound} found, v${versionCheck.range} required`));
782
774
  fixes.push(versionCheck.fix);
783
775
  }
784
776
  }
785
777
  }
786
- getStatus(result, message) {
787
- const primarySupported = process.platform !== 'win32' ||
788
- process.env.CI === 'true' ||
789
- process.env.TERM === 'xterm-256color';
790
- const success = primarySupported ? '✔' : '√';
791
- const failure = primarySupported ? '✖' : '×';
792
- return `${result === CheckStatus.Success ? chalk.green(success) : chalk.red(failure)} ${message}`;
793
- }
794
778
  }
795
779
  _SpfxDoctorCommand_instances = new WeakSet(), _SpfxDoctorCommand_initTelemetry = function _SpfxDoctorCommand_initTelemetry() {
796
780
  this.telemetry.push((args) => {