@pnp/cli-microsoft365 7.0.0-beta.b7c2a8d → 7.0.0-beta.c0afb7b

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 (131) hide show
  1. package/.eslintrc.cjs +1 -3
  2. package/dist/GlobalOptions.js +1 -7
  3. package/dist/cli/Cli.js +19 -2
  4. package/dist/m365/aad/commands/{o365group/o365group-add.js → m365group/m365group-add.js} +17 -17
  5. package/dist/m365/aad/commands/{o365group/o365group-conversation-list.js → m365group/m365group-conversation-list.js} +10 -10
  6. package/dist/m365/aad/commands/{o365group/o365group-conversation-post-list.js → m365group/m365group-conversation-post-list.js} +14 -14
  7. package/dist/m365/aad/commands/{o365group/o365group-get.js → m365group/m365group-get.js} +13 -10
  8. package/dist/m365/aad/commands/{o365group/o365group-list.js → m365group/m365group-list.js} +13 -28
  9. package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-clear.js → m365group/m365group-recyclebinitem-clear.js} +15 -15
  10. package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-list.js → m365group/m365group-recyclebinitem-list.js} +10 -10
  11. package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-remove.js → m365group/m365group-recyclebinitem-remove.js} +14 -14
  12. package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-restore.js → m365group/m365group-recyclebinitem-restore.js} +14 -14
  13. package/dist/m365/aad/commands/{o365group/o365group-remove.js → m365group/m365group-remove.js} +12 -12
  14. package/dist/m365/aad/commands/{o365group/o365group-renew.js → m365group/m365group-renew.js} +10 -10
  15. package/dist/m365/aad/commands/{o365group/o365group-report-activitycounts.js → m365group/m365group-report-activitycounts.js} +4 -4
  16. package/dist/m365/aad/commands/{o365group/o365group-report-activitydetail.js → m365group/m365group-report-activitydetail.js} +4 -4
  17. package/dist/m365/aad/commands/{o365group/o365group-report-activityfilecounts.js → m365group/m365group-report-activityfilecounts.js} +4 -4
  18. package/dist/m365/aad/commands/{o365group/o365group-report-activitygroupcounts.js → m365group/m365group-report-activitygroupcounts.js} +4 -4
  19. package/dist/m365/aad/commands/{o365group/o365group-report-activitystorage.js → m365group/m365group-report-activitystorage.js} +4 -4
  20. package/dist/m365/aad/commands/{o365group/o365group-set.js → m365group/m365group-set.js} +17 -17
  21. package/dist/m365/aad/commands/{o365group/o365group-teamify.js → m365group/m365group-teamify.js} +14 -14
  22. package/dist/m365/aad/commands/{o365group/o365group-user-add.js → m365group/m365group-user-add.js} +14 -14
  23. package/dist/m365/aad/commands/{o365group/o365group-user-list.js → m365group/m365group-user-list.js} +12 -12
  24. package/dist/m365/aad/commands/{o365group/o365group-user-remove.js → m365group/m365group-user-remove.js} +14 -14
  25. package/dist/m365/aad/commands/{o365group/o365group-user-set.js → m365group/m365group-user-set.js} +15 -15
  26. package/dist/m365/aad/commands.js +22 -22
  27. package/dist/m365/pa/commands/app/app-permission-list.js +2 -2
  28. package/dist/m365/pa/commands/app/app-permission-remove.js +3 -3
  29. package/dist/m365/pa/commands.js +1 -4
  30. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.1.js → doctor-1.18.0-beta.5.js} +1 -1
  31. package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
  32. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
  33. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0-beta.5.js} +26 -26
  34. package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
  35. package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
  36. package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +27 -26
  37. package/dist/m365/spo/commands/app/app-add.js +9 -9
  38. package/dist/m365/spo/commands/file/file-copy.js +1 -1
  39. package/dist/m365/spo/commands/file/file-move.js +73 -97
  40. package/dist/m365/spo/commands/folder/folder-copy.js +89 -45
  41. package/dist/m365/spo/commands/folder/folder-move.js +89 -47
  42. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +32 -3
  43. package/dist/m365/spo/commands/page/clientsidepages.js +1 -81
  44. package/dist/m365/spo/commands/propertybag/propertybag-base.js +63 -59
  45. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +28 -31
  46. package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
  47. package/dist/m365/spo/commands/site/site-ensure.js +3 -3
  48. package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +22 -22
  49. package/dist/m365/spo/commands/site/site-list.js +27 -43
  50. package/dist/m365/spo/commands/site/site-set.js +60 -49
  51. package/dist/m365/spo/commands/theme/theme-list.js +1 -9
  52. package/dist/m365/spo/commands/theme/theme-remove.js +24 -24
  53. package/dist/m365/spo/commands/theme/theme-set.js +0 -1
  54. package/dist/m365/spo/commands/user/user-remove.js +27 -27
  55. package/dist/m365/spo/commands/web/web-reindex.js +35 -42
  56. package/dist/m365/spo/commands/web/web-remove.js +21 -21
  57. package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -31
  58. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +33 -44
  59. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +18 -18
  60. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +19 -19
  61. package/dist/m365/yammer/commands/message/message-like-set.js +27 -28
  62. package/dist/m365/yammer/commands/message/message-list.js +62 -81
  63. package/dist/m365/yammer/commands/message/message-remove.js +18 -18
  64. package/dist/m365/yammer/commands/yammer-search.js +53 -69
  65. package/dist/utils/spo.js +12 -53
  66. package/dist/utils/validation.js +0 -3
  67. package/docs/docs/cmd/aad/{o365group/o365group-add.mdx → m365group/m365group-add.mdx} +13 -13
  68. package/docs/docs/cmd/aad/{o365group/o365group-conversation-list.mdx → m365group/m365group-conversation-list.mdx} +4 -4
  69. package/docs/docs/cmd/aad/{o365group/o365group-conversation-post-list.mdx → m365group/m365group-conversation-post-list.mdx} +8 -8
  70. package/docs/docs/cmd/aad/{o365group/o365group-get.mdx → m365group/m365group-get.mdx} +6 -6
  71. package/docs/docs/cmd/aad/{o365group/o365group-list.mdx → m365group/m365group-list.mdx} +12 -29
  72. package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-clear.mdx → m365group/m365group-recyclebinitem-clear.mdx} +5 -5
  73. package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-list.mdx → m365group/m365group-recyclebinitem-list.mdx} +8 -8
  74. package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-remove.mdx → m365group/m365group-recyclebinitem-remove.mdx} +6 -6
  75. package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-restore.mdx → m365group/m365group-recyclebinitem-restore.mdx} +6 -6
  76. package/docs/docs/cmd/aad/{o365group/o365group-remove.mdx → m365group/m365group-remove.mdx} +6 -6
  77. package/docs/docs/cmd/aad/{o365group/o365group-renew.mdx → m365group/m365group-renew.mdx} +4 -4
  78. package/docs/docs/cmd/aad/{o365group/o365group-report-activitycounts.mdx → m365group/m365group-report-activitycounts.mdx} +6 -6
  79. package/docs/docs/cmd/aad/{o365group/o365group-report-activitydetail.mdx → m365group/m365group-report-activitydetail.mdx} +7 -7
  80. package/docs/docs/cmd/aad/{o365group/o365group-report-activityfilecounts.mdx → m365group/m365group-report-activityfilecounts.mdx} +6 -6
  81. package/docs/docs/cmd/aad/{o365group/o365group-report-activitygroupcounts.mdx → m365group/m365group-report-activitygroupcounts.mdx} +6 -6
  82. package/docs/docs/cmd/aad/{o365group/o365group-report-activitystorage.mdx → m365group/m365group-report-activitystorage.mdx} +6 -6
  83. package/docs/docs/cmd/aad/{o365group/o365group-set.mdx → m365group/m365group-set.mdx} +8 -8
  84. package/docs/docs/cmd/aad/{o365group/o365group-teamify.mdx → m365group/m365group-teamify.mdx} +5 -5
  85. package/docs/docs/cmd/aad/{o365group/o365group-user-add.mdx → m365group/m365group-user-add.mdx} +5 -5
  86. package/docs/docs/cmd/aad/{o365group/o365group-user-list.mdx → m365group/m365group-user-list.mdx} +7 -7
  87. package/docs/docs/cmd/aad/{o365group/o365group-user-remove.mdx → m365group/m365group-user-remove.mdx} +5 -5
  88. package/docs/docs/cmd/aad/{o365group/o365group-user-set.mdx → m365group/m365group-user-set.mdx} +5 -5
  89. package/docs/docs/cmd/pa/app/app-permission-remove.mdx +1 -1
  90. package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
  91. package/docs/docs/cmd/spo/file/file-move.mdx +36 -18
  92. package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
  93. package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
  94. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
  95. package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
  96. package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
  97. package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
  98. package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
  99. package/npm-shrinkwrap.json +178 -1304
  100. package/package.json +5 -7
  101. package/dist/m365/pa/cds-project-mutator.js +0 -91
  102. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/generated/ManifestTypes.d.ts +0 -11
  103. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_ControlManifest.Input.xml +0 -31
  104. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +0 -51
  105. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/generated/ManifestTypes.d.ts +0 -12
  106. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_ControlManifest.Input.xml +0 -37
  107. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +0 -48
  108. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/index.ts +0 -0
  109. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_ControlManifest.Input.xml +0 -31
  110. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_index.tsx +0 -58
  111. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_ControlManifest.Input.xml +0 -37
  112. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_index.tsx +0 -55
  113. package/dist/m365/pa/commands/pcf/pcf-init/assets/package.json +0 -19
  114. package/dist/m365/pa/commands/pcf/pcf-init/assets/pcfconfig.json +0 -3
  115. package/dist/m365/pa/commands/pcf/pcf-init/assets/template_.gitignore +0 -14
  116. package/dist/m365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj +0 -45
  117. package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +0 -2
  118. package/dist/m365/pa/commands/pcf/pcf-init.js +0 -120
  119. package/dist/m365/pa/commands/solution/solution-init/assets/Other/Customizations.xml +0 -18
  120. package/dist/m365/pa/commands/solution/solution-init/assets/Other/Relationships.xml +0 -2
  121. package/dist/m365/pa/commands/solution/solution-init/assets/Other/template_Solution.xml +0 -94
  122. package/dist/m365/pa/commands/solution/solution-init/assets/template_.gitignore +0 -2
  123. package/dist/m365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj +0 -44
  124. package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +0 -2
  125. package/dist/m365/pa/commands/solution/solution-init.js +0 -126
  126. package/dist/m365/pa/commands/solution/solution-reference-add.js +0 -88
  127. package/dist/m365/pa/template-instantiator.js +0 -57
  128. package/docs/docs/cmd/pa/pcf/pcf-init.mdx +0 -56
  129. package/docs/docs/cmd/pa/solution/solution-init.mdx +0 -46
  130. package/docs/docs/cmd/pa/solution/solution-reference-add.mdx +0 -42
  131. /package/dist/m365/aad/commands/{o365group → m365group}/GroupExtended.js +0 -0
