@pnp/cli-microsoft365 6.4.0-beta.f8f3553 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,12 +4,15 @@ LABEL name="CLI for Microsoft 365 Development" \
4
4
  description="Development container for contributing to CLI for Microsoft 365" \
5
5
  homepage="https://pnp.github.io/cli-microsoft365" \
6
6
  maintainers="Waldek Mastykarz <waldek@mastykarz.nl>, \
7
- Velin Georgiev <velin.georgiev@gmail.com>, \
8
7
  Garry Trinder <garry.trinder@live.com>, \
9
8
  Albert-Jan Schot <appie@digiwijs.nl>, \
10
9
  Rabia Williams <rabiawilliams@gmail.com>, \
11
10
  Patrick Lamber <patrick@nubo.eu>, \
12
- Arjun Menon <arjun.umenon@gmail.com>"
11
+ Arjun Menon <arjun.umenon@gmail.com>, \
12
+ Adam Wojcik <adam.wojcik.it@gmail.com>, \
13
+ Martin Lingstuyl <mlingstuyl@live.com>, \
14
+ Jasey Waegebaert <jaseyw@gmigroup.be>, \
15
+ Milan Holemans <Milan.Holemans@vanroey.be>"
13
16
 
14
17
  ENV NPM_CONFIG_PREFIX=/home/cli-microsoft365-dev/.npm-global \
15
18
  PATH=$PATH:/home/cli-microsoft365-dev/.npm-global/bin
package/Dockerfile CHANGED
@@ -6,12 +6,15 @@ LABEL name="m365pnp/cli-microsoft365:${CLI_VERSION}" \
6
6
  description="Manage Microsoft 365 and SharePoint Framework projects on any platform" \
7
7
  homepage="https://pnp.github.io/cli-microsoft365" \
8
8
  maintainers="Waldek Mastykarz <waldek@mastykarz.nl>, \
9
- Velin Georgiev <velin.georgiev@gmail.com>, \
10
9
  Garry Trinder <garry.trinder@live.com>, \
11
10
  Albert-Jan Schot <appie@digiwijs.nl>, \
12
11
  Rabia Williams <rabiawilliams@gmail.com>, \
13
- Patrick Lamber <patrick@nubo.eu> \
14
- Arjun Menon <arjun.umenon@gmail.com>" \
12
+ Patrick Lamber <patrick@nubo.eu>, \
13
+ Arjun Menon <arjun.umenon@gmail.com>, \
14
+ Adam Wojcik <adam.wojcik.it@gmail.com>, \
15
+ Martin Lingstuyl <mlingstuyl@live.com>, \
16
+ Jasey Waegebaert <jaseyw@gmigroup.be>, \
17
+ Milan Holemans <Milan.Holemans@vanroey.be>" \
15
18
  com.azure.dev.pipelines.agent.handler.node.path="/usr/bin/node"
16
19
 
17
20
  RUN apk add --no-cache \
package/dist/Auth.js CHANGED
@@ -535,9 +535,7 @@ class Auth {
535
535
  resource = resource.substr(0, pos);
536
536
  }
537
537
  if (resource === 'https://api.bap.microsoft.com' || resource === 'https://api.powerapps.com') {
538
- // api.bap.microsoft.com and api.powerapps.com are not valid resources
539
- // we need to use https://management.azure.com/ instead
540
- resource = 'https://management.azure.com/';
538
+ resource = 'https://service.powerapps.com/';
541
539
  }