@@ -3,24 +3,24 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  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");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadO365GroupUserListCommand_instances, _AadO365GroupUserListCommand_initTelemetry, _AadO365GroupUserListCommand_initOptions, _AadO365GroupUserListCommand_initValidators;
6
+ var _AadM365GroupUserListCommand_instances, _AadM365GroupUserListCommand_initTelemetry, _AadM365GroupUserListCommand_initOptions, _AadM365GroupUserListCommand_initValidators;
7
7
  import { odata } from '../../../../utils/odata.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from '../../../base/GraphCommand.js';
10
10
  import commands from '../../commands.js';
11
- class AadO365GroupUserListCommand extends GraphCommand {
11
+ class AadM365GroupUserListCommand extends GraphCommand {
12
12
  get name() {
13
- return commands.O365GROUP_USER_LIST;
13
+ return commands.M365GROUP_USER_LIST;
14
14
  }
15
15
  get description() {
16
16
  return "Lists users for the specified Microsoft 365 group";
17
17
  }
18
18
  constructor() {
19
19
  super();
20
- _AadO365GroupUserListCommand_instances.add(this);
21
- __classPrivateFieldGet(this, _AadO365GroupUserListCommand_instances, "m", _AadO365GroupUserListCommand_initTelemetry).call(this);
22
- __classPrivateFieldGet(this, _AadO365GroupUserListCommand_instances, "m", _AadO365GroupUserListCommand_initOptions).call(this);
23
- __classPrivateFieldGet(this, _AadO365GroupUserListCommand_instances, "m", _AadO365GroupUserListCommand_initValidators).call(this);
20
+ _AadM365GroupUserListCommand_instances.add(this);
21
+ __classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initTelemetry).call(this);
22
+ __classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initOptions).call(this);
23
+ __classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initValidators).call(this);
24
24
  }
25
25
  async commandAction(logger, args) {
26
26
  try {
@@ -59,20 +59,20 @@ class AadO365GroupUserListCommand extends GraphCommand {
59
59
  return await odata.getAllItems(endpoint);
60
60
  }
61
61
  }
62
- _AadO365GroupUserListCommand_instances = new WeakSet(), _AadO365GroupUserListCommand_initTelemetry = function _AadO365GroupUserListCommand_initTelemetry() {
62
+ _AadM365GroupUserListCommand_instances = new WeakSet(), _AadM365GroupUserListCommand_initTelemetry = function _AadM365GroupUserListCommand_initTelemetry() {
63
63
  this.telemetry.push((args) => {
64
64
  Object.assign(this.telemetryProperties, {
65
65
  role: args.options.role
66
66
  });
67
67
  });
68
- }, _AadO365GroupUserListCommand_initOptions = function _AadO365GroupUserListCommand_initOptions() {
68
+ }, _AadM365GroupUserListCommand_initOptions = function _AadM365GroupUserListCommand_initOptions() {
69
69
  this.options.unshift({
70
70
  option: "-i, --groupId <groupId>"
71
71
  }, {
72
72
  option: "-r, --role [type]",
73
73
  autocomplete: ["Owner", "Member", "Guest"]
74
74
  });
75
- }, _AadO365GroupUserListCommand_initValidators = function _AadO365GroupUserListCommand_initValidators() {
75
+ }, _AadM365GroupUserListCommand_initValidators = function _AadM365GroupUserListCommand_initValidators() {
76
76
  this.validators.push(async (args) => {
77
77
  if (!validation.isValidGuid(args.options.groupId)) {
78
78
  return `${args.options.groupId} is not a valid GUID`;
@@ -85,5 +85,5 @@ _AadO365GroupUserListCommand_instances = new WeakSet(), _AadO365GroupUserListCom
85
85
  return true;
86
86
  });
87
87
  };
88
- export default new AadO365GroupUserListCommand();
89
- //# sourceMappingURL=o365group-user-list.js.map
88
+ export default new AadM365GroupUserListCommand();
89
+ //# sourceMappingURL=m365group-user-list.js.map
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  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");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadO365GroupUserRemoveCommand_instances, _AadO365GroupUserRemoveCommand_initTelemetry, _AadO365GroupUserRemoveCommand_initOptions, _AadO365GroupUserRemoveCommand_initValidators, _AadO365GroupUserRemoveCommand_initOptionSets;
6
+ var _AadM365GroupUserRemoveCommand_instances, _AadM365GroupUserRemoveCommand_initTelemetry, _AadM365GroupUserRemoveCommand_initOptions, _AadM365GroupUserRemoveCommand_initValidators, _AadM365GroupUserRemoveCommand_initOptionSets;
7
7
  import { Cli } from '../../../../cli/Cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import { formatting } from '../../../../utils/formatting.js';
@@ -11,9 +11,9 @@ import { validation } from '../../../../utils/validation.js';
11
11
  import GraphCommand from '../../../base/GraphCommand.js';
12
12
  import teamsCommands from '../../../teams/commands.js';
13
13
  import commands from '../../commands.js';
14
- class AadO365GroupUserRemoveCommand extends GraphCommand {
14
+ class AadM365GroupUserRemoveCommand extends GraphCommand {
15
15
  get name() {
16
- return commands.O365GROUP_USER_REMOVE;
16
+ return commands.M365GROUP_USER_REMOVE;
17
17
  }
18
18
  get description() {
19
19
  return 'Removes the specified user from specified Microsoft 365 Group or Microsoft Teams team';
@@ -23,11 +23,11 @@ class AadO365GroupUserRemoveCommand extends GraphCommand {
23
23
  }
24
24
  constructor() {
25
25
  super();
26
- _AadO365GroupUserRemoveCommand_instances.add(this);
27
- __classPrivateFieldGet(this, _AadO365GroupUserRemoveCommand_instances, "m", _AadO365GroupUserRemoveCommand_initTelemetry).call(this);
28
- __classPrivateFieldGet(this, _AadO365GroupUserRemoveCommand_instances, "m", _AadO365GroupUserRemoveCommand_initOptions).call(this);
29
- __classPrivateFieldGet(this, _AadO365GroupUserRemoveCommand_instances, "m", _AadO365GroupUserRemoveCommand_initValidators).call(this);
30
- __classPrivateFieldGet(this, _AadO365GroupUserRemoveCommand_instances, "m", _AadO365GroupUserRemoveCommand_initOptionSets).call(this);
26
+ _AadM365GroupUserRemoveCommand_instances.add(this);
27
+ __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initTelemetry).call(this);
28
+ __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initOptions).call(this);
29
+ __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _AadM365GroupUserRemoveCommand_instances, "m", _AadM365GroupUserRemoveCommand_initOptionSets).call(this);
31
31
  }
32
32
  async commandAction(logger, args) {
33
33
  const groupId = (typeof args.options.groupId !== 'undefined') ? args.options.groupId : args.options.teamId;
@@ -99,7 +99,7 @@ class AadO365GroupUserRemoveCommand extends GraphCommand {
99
99
  }
100
100
  }
101
101
  }
102
- _AadO365GroupUserRemoveCommand_instances = new WeakSet(), _AadO365GroupUserRemoveCommand_initTelemetry = function _AadO365GroupUserRemoveCommand_initTelemetry() {
102
+ _AadM365GroupUserRemoveCommand_instances = new WeakSet(), _AadM365GroupUserRemoveCommand_initTelemetry = function _AadM365GroupUserRemoveCommand_initTelemetry() {
103
103
  this.telemetry.push((args) => {
104
104
  Object.assign(this.telemetryProperties, {
105
105
  force: (!(!args.options.force)).toString(),
@@ -107,7 +107,7 @@ _AadO365GroupUserRemoveCommand_instances = new WeakSet(), _AadO365GroupUserRemov
107
107
  groupId: typeof args.options.groupId !== 'undefined'
108
108
  });
109
109
  });
110
- }, _AadO365GroupUserRemoveCommand_initOptions = function _AadO365GroupUserRemoveCommand_initOptions() {
110
+ }, _AadM365GroupUserRemoveCommand_initOptions = function _AadM365GroupUserRemoveCommand_initOptions() {
111
111
  this.options.unshift({
112
112
  option: "-i, --groupId [groupId]"
113
113
  }, {
@@ -117,7 +117,7 @@ _AadO365GroupUserRemoveCommand_instances = new WeakSet(), _AadO365GroupUserRemov
117
117
  }, {
118
118
  option: '-f, --force'
119
119
  });
120
- }, _AadO365GroupUserRemoveCommand_initValidators = function _AadO365GroupUserRemoveCommand_initValidators() {
120
+ }, _AadM365GroupUserRemoveCommand_initValidators = function _AadM365GroupUserRemoveCommand_initValidators() {
121
121
  this.validators.push(async (args) => {
122
122
  if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
123
123
  return `${args.options.teamId} is not a valid GUID`;
@@ -127,8 +127,8 @@ _AadO365GroupUserRemoveCommand_instances = new WeakSet(), _AadO365GroupUserRemov
127
127
  }
128
128
  return true;
129
129
  });
130
- }, _AadO365GroupUserRemoveCommand_initOptionSets = function _AadO365GroupUserRemoveCommand_initOptionSets() {
130
+ }, _AadM365GroupUserRemoveCommand_initOptionSets = function _AadM365GroupUserRemoveCommand_initOptionSets() {
131
131
  this.optionSets.push({ options: ['groupId', 'teamId'] });
132
132
  };
133
- export default new AadO365GroupUserRemoveCommand();
134
- //# sourceMappingURL=o365group-user-remove.js.map
133
+ export default new AadM365GroupUserRemoveCommand();
134
+ //# sourceMappingURL=m365group-user-remove.js.map
@@ -3,16 +3,16 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  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");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _AadO365GroupUserSetCommand_instances, _AadO365GroupUserSetCommand_initTelemetry, _AadO365GroupUserSetCommand_initOptions, _AadO365GroupUserSetCommand_initValidators, _AadO365GroupUserSetCommand_initOptionSets;
6
+ var _AadM365GroupUserSetCommand_instances, _AadM365GroupUserSetCommand_initTelemetry, _AadM365GroupUserSetCommand_initOptions, _AadM365GroupUserSetCommand_initValidators, _AadM365GroupUserSetCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
8
  import { odata } from '../../../../utils/odata.js';
9
9
  import { validation } from '../../../../utils/validation.js';
10
10
  import GraphCommand from '../../../base/GraphCommand.js';
11
11
  import teamsCommands from '../../../teams/commands.js';
12
12
  import commands from '../../commands.js';
13
- class AadO365GroupUserSetCommand extends GraphCommand {
13
+ class AadM365GroupUserSetCommand extends GraphCommand {
14
14
  get name() {
15
- return commands.O365GROUP_USER_SET;
15
+ return commands.M365GROUP_USER_SET;
16
16
  }
17
17
  get description() {
18
18
  return 'Updates role of the specified user in the specified Microsoft 365 Group or Microsoft Teams team';
@@ -22,11 +22,11 @@ class AadO365GroupUserSetCommand extends GraphCommand {
22
22
  }
23
23
  constructor() {
24
24
  super();
25
- _AadO365GroupUserSetCommand_instances.add(this);
26
- __classPrivateFieldGet(this, _AadO365GroupUserSetCommand_instances, "m", _AadO365GroupUserSetCommand_initTelemetry).call(this);
27
- __classPrivateFieldGet(this, _AadO365GroupUserSetCommand_instances, "m", _AadO365GroupUserSetCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _AadO365GroupUserSetCommand_instances, "m", _AadO365GroupUserSetCommand_initValidators).call(this);
29
- __classPrivateFieldGet(this, _AadO365GroupUserSetCommand_instances, "m", _AadO365GroupUserSetCommand_initOptionSets).call(this);
25
+ _AadM365GroupUserSetCommand_instances.add(this);
26
+ __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initOptions).call(this);
28
+ __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _AadM365GroupUserSetCommand_instances, "m", _AadM365GroupUserSetCommand_initOptionSets).call(this);
30
30
  }
31
31
  async commandAction(logger, args) {
32
32
  try {
@@ -43,7 +43,7 @@ class AadO365GroupUserSetCommand extends GraphCommand {
43
43
  }
44
44
  if (users.filter(i => args.options.userName.toUpperCase() === i.userPrincipalName.toUpperCase()).length <= 0) {
45
45
  const userNotInGroup = (typeof args.options.groupId !== 'undefined') ?
46
- 'The specified user does not belong to the given Microsoft 365 Group. Please use the \'o365group user add\' command to add new users.' :
46
+ 'The specified user does not belong to the given Microsoft 365 Group. Please use the \'m365group user add\' command to add new users.' :
47
47
  'The specified user does not belong to the given Microsoft Teams team. Please use the \'graph teams user add\' command to add new users.';
48
48
  throw new Error(userNotInGroup);
49
49
  }
@@ -113,7 +113,7 @@ class AadO365GroupUserSetCommand extends GraphCommand {
113
113
  return await odata.getAllItems(endpoint);
114
114
  }
115
115
  }
116
- _AadO365GroupUserSetCommand_instances = new WeakSet(), _AadO365GroupUserSetCommand_initTelemetry = function _AadO365GroupUserSetCommand_initTelemetry() {
116
+ _AadM365GroupUserSetCommand_instances = new WeakSet(), _AadM365GroupUserSetCommand_initTelemetry = function _AadM365GroupUserSetCommand_initTelemetry() {
117
117
  this.telemetry.push((args) => {
118
118
  Object.assign(this.telemetryProperties, {
119
119
  teamId: typeof args.options.teamId !== 'undefined',
@@ -121,7 +121,7 @@ _AadO365GroupUserSetCommand_instances = new WeakSet(), _AadO365GroupUserSetComma
121
121
  role: args.options.role
122
122
  });
123
123
  });
124
- }, _AadO365GroupUserSetCommand_initOptions = function _AadO365GroupUserSetCommand_initOptions() {
124
+ }, _AadM365GroupUserSetCommand_initOptions = function _AadM365GroupUserSetCommand_initOptions() {
125
125
  this.options.unshift({
126
126
  option: "-i, --groupId [groupId]"
127
127
  }, {
@@ -132,7 +132,7 @@ _AadO365GroupUserSetCommand_instances = new WeakSet(), _AadO365GroupUserSetComma
132
132
  option: '-r, --role <role>',
133
133
  autocomplete: ['Owner', 'Member']
134
134
  });
135
- }, _AadO365GroupUserSetCommand_initValidators = function _AadO365GroupUserSetCommand_initValidators() {
135
+ }, _AadM365GroupUserSetCommand_initValidators = function _AadM365GroupUserSetCommand_initValidators() {
136
136
  this.validators.push(async (args) => {
137
137
  if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
138
138
  return `${args.options.teamId} is not a valid GUID`;
@@ -145,8 +145,8 @@ _AadO365GroupUserSetCommand_instances = new WeakSet(), _AadO365GroupUserSetComma
145
145
  }
146
146
  return true;
147
147
  });
148
- }, _AadO365GroupUserSetCommand_initOptionSets = function _AadO365GroupUserSetCommand_initOptionSets() {
148
+ }, _AadM365GroupUserSetCommand_initOptionSets = function _AadM365GroupUserSetCommand_initOptionSets() {
149
149
  this.optionSets.push({ options: ['groupId', 'teamId'] });
150
150
  };
151
- export default new AadO365GroupUserSetCommand();
152
- //# sourceMappingURL=o365group-user-set.js.map
151
+ export default new AadM365GroupUserSetCommand();
152
+ //# sourceMappingURL=m365group-user-set.js.map
@@ -21,28 +21,28 @@ export default {
21
21
  GROUPSETTINGTEMPLATE_GET: `${prefix} groupsettingtemplate get`,
22
22
  GROUPSETTINGTEMPLATE_LIST: `${prefix} groupsettingtemplate list`,
23
23
  LICENSE_LIST: `${prefix} license list`,
24
- O365GROUP_ADD: `${prefix} o365group add`,
25
- O365GROUP_GET: `${prefix} o365group get`,
26
- O365GROUP_LIST: `${prefix} o365group list`,
27
- O365GROUP_CONVERSATION_LIST: `${prefix} o365group conversation list`,
28
- O365GROUP_CONVERSATION_POST_LIST: `${prefix} o365group conversation post list`,
29
- O365GROUP_RECYCLEBINITEM_CLEAR: `${prefix} o365group recyclebinitem clear`,
30
- O365GROUP_RECYCLEBINITEM_LIST: `${prefix} o365group recyclebinitem list`,
31
- O365GROUP_RECYCLEBINITEM_REMOVE: `${prefix} o365group recyclebinitem remove`,
32
- O365GROUP_RECYCLEBINITEM_RESTORE: `${prefix} o365group recyclebinitem restore`,
33
- O365GROUP_SET: `${prefix} o365group set`,
34
- O365GROUP_TEAMIFY: `${prefix} o365group teamify`,
35
- O365GROUP_REMOVE: `${prefix} o365group remove`,
36
- O365GROUP_RENEW: `${prefix} o365group renew`,
37
- O365GROUP_REPORT_ACTIVITYCOUNTS: `${prefix} o365group report activitycounts`,
38
- O365GROUP_REPORT_ACTIVITYDETAIL: `${prefix} o365group report activitydetail`,
39
- O365GROUP_REPORT_ACTIVITYFILECOUNTS: `${prefix} o365group report activityfilecounts`,
40
- O365GROUP_REPORT_ACTIVITYGROUPCOUNTS: `${prefix} o365group report activitygroupcounts`,
41
- O365GROUP_REPORT_ACTIVITYSTORAGE: `${prefix} o365group report activitystorage`,
42
- O365GROUP_USER_ADD: `${prefix} o365group user add`,
43
- O365GROUP_USER_LIST: `${prefix} o365group user list`,
44
- O365GROUP_USER_REMOVE: `${prefix} o365group user remove`,
45
- O365GROUP_USER_SET: `${prefix} o365group user set`,
24
+ M365GROUP_ADD: `${prefix} m365group add`,
25
+ M365GROUP_GET: `${prefix} m365group get`,
26
+ M365GROUP_LIST: `${prefix} m365group list`,
27
+ M365GROUP_CONVERSATION_LIST: `${prefix} m365group conversation list`,
28
+ M365GROUP_CONVERSATION_POST_LIST: `${prefix} m365group conversation post list`,
29
+ M365GROUP_RECYCLEBINITEM_CLEAR: `${prefix} m365group recyclebinitem clear`,
30
+ M365GROUP_RECYCLEBINITEM_LIST: `${prefix} m365group recyclebinitem list`,
31
+ M365GROUP_RECYCLEBINITEM_REMOVE: `${prefix} m365group recyclebinitem remove`,
32
+ M365GROUP_RECYCLEBINITEM_RESTORE: `${prefix} m365group recyclebinitem restore`,
33
+ M365GROUP_SET: `${prefix} m365group set`,
34
+ M365GROUP_TEAMIFY: `${prefix} m365group teamify`,
35
+ M365GROUP_REMOVE: `${prefix} m365group remove`,
36
+ M365GROUP_RENEW: `${prefix} m365group renew`,
37
+ M365GROUP_REPORT_ACTIVITYCOUNTS: `${prefix} m365group report activitycounts`,
38
+ M365GROUP_REPORT_ACTIVITYDETAIL: `${prefix} m365group report activitydetail`,
39
+ M365GROUP_REPORT_ACTIVITYFILECOUNTS: `${prefix} m365group report activityfilecounts`,
40
+ M365GROUP_REPORT_ACTIVITYGROUPCOUNTS: `${prefix} m365group report activitygroupcounts`,
41
+ M365GROUP_REPORT_ACTIVITYSTORAGE: `${prefix} m365group report activitystorage`,
42
+ M365GROUP_USER_ADD: `${prefix} m365group user add`,
43
+ M365GROUP_USER_LIST: `${prefix} m365group user list`,
44
+ M365GROUP_USER_REMOVE: `${prefix} m365group user remove`,
45
+ M365GROUP_USER_SET: `${prefix} m365group user set`,
46
46
  OAUTH2GRANT_ADD: `${prefix} oauth2grant add`,
47
47
  OAUTH2GRANT_LIST: `${prefix} oauth2grant list`,
48
48
  OAUTH2GRANT_REMOVE: `${prefix} oauth2grant remove`,
@@ -29,7 +29,7 @@ class PaAppPermissionListCommand extends PowerAppsCommand {
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  if (this.verbose) {
32
- logger.logToStderr(`Retrieving permissions for app ${args.options.appName}${args.options.roleName !== undefined ? ` with role name ${args.options.roleName}` : ''}`);
32
+ await logger.logToStderr(`Retrieving permissions for app ${args.options.appName}${args.options.roleName !== undefined ? ` with role name ${args.options.roleName}` : ''}`);
33
33
  }
34
34
  const url = `${this.resource}/providers/Microsoft.PowerApps${args.options.asAdmin ? '/scopes/admin' : ''}${args.options.environmentName ? '/environments/' + formatting.encodeQueryParameter(args.options.environmentName) : ''}/apps/${args.options.appName}/permissions?api-version=2022-11-01`;
35
35
  try {
@@ -44,7 +44,7 @@ class PaAppPermissionListCommand extends PowerAppsCommand {
44
44
  permission.principalType = permission.properties.principal.type;
45
45
  });
46
46
  }
47
- logger.log(permissions);
47
+ await logger.log(permissions);
48
48
  }
49
49
  catch (err) {
50
50
  this.handleRejectedODataJsonPromise(err);
@@ -31,7 +31,7 @@ class PaAppPermissionRemoveCommand extends PowerAppsCommand {
31
31
  }
32
32
  async commandAction(logger, args) {
33
33
  try {
34
- if (args.options.confirm) {
34
+ if (args.options.force) {
35
35
  await this.removeAppPermission(logger, args.options);
36
36
  }
37
37
  else {
@@ -99,7 +99,7 @@ _PaAppPermissionRemoveCommand_instances = new WeakSet(), _PaAppPermissionRemoveC
99
99
  tenant: !!args.options.tenant,
100
100
  asAdmin: !!args.options.asAdmin,
101
101
  environmentName: typeof args.options.environmentName !== 'undefined',
102
- confirm: !!args.options.confirm
102
+ force: !!args.options.force
103
103
  });
104
104
  });
105
105
  }, _PaAppPermissionRemoveCommand_initOptions = function _PaAppPermissionRemoveCommand_initOptions() {
@@ -120,7 +120,7 @@ _PaAppPermissionRemoveCommand_instances = new WeakSet(), _PaAppPermissionRemoveC
120
120
  }, {
121
121
  option: '-e, --environmentName [environmentName]'
122
122
  }, {
123
- option: '--confirm'
123
+ option: '-f, --force'
124
124
  });
125
125
  }, _PaAppPermissionRemoveCommand_initValidators = function _PaAppPermissionRemoveCommand_initValidators() {
126
126
  this.validators.push(async (args) => {
@@ -12,9 +12,6 @@ export default {
12
12
  CONNECTOR_EXPORT: `${prefix} connector export`,
13
13
  CONNECTOR_LIST: `${prefix} connector list`,
14
14
  ENVIRONMENT_GET: `${prefix} environment get`,
15
- ENVIRONMENT_LIST: `${prefix} environment list`,
16
- PCF_INIT: `${prefix} pcf init`,
17
- SOLUTION_INIT: `${prefix} solution init`,
18
- SOLUTION_REFERENCE_ADD: `${prefix} solution reference add`
15
+ ENVIRONMENT_LIST: `${prefix} environment list`
19
16
  };
20
17
  //# sourceMappingURL=commands.js.map
@@ -18,4 +18,4 @@ export default [
18
18
  new FN002016_DEVDEP_types_react_dom('17'),
19
19
  new FN002019_DEVDEP_microsoft_rush_stack_compiler(['4.5'])
20
20
  ];
21
- //# sourceMappingURL=doctor-1.18.0-beta.1.js.map
21
+ //# sourceMappingURL=doctor-1.18.0-beta.5.js.map
@@ -67,7 +67,7 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
67
67
  '1.17.2',
68
68
  '1.17.3',
69
69
  '1.17.4',
70
- '1.18.0-beta.1'
70
+ '1.18.0-beta.5'
71
71
  ];
72
72
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
73
73
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
@@ -103,7 +103,7 @@ export default [
103
103
  'fixWith': 'symbol'
104
104
  },
105
105
  'Function': {
106
- 'message': 'The \\'Function\\' type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \'new\'.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
106
+ 'message': 'The \\'Function\\' type accepts any function-like value.\\nIt provides no type safety when calling the function, which can be a common source of bugs.\\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \\'new\\'.\\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
107
107
  }
108
108
  }
109
109
  }
@@ -27,33 +27,33 @@ import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_D
27
27
  import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
28
28
  import { FN010010_YORC_sdkVersions_teams_js } from './rules/FN010010_YORC_sdkVersions_teams_js.js';
29
29
  export default [
30
- new FN001001_DEP_microsoft_sp_core_library('1.18.0-beta.1'),
31
- new FN001002_DEP_microsoft_sp_lodash_subset('1.18.0-beta.1'),
32
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.18.0-beta.1'),
33
- new FN001004_DEP_microsoft_sp_webpart_base('1.18.0-beta.1'),
34
- new FN001011_DEP_microsoft_sp_dialog('1.18.0-beta.1'),
35
- new FN001012_DEP_microsoft_sp_application_base('1.18.0-beta.1'),
36
- new FN001014_DEP_microsoft_sp_listview_extensibility('1.18.0-beta.1'),
37
- new FN001021_DEP_microsoft_sp_property_pane('1.18.0-beta.1'),
30
+ new FN001001_DEP_microsoft_sp_core_library('1.18.0-beta.5'),
31
+ new FN001002_DEP_microsoft_sp_lodash_subset('1.18.0-beta.5'),
32
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.18.0-beta.5'),
33
+ new FN001004_DEP_microsoft_sp_webpart_base('1.18.0-beta.5'),
34
+ new FN001011_DEP_microsoft_sp_dialog('1.18.0-beta.5'),
35
+ new FN001012_DEP_microsoft_sp_application_base('1.18.0-beta.5'),
36
+ new FN001014_DEP_microsoft_sp_listview_extensibility('1.18.0-beta.5'),
37
+ new FN001021_DEP_microsoft_sp_property_pane('1.18.0-beta.5'),
38
38
  new FN001022_DEP_office_ui_fabric_react('', false),
39
- new FN001023_DEP_microsoft_sp_component_base('1.18.0-beta.1'),
40
- new FN001024_DEP_microsoft_sp_diagnostics('1.18.0-beta.1'),
41
- new FN001025_DEP_microsoft_sp_dynamic_data('1.18.0-beta.1'),
42
- new FN001026_DEP_microsoft_sp_extension_base('1.18.0-beta.1'),
43
- new FN001027_DEP_microsoft_sp_http('1.18.0-beta.1'),
44
- new FN001028_DEP_microsoft_sp_list_subscription('1.18.0-beta.1'),
45
- new FN001029_DEP_microsoft_sp_loader('1.18.0-beta.1'),
46
- new FN001030_DEP_microsoft_sp_module_interfaces('1.18.0-beta.1'),
47
- new FN001031_DEP_microsoft_sp_odata_types('1.18.0-beta.1'),
48
- new FN001032_DEP_microsoft_sp_page_context('1.18.0-beta.1'),
39
+ new FN001023_DEP_microsoft_sp_component_base('1.18.0-beta.5'),
40
+ new FN001024_DEP_microsoft_sp_diagnostics('1.18.0-beta.5'),
41
+ new FN001025_DEP_microsoft_sp_dynamic_data('1.18.0-beta.5'),
42
+ new FN001026_DEP_microsoft_sp_extension_base('1.18.0-beta.5'),
43
+ new FN001027_DEP_microsoft_sp_http('1.18.0-beta.5'),
44
+ new FN001028_DEP_microsoft_sp_list_subscription('1.18.0-beta.5'),
45
+ new FN001029_DEP_microsoft_sp_loader('1.18.0-beta.5'),
46
+ new FN001030_DEP_microsoft_sp_module_interfaces('1.18.0-beta.5'),
47
+ new FN001031_DEP_microsoft_sp_odata_types('1.18.0-beta.5'),
48
+ new FN001032_DEP_microsoft_sp_page_context('1.18.0-beta.5'),
49
49
  new FN001035_DEP_fluentui_react('8.106.4'),
50
- new FN001013_DEP_microsoft_decorators('1.18.0-beta.1'),
51
- new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.18.0-beta.1'),
52
- new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.18.0-beta.1'),
53
- new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.18.0-beta.1'),
54
- new FN002001_DEVDEP_microsoft_sp_build_web('1.18.0-beta.1'),
55
- new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.18.0-beta.1'),
56
- new FN010001_YORC_version('1.18.0-beta.1'),
50
+ new FN001013_DEP_microsoft_decorators('1.18.0-beta.5'),
51
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.18.0-beta.5'),
52
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.18.0-beta.5'),
53
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.18.0-beta.5'),
54
+ new FN002001_DEVDEP_microsoft_sp_build_web('1.18.0-beta.5'),
55
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.18.0-beta.5'),
56
+ new FN010001_YORC_version('1.18.0-beta.5'),
57
57
  new FN010010_YORC_sdkVersions_teams_js('2.12.0')
58
58
  ];
59
- //# sourceMappingURL=upgrade-1.18.0-beta.1.js.map
59
+ //# sourceMappingURL=upgrade-1.18.0-beta.5.js.map
@@ -71,7 +71,7 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
71
71
  '1.17.2',
72
72
  '1.17.3',
73
73
  '1.17.4',
74
- '1.18.0-beta.1'
74
+ '1.18.0-beta.5'
75
75
  ];
76
76
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
77
77
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
@@ -524,14 +524,14 @@ class SpfxDoctorCommand extends BaseProjectCommand {
524
524
  fix: 'npm i -g yo@4'
525
525
  }
526
526
  },