542
540
  if (resource === 'https://api.powerbi.com') {
543
541
  // api.powerbi.com is not a valid resource
package/dist/Command.js CHANGED
@@ -370,7 +370,7 @@ class Command {
370
370
  if (!value || typeof value !== 'string') {
371
371
  return;
372
372
  }
373
- const lowerCaseValue = value.toLowerCase();
373
+ const lowerCaseValue = value.toLowerCase().trim();
374
374
  if (lowerCaseValue === '@meid') {
375
375
  args.options[option] = accessToken_1.accessToken.getUserIdFromAccessToken(token);
376
376
  }
@@ -45,7 +45,11 @@ class FileListCommand extends GraphCommand_1.default {
45
45
  if (!webUrl.endsWith('/')) {
46
46
  webUrl += '/';
47
47
  }
48
- const folderUrl = new URL(args.options.folderUrl, webUrl);
48
+ let folderUrlValue = args.options.folderUrl;
49
+ if (folderUrlValue.endsWith('/')) {
50
+ folderUrlValue = folderUrlValue.slice(0, -1);
51
+ }
52
+ const folderUrl = new URL(folderUrlValue, webUrl);
49
53
  let driveId = '';
50
54
  try {
51
55
  const siteId = yield this.getSiteId(args.options.webUrl, logger);
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _FlowOwnerAddCommand_instances, _FlowOwnerAddCommand_initTelemetry, _FlowOwnerAddCommand_initOptions, _FlowOwnerAddCommand_initOptionSets, _FlowOwnerAddCommand_initValidators;
16
+ var _FlowOwnerEnsureCommand_instances, _FlowOwnerEnsureCommand_initTelemetry, _FlowOwnerEnsureCommand_initOptions, _FlowOwnerEnsureCommand_initOptionSets, _FlowOwnerEnsureCommand_initValidators;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const aadGroup_1 = require("../../../../utils/aadGroup");
@@ -22,20 +22,20 @@ const formatting_1 = require("../../../../utils/formatting");
22
22
  const validation_1 = require("../../../../utils/validation");
23
23
  const AzmgmtCommand_1 = require("../../../base/AzmgmtCommand");
24
24
  const commands_1 = require("../../commands");
25
- class FlowOwnerAddCommand extends AzmgmtCommand_1.default {
25
+ class FlowOwnerEnsureCommand extends AzmgmtCommand_1.default {
26
26
  get name() {
27
- return commands_1.default.OWNER_ADD;
27
+ return commands_1.default.OWNER_ENSURE;
28
28
  }
29
29
  get description() {
30
- return 'Assigns permissions to a Power Automate flow';
30
+ return 'Assigns/updates permissions to a Power Automate flow';
31
31
  }
32
32
  constructor() {
33
33
  super();
34
- _FlowOwnerAddCommand_instances.add(this);
35
- __classPrivateFieldGet(this, _FlowOwnerAddCommand_instances, "m", _FlowOwnerAddCommand_initTelemetry).call(this);
36
- __classPrivateFieldGet(this, _FlowOwnerAddCommand_instances, "m", _FlowOwnerAddCommand_initOptions).call(this);
37
- __classPrivateFieldGet(this, _FlowOwnerAddCommand_instances, "m", _FlowOwnerAddCommand_initValidators).call(this);
38
- __classPrivateFieldGet(this, _FlowOwnerAddCommand_instances, "m", _FlowOwnerAddCommand_initOptionSets).call(this);
34
+ _FlowOwnerEnsureCommand_instances.add(this);
35
+ __classPrivateFieldGet(this, _FlowOwnerEnsureCommand_instances, "m", _FlowOwnerEnsureCommand_initTelemetry).call(this);
36
+ __classPrivateFieldGet(this, _FlowOwnerEnsureCommand_instances, "m", _FlowOwnerEnsureCommand_initOptions).call(this);
37
+ __classPrivateFieldGet(this, _FlowOwnerEnsureCommand_instances, "m", _FlowOwnerEnsureCommand_initValidators).call(this);
38
+ __classPrivateFieldGet(this, _FlowOwnerEnsureCommand_instances, "m", _FlowOwnerEnsureCommand_initOptionSets).call(this);
39
39
  }
40
40
  commandAction(logger, args) {
41
41
  return __awaiter(this, void 0, void 0, function* () {
@@ -91,7 +91,7 @@ class FlowOwnerAddCommand extends AzmgmtCommand_1.default {
91
91
  });
92
92
  }
93
93
  }
94
- _FlowOwnerAddCommand_instances = new WeakSet(), _FlowOwnerAddCommand_initTelemetry = function _FlowOwnerAddCommand_initTelemetry() {
94
+ _FlowOwnerEnsureCommand_instances = new WeakSet(), _FlowOwnerEnsureCommand_initTelemetry = function _FlowOwnerEnsureCommand_initTelemetry() {
95
95
  this.telemetry.push((args) => {
96
96
  Object.assign(this.telemetryProperties, {
97
97
  asAdmin: !!args.options.asAdmin,
@@ -101,7 +101,7 @@ _FlowOwnerAddCommand_instances = new WeakSet(), _FlowOwnerAddCommand_initTelemet
101
101
  groupName: typeof args.options.groupName !== 'undefined'
102
102
  });
103
103
  });
104
- }, _FlowOwnerAddCommand_initOptions = function _FlowOwnerAddCommand_initOptions() {
104
+ }, _FlowOwnerEnsureCommand_initOptions = function _FlowOwnerEnsureCommand_initOptions() {
105
105
  this.options.unshift({
106
106
  option: '-e, --environmentName <environmentName>'
107
107
  }, {
@@ -116,13 +116,13 @@ _FlowOwnerAddCommand_instances = new WeakSet(), _FlowOwnerAddCommand_initTelemet
116
116
  option: '--groupName [groupName]'
117
117
  }, {
118
118
  option: '--roleName <roleName>',
119
- autocomplete: FlowOwnerAddCommand.allowedRoleNames
119
+ autocomplete: FlowOwnerEnsureCommand.allowedRoleNames
120
120
  }, {
121
121
  option: '--asAdmin'
122
122
  });
123
- }, _FlowOwnerAddCommand_initOptionSets = function _FlowOwnerAddCommand_initOptionSets() {
123
+ }, _FlowOwnerEnsureCommand_initOptionSets = function _FlowOwnerEnsureCommand_initOptionSets() {
124
124
  this.optionSets.push({ options: ['userId', 'userName', 'groupId', 'groupName'] });
125
- }, _FlowOwnerAddCommand_initValidators = function _FlowOwnerAddCommand_initValidators() {
125
+ }, _FlowOwnerEnsureCommand_initValidators = function _FlowOwnerEnsureCommand_initValidators() {
126
126
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
127
127
  if (!validation_1.validation.isValidGuid(args.options.flowName)) {
128
128
  return `${args.options.flowName} is not a valid GUID.`;
@@ -136,12 +136,12 @@ _FlowOwnerAddCommand_instances = new WeakSet(), _FlowOwnerAddCommand_initTelemet
136
136
  if (args.options.groupId && !validation_1.validation.isValidGuid(args.options.groupId)) {
137
137
  return `${args.options.groupId} is not a valid GUID.`;
138
138
  }
139
- if (FlowOwnerAddCommand.allowedRoleNames.indexOf(args.options.roleName) === -1) {
140
- return `${args.options.roleName} is not a valid roleName. Valid values are: ${FlowOwnerAddCommand.allowedRoleNames.join(', ')}`;
139
+ if (FlowOwnerEnsureCommand.allowedRoleNames.indexOf(args.options.roleName) === -1) {
140
+ return `${args.options.roleName} is not a valid roleName. Valid values are: ${FlowOwnerEnsureCommand.allowedRoleNames.join(', ')}`;
141
141
  }
142
142
  return true;
143
143
  }));
144
144
  };
145
- FlowOwnerAddCommand.allowedRoleNames = ['CanView', 'CanEdit'];
146
- module.exports = new FlowOwnerAddCommand();
147
- //# sourceMappingURL=owner-add.js.map
145
+ FlowOwnerEnsureCommand.allowedRoleNames = ['CanView', 'CanEdit'];
146
+ module.exports = new FlowOwnerEnsureCommand();
147
+ //# sourceMappingURL=owner-ensure.js.map
@@ -11,7 +11,7 @@ exports.default = {
11
11
  EXPORT: `${prefix} export`,
12
12
  GET: `${prefix} get`,
13
13
  LIST: `${prefix} list`,
14
- OWNER_ADD: `${prefix} owner add`,
14
+ OWNER_ENSURE: `${prefix} owner ensure`,
15
15
  OWNER_LIST: `${prefix} owner list`,
16
16
  OWNER_REMOVE: `${prefix} owner remove`,
17
17
  REMOVE: `${prefix} remove`,
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN014009_CODE_launch_hostedWorkbench_url = void 0;
4
+ const path = require("path");
5
+ const JsonRule_1 = require("../../JsonRule");
6
+ class FN014009_CODE_launch_hostedWorkbench_url extends JsonRule_1.JsonRule {
7
+ constructor(url) {
8
+ super();
9
+ this.url = url;
10
+ }
11
+ get id() {
12
+ return 'FN014009';
13
+ }
14
+ get title() {
15
+ return 'Hosted workbench URL in .vscode/launch.json';
16
+ }
17
+ get description() {
18
+ return `In the .vscode/launch.json file, update the url property for the hosted workbench launch configuration`;
19
+ }
20
+ get resolution() {
21
+ return `{
22
+ "configurations": [
23
+ {
24
+ "url": "${this.url}"
25
+ }
26
+ ]
27
+ }`;
28
+ }
29
+ get resolutionType() {
30
+ return 'json';
31
+ }
32
+ get severity() {
33
+ return 'Recommended';
34
+ }
35
+ get file() {
36
+ return '.vscode/launch.json';
37
+ }
38
+ visit(project, findings) {
39
+ if (!project.vsCode ||
40
+ !project.vsCode.launchJson ||
41
+ !project.vsCode.launchJson.configurations) {
42
+ return;
43
+ }
44
+ const occurrences = [];
45
+ project.vsCode.launchJson.configurations.forEach((configuration, i) => {
46
+ if (configuration.name === 'Hosted workbench' &&
47
+ configuration.url !== this.url) {
48
+ const node = this.getAstNodeFromFile(project.vsCode.launchJson, `configurations[${i}].url`);
49
+ occurrences.push({
50
+ file: path.relative(project.path, this.file),
51
+ resolution: this.resolution,
52
+ position: this.getPositionFromNode(node)
53
+ });
54
+ }
55
+ });
56
+ if (occurrences.length > 0) {
57
+ this.addFindingWithOccurrences(occurrences, findings);
58
+ }
59
+ }
60
+ }
61
+ exports.FN014009_CODE_launch_hostedWorkbench_url = FN014009_CODE_launch_hostedWorkbench_url;
62
+ //# sourceMappingURL=FN014009_CODE_launch_hostedWorkbench_url.js.map
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_microsoft_sp_core_library");
4
+ const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
5
+ const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
6
+ const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
7
+ const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
8
+ const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
9
+ const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
10
+ const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
11
+ const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
12
+ const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
13
+ const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
14
+ const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
15
+ const FN001026_DEP_microsoft_sp_extension_base_1 = require("./rules/FN001026_DEP_microsoft_sp_extension_base");
16
+ const FN001027_DEP_microsoft_sp_http_1 = require("./rules/FN001027_DEP_microsoft_sp_http");
17
+ const FN001028_DEP_microsoft_sp_list_subscription_1 = require("./rules/FN001028_DEP_microsoft_sp_list_subscription");
18
+ const FN001029_DEP_microsoft_sp_loader_1 = require("./rules/FN001029_DEP_microsoft_sp_loader");
19
+ const FN001030_DEP_microsoft_sp_module_interfaces_1 = require("./rules/FN001030_DEP_microsoft_sp_module_interfaces");
20
+ const FN001031_DEP_microsoft_sp_odata_types_1 = require("./rules/FN001031_DEP_microsoft_sp_odata_types");
21
+ const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_microsoft_sp_page_context");
22
+ const FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1 = require("./rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base");
23
+ const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
24
+ const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
25
+ const FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5_1 = require("./rules/FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5");
26
+ const FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1 = require("./rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx");
27
+ const FN002023_DEVDEP_microsoft_eslint_config_spfx_1 = require("./rules/FN002023_DEVDEP_microsoft_eslint_config_spfx");
28
+ const FN002024_DEVDEP_eslint_1 = require("./rules/FN002024_DEVDEP_eslint");
29
+ const FN007002_CFG_S_initialPage_1 = require("./rules/FN007002_CFG_S_initialPage");
30
+ const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
31
+ const FN010010_YORC_sdkVersions_teams_js_1 = require("./rules/FN010010_YORC_sdkVersions_teams_js");
32
+ const FN014008_CODE_launch_hostedWorkbench_type_1 = require("./rules/FN014008_CODE_launch_hostedWorkbench_type");
33
+ const FN014009_CODE_launch_hostedWorkbench_url_1 = require("./rules/FN014009_CODE_launch_hostedWorkbench_url");
34
+ module.exports = [
35
+ new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.17.0-beta.3'),
36
+ new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.17.0-beta.3'),
37
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.17.0-beta.3'),
38
+ new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.17.0-beta.3'),
39
+ new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.17.0-beta.3'),
40
+ new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.17.0-beta.3'),
41
+ new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.17.0-beta.3'),
42
+ new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.17.0-beta.3'),
43
+ new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.17.0-beta.3'),
44
+ new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.17.0-beta.3'),
45
+ new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.17.0-beta.3'),
46
+ new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.17.0-beta.3'),
47
+ new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.17.0-beta.3'),
48
+ new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.17.0-beta.3'),
49
+ new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.17.0-beta.3'),
50
+ new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.17.0-beta.3'),
51
+ new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.17.0-beta.3'),
52
+ new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.17.0-beta.3'),
53
+ new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.17.0-beta.3'),
54
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1.FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.17.0-beta.3'),
55
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1.FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.17.0-beta.3'),
56
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx_1.FN002023_DEVDEP_microsoft_eslint_config_spfx('1.17.0-beta.3'),
57
+ new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.17.0-beta.3'),
58
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.17.0-beta.3'),
59
+ new FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5_1.FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5('0.4.0'),
60
+ new FN002024_DEVDEP_eslint_1.FN002024_DEVDEP_eslint('8.7.0'),
61
+ new FN007002_CFG_S_initialPage_1.FN007002_CFG_S_initialPage('https://{tenantDomain}/_layouts/workbench.aspx'),
62
+ new FN010001_YORC_version_1.FN010001_YORC_version('1.17.0-beta.3'),
63
+ new FN010010_YORC_sdkVersions_teams_js_1.FN010010_YORC_sdkVersions_teams_js('2.9.1'),
64
+ new FN014008_CODE_launch_hostedWorkbench_type_1.FN014008_CODE_launch_hostedWorkbench_type('edge'),
65
+ new FN014009_CODE_launch_hostedWorkbench_url_1.FN014009_CODE_launch_hostedWorkbench_url('https://{tenantDomain}/_layouts/workbench.aspx')
66
+ ];
67
+ //# sourceMappingURL=upgrade-1.17.0-beta.3.js.map
@@ -18,6 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const fs = require("fs");
19
19
  const os = require("os");
20
20
  const path = require("path");
21
+ // uncomment to support upgrading to preview releases
22
+ const semver_1 = require("semver");
21
23
  const Command_1 = require("../../../../Command");
22
24
  const fsUtil_1 = require("../../../../utils/fsUtil");
23
25
  const packageManager_1 = require("../../../../utils/packageManager");
@@ -74,7 +76,8 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
74
76
  '1.15.0',
75
77
  '1.15.2',
76
78
  '1.16.0',
77
- '1.16.1'
79
+ '1.16.1',
80
+ '1.17.0-beta.3'
78
81
  ];
79
82
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
80
83
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
@@ -88,15 +91,15 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
88
91
  }
89
92
  this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
90
93
  // uncomment to support upgrading to preview releases
91
- // if (!args.options.toVersion &&
92
- // !args.options.preview &&
93
- // prerelease(this.toVersion)) {
94
- // // no version and no preview specified while the current version to
95
- // // upgrade to is a prerelease so let's grab the first non-preview version
96
- // // since we're supporting only one preview version, it's sufficient for
97
- // // us to take second to last version
98
- // this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
99
- // }
94
+ if (!args.options.toVersion &&
95
+ !args.options.preview &&
96
+ (0, semver_1.prerelease)(this.toVersion)) {
97
+ // no version and no preview specified while the current version to
98
+ // upgrade to is a prerelease so let's grab the first non-preview version
99
+ // since we're supporting only one preview version, it's sufficient for
100
+ // us to take second to last version
101
+ this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
102
+ }
100
103
  this.packageManager = args.options.packageManager || 'npm';
101
104
  this.shell = args.options.shell || 'bash';
102
105
  if (this.supportedVersions.indexOf(this.toVersion) < 0) {
@@ -483,9 +486,9 @@ _SpfxProjectUpgradeCommand_instances = new WeakSet(), _SpfxProjectUpgradeCommand
483
486
  preview: args.options.preview
484
487
  });
485
488
  // uncomment to support upgrading to preview releases
486
- // if (prerelease(this.telemetryProperties.toVersion) && !args.options.preview) {
487
- // this.telemetryProperties.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
488
- // }
489
+ if ((0, semver_1.prerelease)(this.telemetryProperties.toVersion) && !args.options.preview) {
490
+ this.telemetryProperties.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
491
+ }
489
492
  });
490
493
  }, _SpfxProjectUpgradeCommand_initOptions = function _SpfxProjectUpgradeCommand_initOptions() {
491
494
  this.options.unshift({
@@ -13,11 +13,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoHomeSiteSetCommand_instances, _SpoHomeSiteSetCommand_initOptions, _SpoHomeSiteSetCommand_initValidators;
16
+ var _SpoHomeSiteSetCommand_instances, _SpoHomeSiteSetCommand_initTelemetry, _SpoHomeSiteSetCommand_initOptions, _SpoHomeSiteSetCommand_initValidators, _SpoHomeSiteSetCommand_initTypes;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- const config_1 = require("../../../../config");
19
18
  const request_1 = require("../../../../request");
20
- const formatting_1 = require("../../../../utils/formatting");
21
19
  const spo_1 = require("../../../../utils/spo");
22
20
  const validation_1 = require("../../../../utils/validation");
23
21
  const SpoCommand_1 = require("../../../base/SpoCommand");
@@ -32,43 +30,63 @@ class SpoHomeSiteSetCommand extends SpoCommand_1.default {
32
30
  constructor() {
33
31
  super();
34
32
  _SpoHomeSiteSetCommand_instances.add(this);
33
+ __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initTelemetry).call(this);
35
34
  __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initOptions).call(this);
36
35
  __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initValidators).call(this);
36
+ __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initTypes).call(this);
37
37
  }
38
38
  commandAction(logger, args) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  try {
41
+ if (this.verbose) {
42
+ logger.logToStderr(`Setting the SharePoint home site to: ${args.options.siteUrl}...`);
43
+ logger.logToStderr('Attempting to retrieve the SharePoint admin URL.');
44
+ }
41
45
  const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
42
- const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
43
46
  const requestOptions = {
44
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
47
+ url: `${spoAdminUrl}/_api/SPO.Tenant`,
45
48
  headers: {
46
- 'X-RequestDigest': reqDigest.FormDigestValue
49
+ accept: 'application/json;odata=nometadata',
50
+ 'content-Type': 'application/json'
47
51
  },
48
- data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="57" ObjectPathId="56" /><Method Name="SetSPHSite" Id="58" ObjectPathId="56"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.siteUrl)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="56" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
52
+ responseType: 'json',
53
+ data: {
54
+ sphSiteUrl: args.options.siteUrl
55
+ }
49
56
  };
50
- const res = yield request_1.default.post(requestOptions);
51
- const json = JSON.parse(res);
52
- const response = json[0];
53
- if (response.ErrorInfo) {
54
- throw response.ErrorInfo.ErrorMessage;
57
+ if (args.options.vivaConnectionsDefaultStart !== undefined) {
58
+ requestOptions.url += '/SetSPHSiteWithConfiguration';
59
+ requestOptions.data.configuration = { vivaConnectionsDefaultStart: args.options.vivaConnectionsDefaultStart };
55
60
  }
56
61
  else {
57
- logger.log(json[json.length - 1]);
62
+ requestOptions.url += '/SetSPHSite';
58
63
  }
64
+ const res = yield request_1.default.post(requestOptions);
65
+ logger.log(res.value);
59
66
  }
60
67
  catch (err) {
61
- this.handleRejectedPromise(err);
68
+ this.handleRejectedODataJsonPromise(err);
62
69
  }
63
70
  });
64
71
  }
65
72
  }
66
- _SpoHomeSiteSetCommand_instances = new WeakSet(), _SpoHomeSiteSetCommand_initOptions = function _SpoHomeSiteSetCommand_initOptions() {
73
+ _SpoHomeSiteSetCommand_instances = new WeakSet(), _SpoHomeSiteSetCommand_initTelemetry = function _SpoHomeSiteSetCommand_initTelemetry() {
74
+ this.telemetry.push((args) => {
75
+ Object.assign(this.telemetryProperties, {
76
+ vivaConnectionsDefaultStart: typeof args.options.vivaConnectionsDefaultStart !== 'undefined'
77
+ });
78
+ });
79
+ }, _SpoHomeSiteSetCommand_initOptions = function _SpoHomeSiteSetCommand_initOptions() {
67
80
  this.options.unshift({
68
81
  option: '-u, --siteUrl <siteUrl>'
82
+ }, {
83
+ option: '--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]',
84
+ autocomplete: ['true', 'false']
69
85
  });
70
86
  }, _SpoHomeSiteSetCommand_initValidators = function _SpoHomeSiteSetCommand_initValidators() {
71
87
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return validation_1.validation.isValidSharePointUrl(args.options.siteUrl); }));
88
+ }, _SpoHomeSiteSetCommand_initTypes = function _SpoHomeSiteSetCommand_initTypes() {
89
+ this.types.boolean.push('vivaConnectionsDefaultStart');
72
90
  };