527
- '1.18.0-beta.1': {
527
+ '1.18.0-beta.5': {
528
528
  gulpCli: {
529
529
  range: '^1 || ^2',
530
530
  fix: 'npm i -g gulp-cli@2'
531
531
  },
532
532
  node: {
533
- range: '>=16.13.0 <17.0.0',
534
- fix: 'Install Node.js >=16.13.0 <17.0.0'
533
+ range: '>=16.14.0 <17.0.0',
534
+ fix: 'Install Node.js >=16.14.0 <17.0.0'
535
535
  },
536
536
  sp: SharePointVersion.SPO,
537
537
  yo: {
@@ -1,33 +1,34 @@
1
1
  import request from '../../../../request.js';
2
2
  import SpoCommand from '../../../base/SpoCommand.js';
3
3
  export class SpoAppBaseCommand extends SpoCommand {
4
- getAppCatalogSiteUrl(logger, authSiteUrl, args) {
5
- return new Promise((resolve, reject) => {
6
- if (args.options.appCatalogScope === 'sitecollection') {
7
- return resolve(args.options.appCatalogUrl.toLowerCase().replace('/appcatalog', ''));
4
+ async getAppCatalogSiteUrl(logger, authSiteUrl, args) {
5
+ if (args.options.appCatalogScope === 'sitecollection') {
6
+ // trim trailing slashes if there are any
7
+ const appCatalogUrl = args.options.appCatalogUrl.replace(/\/$/, '');
8
+ const appCatalogUrlChunks = appCatalogUrl.split('/');
9
+ // Trim the last part of the URL if it ends on '/appcatalog', but don't trim it if the site URL is called like that (/sites/appcatalog).
10
+ if (appCatalogUrl.toLowerCase().endsWith('/appcatalog') && appCatalogUrlChunks.length !== 5) {
11
+ return appCatalogUrl.substring(0, appCatalogUrl.lastIndexOf('/'));
8
12
  }
9
- if (args.options.appCatalogUrl) {
10
- return resolve(args.options.appCatalogUrl);
11
- }
12
- const requestOptions = {
13
- url: `${authSiteUrl}/_api/SP_TenantSettings_Current`,
14
- headers: {
15
- accept: 'application/json;odata=nometadata'
16
- },
17
- responseType: 'json'
18
- };
19
- request
20
- .get(requestOptions)
21
- .then((res) => {
22
- if (res.CorporateCatalogUrl) {
23
- return resolve(res.CorporateCatalogUrl);
24
- }
25
- reject('Tenant app catalog is not configured.');
26
- })
27
- .catch((err) => {
28
- reject(err);
29
- });
30
- });
13
+ }
14
+ if (args.options.appCatalogUrl) {
15
+ return args.options.appCatalogUrl.replace(/\/$/, '');
16
+ }
17
+ if (this.verbose) {
18
+ await logger.logToStderr('Getting tenant app catalog url...');
19
+ }
20
+ const requestOptions = {
21
+ url: `${authSiteUrl}/_api/SP_TenantSettings_Current`,
22
+ headers: {
23
+ accept: 'application/json;odata=nometadata'
24
+ },
25
+ responseType: 'json'
26
+ };
27
+ const response = await request.get(requestOptions);
28
+ if (response.CorporateCatalogUrl) {
29
+ return response.CorporateCatalogUrl;
30
+ }
31
+ throw new Error('Tenant app catalog is not configured.');
31
32
  }
32
33
  }
33
34
  //# sourceMappingURL=SpoAppBaseCommand.js.map
@@ -22,6 +22,7 @@ class SpoAppAddCommand extends SpoAppBaseCommand {
22
22
  constructor() {
23
23
  super();
24
24
  _SpoAppAddCommand_instances.add(this);
25
+ this.appCatalogScopeOptions = ['tenant', 'sitecollection'];
25
26
  __classPrivateFieldGet(this, _SpoAppAddCommand_instances, "m", _SpoAppAddCommand_initTelemetry).call(this);
26
27
  __classPrivateFieldGet(this, _SpoAppAddCommand_instances, "m", _SpoAppAddCommand_initOptions).call(this);
27
28
  __classPrivateFieldGet(this, _SpoAppAddCommand_instances, "m", _SpoAppAddCommand_initValidators).call(this);
@@ -62,9 +63,9 @@ class SpoAppAddCommand extends SpoAppBaseCommand {
62
63
  _SpoAppAddCommand_instances = new WeakSet(), _SpoAppAddCommand_initTelemetry = function _SpoAppAddCommand_initTelemetry() {
63
64
  this.telemetry.push((args) => {
64
65
  Object.assign(this.telemetryProperties, {
65
- overwrite: (!(!args.options.overwrite)).toString(),
66
+ overwrite: !!args.options.overwrite,
66
67
  appCatalogScope: args.options.appCatalogScope || 'tenant',
67
- appCatalogUrl: (!(!args.options.appCatalogUrl)).toString()
68
+ appCatalogUrl: typeof args.options.appCatalogUrl !== 'undefined'
68
69
  });
69
70
  });
70
71
  }, _SpoAppAddCommand_initOptions = function _SpoAppAddCommand_initOptions() {
@@ -72,7 +73,7 @@ _SpoAppAddCommand_instances = new WeakSet(), _SpoAppAddCommand_initTelemetry = f
72
73
  option: '-p, --filePath <filePath>'
73
74
  }, {
74
75
  option: '-s, --appCatalogScope [appCatalogScope]',
75
- autocomplete: ['tenant', 'sitecollection']
76
+ autocomplete: this.appCatalogScopeOptions
76
77
  }, {
77
78
  option: '-u, --appCatalogUrl [appCatalogUrl]'
78
79
  }, {
@@ -80,14 +81,13 @@ _SpoAppAddCommand_instances = new WeakSet(), _SpoAppAddCommand_initTelemetry = f
80
81
  });
81
82
  }, _SpoAppAddCommand_initValidators = function _SpoAppAddCommand_initValidators() {
82
83
  this.validators.push(async (args) => {
83
- // verify either 'tenant' or 'sitecollection' specified if scope provided
84
84
  if (args.options.appCatalogScope) {
85
- const testScope = args.options.appCatalogScope.toLowerCase();
86
- if (!(testScope === 'tenant' || testScope === 'sitecollection')) {
87
- return `appCatalogScope must be either 'tenant' or 'sitecollection'`;
85
+ const appCatalogScope = args.options.appCatalogScope.toLowerCase();
86
+ if (this.appCatalogScopeOptions.indexOf(appCatalogScope) === -1) {
87
+ return `${args.options.appCatalogScope} is not a valid appCatalogScope. Allowed values are: ${this.appCatalogScopeOptions.join(', ')}`;
88
88
  }
89
- if (testScope === 'sitecollection' && !args.options.appCatalogUrl) {
90
- return `You must specify appCatalogUrl when the appCatalogScope is sitecollection`;
89
+ if (appCatalogScope === 'sitecollection' && !args.options.appCatalogUrl) {
90
+ return `You must specify appCatalogUrl when appCatalogScope is sitecollection`;
91
91
  }
92
92
  }
93
93
  const fullPath = path.resolve(args.options.filePath);
@@ -72,7 +72,7 @@ class SpoFileCopyCommand extends SpoCommand {
72
72
  return urlUtil.getServerRelativePath(options.webUrl, options.sourceUrl);
73
73
  }
74
74
  if (this.verbose) {
75
- logger.logToStderr(`Retrieving server-relative path for file with ID '${options.sourceId}'...`);
75
+ await logger.logToStderr(`Retrieving server-relative path for file with ID '${options.sourceId}'...`);
76
76
  }
77
77
  const requestOptions = {
78
78
  url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')?$select=ServerRelativePath`,