73
91
  module.exports = new SpoHomeSiteSetCommand();
74
92
  //# sourceMappingURL=homesite-set.js.map
@@ -41,8 +41,8 @@ class SpoTenantRecycleBinItemRemoveCommand extends SpoCommand_1.default {
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  const removeDeletedSite = () => __awaiter(this, void 0, void 0, function* () {
43
43
  try {
44
- const adminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
45
- const res = yield spo_1.spo.ensureFormDigest(adminUrl, logger, this.context, this.debug);
44
+ this.spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
45
+ const res = yield spo_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
46
46
  if (this.verbose) {
47
47
  logger.logToStderr(`Removing deleted site collection ${args.options.siteUrl}...`);
48
48
  }
@@ -35,11 +35,12 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
35
35
  __classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
36
36
  }
37
37
  commandAction(logger, args) {
38
- var _a, _b;
38
+ var _a, _b, _c;
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  const endpoint = `${this.resource}/v1.0`;
41
41
  try {
42
42
  const listId = yield this.getTodoListId(args);
43
+ const status = args.options.status && TodoTaskAddCommand.allowedStatuses.filter(x => x.toLowerCase() === args.options.status.toLowerCase())[0];
43
44
  const requestOptions = {
44
45
  url: `${endpoint}/me/todo/lists/${listId}/tasks`,
45
46
  headers: {
@@ -54,7 +55,11 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
54
55
  },
55
56
  importance: (_b = args.options.importance) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
56
57
  dueDateTime: this.getDateTimeTimeZone(args.options.dueDateTime),
57
- reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime)
58
+ reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime),
59
+ categories: (_c = args.options.categories) === null || _c === void 0 ? void 0 : _c.split(','),
60
+ completedDateTime: this.getDateTimeTimeZone(args.options.completedDateTime),
61
+ startDateTime: this.getDateTimeTimeZone(args.options.startDateTime),
62
+ status: status
58
63
  },
59
64
  responseType: 'json'
60
65
  };
@@ -105,7 +110,11 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
105
110
  bodyContentType: args.options.bodyContentType,
106
111
  dueDateTime: typeof args.options.dueDateTime !== 'undefined',
107
112
  importance: args.options.importance,
108
- reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
113
+ reminderDateTime: typeof args.options.reminderDateTime !== 'undefined',
114
+ categories: typeof args.options.categories !== 'undefined',
115
+ completedDateTime: typeof args.options.completedDateTime !== 'undefined',
116
+ startDateTime: typeof args.options.startDateTime !== 'undefined',
117
+ status: typeof args.options.status !== 'undefined'
109
118
  });
110
119
  });
111
120
  }, _TodoTaskAddCommand_initOptions = function _TodoTaskAddCommand_initOptions() {
@@ -127,9 +136,19 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
127
136
  autocomplete: ['low', 'normal', 'high']
128
137
  }, {
129
138
  option: '--reminderDateTime [reminderDateTime]'
139
+ }, {
140
+ option: '--categories [categories]'
141
+ }, {
142
+ option: '--completedDateTime [completedDateTime]'
143
+ }, {
144
+ option: '--startDateTime [startDateTime]'
145
+ }, {
146
+ option: '--status [status]',
147
+ autocomplete: TodoTaskAddCommand.allowedStatuses
130
148
  });
131
149
  }, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
132
150
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
151
+ var _a;
133
152
  if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
134
153
  return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
135
154
  }
@@ -142,10 +161,23 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
142
161
  if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
143
162
  return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
144
163
  }
164
+ if (args.options.completedDateTime && !validation_1.validation.isValidISODateTime(args.options.completedDateTime)) {
165
+ return `'${args.options.completedDateTime}' is not a valid datetime.`;
166
+ }
167
+ if (args.options.startDateTime && !validation_1.validation.isValidISODateTime(args.options.startDateTime)) {
168
+ return `'${args.options.startDateTime}' is not a valid datetime.`;
169
+ }
170
+ if (args.options.status && TodoTaskAddCommand.allowedStatuses.map(x => x.toLowerCase()).indexOf(args.options.status.toLowerCase()) === -1) {
171
+ return `${args.options.status} is not a valid value for status. Valid values are ${TodoTaskAddCommand.allowedStatuses.join(', ')}`;
172
+ }
173
+ if (args.options.completedDateTime && ((_a = args.options.status) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'completed') {
174
+ return `The completedDateTime option can only be used when the status option is set to completed`;
175
+ }
145
176
  return true;
146
177
  }));
147
178
  }, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
148
179
  this.optionSets.push({ options: ['listId', 'listName'] });
149
180
  };
181
+ TodoTaskAddCommand.allowedStatuses = ['notStarted', 'inProgress', 'completed', 'waitingOnOthers', 'deferred'];
150
182
  module.exports = new TodoTaskAddCommand();
151
183
  //# sourceMappingURL=task-add.js.map
@@ -11,7 +11,7 @@ exports.validation = {
11
11
  }
12
12
  const guidRegEx = new RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i);
13
13
  // verify if the guid is a valid guid. @meid will be replaced in a later stage with the actual user id of the logged in user
14
- return guidRegEx.test(guid) || guid.toLocaleLowerCase().trim() === "@meid";
14
+ return guidRegEx.test(guid) || guid.toLowerCase().trim() === '@meid';
15
15
  },
16
16
  isValidTeamsChannelId(guid) {
17
17
  const guidRegEx = new RegExp(/^19:[0-9a-zA-Z-_]+@thread\.(skype|tacv2)$/i);
@@ -23,7 +23,8 @@ exports.validation = {
23
23
  },
24
24
  isValidUserPrincipalName(upn) {
25
25
  const upnRegEx = new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/i);
26
- return upnRegEx.test(upn);
26
+ // verify if the upn is a valid upn. @meusername will be replaced in a later stage with the actual username of the logged in user
27
+ return upnRegEx.test(upn) || upn.toLowerCase().trim() === '@meusername';
27
28
  },
28
29
  isDateInRange(date, monthOffset) {
29
30
  const d = new Date(date);
@@ -77,7 +77,7 @@ If you don't use the manifest, you must specify the name of the Azure AD app reg
77
77
 
78
78
  You can also use the manifest to provision some of the configuration settings of your Azure AD app. All properties specified in the manifest are optional and will set if specified.
79
79
 
80
- If you specify the manifest along with some options, values specified in the options will override settings from the manifest. One exception is the name specified in the `name` option which will be overriden by the `displayName` property from the manifest if specified.
80
+ If you specify the manifest along with some options, values specified in the options will override settings from the manifest. One exception is the name specified in the `name` option which will be overridden by the `displayName` property from the manifest if specified.
81
81
 
82
82
  The following properties specified in the manifest retrieved from Azure AD are not supported by this command:
83
83
 
@@ -137,7 +137,7 @@ Create new Azure AD app registration with an auto-generated secret (secret retur
137
137
  m365 aad app add --name 'My AAD app' --withSecret
138
138
  ```
139
139
 
140
- Create new Azure AD app registration for a deamon app with specified Microsoft Graph application permissions
140
+ Create new Azure AD app registration for a daemon app with specified Microsoft Graph application permissions
141
141
 
142
142
  ```sh
143
143
  m365 aad app add --name 'My AAD app' --withSecret --apisApplication 'https://graph.microsoft.com/Group.ReadWrite.All,https://graph.microsoft.com/Directory.Read.All'
@@ -161,7 +161,7 @@ Create new Azure AD app registration with Application ID URI set to a value that
161
161
  m365 aad app add --name 'My AAD app' --uri api://caf406b91cd4.ngrok.io/_appId_ --scopeName access_as_user --scopeAdminConsentDescription 'Access as a user' --scopeAdminConsentDisplayName 'Access as a user' --scopeConsentBy adminsAndUsers
162
162
  ```
163
163
 
164
- Create new Azure AD app registration for a deamon app with specified Microsoft Graph application permissions, including admin consent
164
+ Create new Azure AD app registration for a daemon app with specified Microsoft Graph application permissions, including admin consent
165
165
 
166
166
  ```sh
167
167
  m365 aad app add --name 'My AAD app' --apisApplication 'https://graph.microsoft.com/Group.ReadWrite.All' --grantAdminConsent
@@ -1,11 +1,11 @@
1
- # flow owner add
1
+ # flow owner ensure
2
2
 
3
- Assigns permissions to a Power Automate flow
3
+ Assigns/updates permissions to a Power Automate flow
4
4
 
5
5
  ## Usage
6
6
 
7
7
  ```sh
8
- m365 flow owner add [options]
8
+ m365 flow owner ensure [options]
9
9
  ```
10
10
 
11
11
  ## Options
@@ -41,19 +41,19 @@ m365 flow owner add [options]
41
41
  Assign owner permissions to a specific Power Automate flow for a user with ID
42
42
 
43
43
  ```sh
44
- m365 flow owner add --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
44
+ m365 flow owner ensure --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
45
45
  ```
46
46
 
47
47
  Assign owner permissions to a specific Power Automate flow for a user with UPN
48
48
 
49
49
  ```sh
50
- m365 flow owner add --userName "john.doe@contoso.com" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
50
+ m365 flow owner ensure --userName "john.doe@contoso.com" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
51
51
  ```
52
52
 
53
53
  Assign owner permissions to a specific Power Automate flow for a group
54
54
 
55
55
  ```sh
56
- m365 flow owner add --groupId 8d4d9f32-1ab0-4f81-9054-efbb1759e8e6 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
56
+ m365 flow owner ensure --groupId 8d4d9f32-1ab0-4f81-9054-efbb1759e8e6 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
57
57
  ```
58
58
 
59
59
  ## Response
@@ -11,14 +11,17 @@ m365 spo homesite set [options]
11
11
  ## Options
12
12
 
13
13
  `-u, --siteUrl <siteUrl>`
14
- : The URL of the site to set as Home Site.
14
+ : The URL of the site to set as Home site.
15
+
16
+ `--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]`
17
+ : When set to `true`, the Viva Connections landing experience is set to the SharePoint home site. If set to `false`, the Viva Connections home experience will be used.
15
18
 
16
19
  --8<-- "docs/cmd/_global.md"
17
20
 
18
21
  ## Remarks
19
22
 
20
23
  !!! important
21
- To use this command you have to have permissions to access the tenant admin site.
24
+ To use this command you must be a Global or SharePoint administrator.
22
25
 
23
26
  ## Examples
24
27
 
@@ -28,8 +31,22 @@ Set the specified site as the Home Site.
28
31
  m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms
29
32
  ```
30
33
 
34
+ Sets the Home site to the provided site collection url and sets the Viva Connections landing experience to the SharePoint home site
35
+
36
+ ```sh
37
+ m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart true
38
+ ```
39
+
40
+ Sets the Home site to the provided site collection url and sets the Viva Connections landing experience to the default experience
41
+
42
+ ```sh
43
+ m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart false
44
+ ```
45
+
31
46
  ## Response
32
47
 
48
+ ### Standard response
49
+
33
50
  === "JSON"
34
51
 
35
52
  ```json
@@ -54,6 +71,34 @@ m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms
54
71
  The Home site has been set to https://contoso.sharepoint.com. It may take some time for the change to apply. Check aka.ms/homesites for details.
55
72
  ```
56
73
 
74
+ ### `vivaConnectionsDefaultStart` response
75
+
76
+ When we make use of the option `vivaConnectionsDefaultStart` the response will differ.
77
+
78
+ === "JSON"
79
+
80
+ ```json
81
+ "The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details."
82
+ ```
83
+
84
+ === "Text"
85
+
86
+ ```text
87
+ The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details.
88
+ ```
89
+
90
+ === "CSV"
91
+
92
+ ```csv
93
+ The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details.
94
+ ```
95
+
96
+ === "Markdown"
97
+
98
+ ```md
99
+ The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details.
100
+ ```
101
+
57
102
  ## More information
58
103
 
59
104
  - SharePoint home sites: a landing for your organization on the intelligent intranet: [https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/SharePoint-home-sites-a-landing-for-your-organization-on-the/ba-p/621933](https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/SharePoint-home-sites-a-landing-for-your-organization-on-the/ba-p/621933)
@@ -34,8 +34,24 @@ m365 todo task add [options]
34
34
  `--reminderDateTime [reminderDateTime]`
35
35
  : The date and time for a reminder alert of the task to occur. This should be defined as a valid ISO 8601 string in the UTC time zone.
36
36
 
37
+ `--categories [categories]`
38
+ : Comma-separated list of categories associated with the task.
39
+
40
+ `--completedDateTime [completedDateTime]`
41
+ : The date and time when the task was finished. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`. This option can only be used when the `status` is set to `completed`.
42
+
43
+ `--startDateTime [startDateTime]`
44
+ : The date and time when the task is scheduled to start. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`
45
+
46
+ `--status [status]`
47
+ : Indicates the state or progress of the task. The possible values are: `notStarted`, `inProgress`, `completed`, `waitingOnOthers`, `deferred`.
48
+
37
49
  --8<-- "docs/cmd/_global.md"
38
50
 
51
+ ## Remarks
52
+
53
+ When you specify the values for `categories`, each category can correspond to the displayName property of an [outlookCategory](https://learn.microsoft.com/graph/api/resources/outlookcategory?view=graph-rest-1.0). It is permissible to use distinct names.
54
+
39
55
  ## Examples
40
56
 
41
57
  Add a task to Microsoft To Do tasks list with with a specific name
@@ -62,9 +78,13 @@ Create a new task with a specific due date
62
78
  m365 todo task add --title "New task" --listId "AQMkADlhMTRkOGEzLWQ1M2QtNGVkNS04NjdmLWU0NzJhMjZmZWNmMwAuAAADKvwNgAMNPE_zFNRJXVrU1wEAhHKQZHItDEOVCn8U3xuA2AABmQeVPwAAAA==" --dueDateTime 2023-01-01
63
79
  ```
64
80
 
65
- ## Response
81
+ Create a new task with categories, a completedDateTime, a startDateTime and a status
66
82
 
67
- ### Standard response
83
+ ```sh
84
+ m365 todo task add --title "New task" --listName "My task list" --categories "Red category,Important" --completedDateTime 2023-12-01 --startDateTime 2023-12-01 --status "notStarted"
85
+ ```
86
+
87
+ ## Response
68
88
 
69
89
  === "JSON"
70
90
 
@@ -117,3 +137,28 @@ m365 todo task add --title "New task" --listId "AQMkADlhMTRkOGEzLWQ1M2QtNGVkNS04
117
137
  importance,isReminderOn,status,title,createdDateTime,lastModifiedDateTime,hasAttachments,categories,id,body,dueDateTime,reminderDateTime
118
138
  high,1,notStarted,New task,2022-10-29T10:54:06.3672421Z,2022-10-29T10:54:06.5078837Z,,[],AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAEX8ECDAADEwEFouXWWT50CfwqSN9cpAAEX8GuPAAA=,"{""content"":""I should not forget this"",""contentType"":""text""}","{""dateTime"":""2023-01-01T00:00:00.0000000"",""timeZone"":""UTC""}","{""dateTime"":""2023-01-01T12:00:00.0000000"",""timeZone"":""UTC""}"
119
139
  ```
140
+
141
+ === "Markdown"
142
+
143
+ ```md
144
+ # todo task add --title "New task" --listName "My task list" --status "notStarted"
145
+
146
+ Date: 4/3/2023
147
+
148
+ ## New task (AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAEX8ECDAADEwEFouXWWT50CfwqSN9cpAAEX8GuPAAA=)
149
+
150
+ Property | Value
151
+ ---------|-------
152
+ importance | high
153
+ isReminderOn | true
154
+ status | notStarted
155
+ title | New task
156
+ createdDateTime | 2022-10-29T10:54:06.3672421Z
157
+ lastModifiedDateTime | 2022-10-29T10:54:06.5078837Z
158
+ hasAttachments | false
159
+ categories | []
160
+ id | AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAEX8ECDAADEwEFouXWWT50CfwqSN9cpAAEX8GuPAAA=
161
+ body | {"content": "I should not forget this","contentType": "text"}
162
+ dueDateTime | {"dateTime": "2023-01-01T00:00:00.0000000","timeZone": "UTC"}
163
+ reminderDateTime | {"dateTime": "2023-01-01T12:00:00.0000000","timeZone": "UTC"}
164
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "6.4.0-beta.f8f3553",
3
+ "version": "6.4.0",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -162,6 +162,7 @@
162
162
  "Nachan, Nanddeep <nanddeepnachan@gmail.com>",
163
163
  "Nachan, Smita <smita.nachan@gmail.com>",
164
164
  "Nadir, Daniaal <daniaal1030@gmail.com>",
165
+ "Narbutas, Valeras <valeras.narbutas@macaw.nl>",
165
166
  "Nikolić, Aleksandar <alexandair@live.com>",
166
167
  "O'Callaghan, Conor <brioscaibriste@gmail.com>",
167
168
  "Otto <berot3@gmail.com>",
@@ -273,4 +274,4 @@
273
274
  "sinon": "^15.0.1",
274
275
  "source-map-support": "^0.5.21"
275
276
  }
276
- }
277
+ }