@pnp/cli-microsoft365 10.1.0-beta.282b66f → 10.1.0-beta.deac605

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 (84) hide show
  1. package/README.md +2 -2
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/AuthServer.js +1 -1
  5. package/dist/Command.js +2 -2
  6. package/dist/cli/cli.js +2 -2
  7. package/dist/m365/entra/commands/m365group/m365group-add.js +1 -1
  8. package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +21 -6
  9. package/dist/m365/entra/commands/m365group/m365group-get.js +29 -7
  10. package/dist/m365/entra/commands/m365group/m365group-list.js +1 -1
  11. package/dist/m365/entra/commands/m365group/m365group-remove.js +21 -9
  12. package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -7
  13. package/dist/m365/entra/commands/m365group/m365group-set.js +1 -1
  14. package/dist/m365/entra/commands/m365group/m365group-teamify.js +12 -21
  15. package/dist/m365/file/commands/convert/convert-pdf.js +3 -4
  16. package/dist/m365/file/commands/file-add.js +5 -6
  17. package/dist/m365/graph/commands/subscription/subscription-add.js +46 -5
  18. package/dist/m365/pp/commands/{chatbot/chatbot-get.js → copilot/copilot-get.js} +24 -20
  19. package/dist/m365/pp/commands/{chatbot/chatbot-list.js → copilot/copilot-list.js} +16 -12
  20. package/dist/m365/pp/commands/{chatbot/chatbot-remove.js → copilot/copilot-remove.js} +28 -24
  21. package/dist/m365/pp/commands.js +3 -0
  22. package/dist/m365/spfx/commands/package/package-generate.js +1 -1
  23. package/dist/m365/spfx/commands/project/JsonRule.js +2 -2
  24. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016004_TS_property_pane_property_import.js +2 -2
  25. package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
  26. package/dist/m365/spo/commands/contenttype/contenttype-get.js +2 -2
  27. package/dist/m365/spo/commands/contenttype/contenttype-list.js +6 -3
  28. package/dist/m365/spo/commands/file/file-add.js +1 -1
  29. package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -2
  30. package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -2
  31. package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -2
  32. package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -2
  33. package/dist/m365/spo/commands/list/list-contenttype-list.js +5 -2
  34. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +10 -8
  35. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +1 -1
  36. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +1 -2
  37. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +1 -2
  38. package/dist/m365/spo/commands/page/page-add.js +1 -1
  39. package/dist/m365/spo/commands/site/site-admin-add.js +4 -12
  40. package/dist/m365/spo/commands/site/site-admin-list.js +3 -11
  41. package/dist/m365/spo/commands/site/site-admin-remove.js +4 -12
  42. package/dist/m365/spo/commands/site/site-set.js +1 -1
  43. package/dist/m365/spp/commands/model/model-remove.js +105 -0
  44. package/dist/m365/spp/commands.js +2 -1
  45. package/dist/m365/teams/commands/user/user-app-list.js +1 -1
  46. package/dist/m365/tenant/commands/report/report-office365activationcounts.js +2 -8
  47. package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +2 -8
  48. package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +2 -8
  49. package/dist/m365/todo/commands/list/list-remove.js +2 -1
  50. package/dist/m365/todo/commands/list/list-set.js +2 -1
  51. package/dist/m365/todo/commands/task/task-add.js +2 -1
  52. package/dist/m365/todo/commands/task/task-get.js +2 -1
  53. package/dist/m365/todo/commands/task/task-list.js +2 -1
  54. package/dist/m365/todo/commands/task/task-remove.js +2 -1
  55. package/dist/m365/todo/commands/task/task-set.js +1 -1
  56. package/dist/m365/viva/commands/engage/engage-community-set.js +111 -0
  57. package/dist/m365/viva/commands.js +1 -0
  58. package/dist/utils/entraGroup.js +18 -0
  59. package/dist/utils/formatting.js +8 -20
  60. package/dist/utils/spo.js +5 -4
  61. package/dist/utils/spp.js +3 -3
  62. package/dist/utils/urlUtil.js +11 -14
  63. package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +12 -3
  64. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +29 -5
  65. package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +7 -4
  66. package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +11 -2
  67. package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +12 -3
  68. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +2 -2
  69. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +6 -0
  70. package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +1 -1
  71. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +3 -3
  72. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +30 -5
  73. package/docs/docs/cmd/login.mdx +45 -44
  74. package/docs/docs/cmd/pp/{chatbot/chatbot-get.mdx → copilot/copilot-get.mdx} +24 -18
  75. package/docs/docs/cmd/pp/{chatbot/chatbot-list.mdx → copilot/copilot-list.mdx} +20 -14
  76. package/docs/docs/cmd/pp/{chatbot/chatbot-remove.mdx → copilot/copilot-remove.mdx} +16 -10
  77. package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +1 -1
  78. package/docs/docs/cmd/spo/contenttype/contenttype-get.mdx +7 -1
  79. package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +7 -1
  80. package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +7 -1
  81. package/docs/docs/cmd/spp/model/model-remove.mdx +57 -0
  82. package/docs/docs/cmd/viva/engage/engage-community-set.mdx +61 -0
  83. package/npm-shrinkwrap.json +6 -0
  84. package/package.json +4 -2
@@ -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 _PpChatbotGetCommand_instances, _PpChatbotGetCommand_initTelemetry, _PpChatbotGetCommand_initOptions, _PpChatbotGetCommand_initOptionSets, _PpChatbotGetCommand_initValidators;
6
+ var _PpCopilotGetCommand_instances, _PpCopilotGetCommand_initTelemetry, _PpCopilotGetCommand_initOptions, _PpCopilotGetCommand_initOptionSets, _PpCopilotGetCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { powerPlatform } from '../../../../utils/powerPlatform.js';
@@ -11,38 +11,42 @@ import { validation } from '../../../../utils/validation.js';
11
11
  import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
12
12
  import commands from '../../commands.js';
13
13
  import { cli } from '../../../../cli/cli.js';
14
- class PpChatbotGetCommand extends PowerPlatformCommand {
14
+ class PpCopilotGetCommand extends PowerPlatformCommand {
15
15
  get name() {
16
- return commands.CHATBOT_GET;
16
+ return commands.COPILOT_GET;
17
17
  }
18
18
  get description() {
19
- return 'Get information about the specified chatbot';
19
+ return 'Get information about the specified copilot';
20
+ }
21
+ alias() {
22
+ return [commands.CHATBOT_GET];
20
23
  }
21
24
  defaultProperties() {
22
25
  return ['name', 'botid', 'publishedon', 'createdon', 'modifiedon'];
23
26
  }
24
27
  constructor() {
25
28
  super();
26
- _PpChatbotGetCommand_instances.add(this);
27
- __classPrivateFieldGet(this, _PpChatbotGetCommand_instances, "m", _PpChatbotGetCommand_initTelemetry).call(this);
28
- __classPrivateFieldGet(this, _PpChatbotGetCommand_instances, "m", _PpChatbotGetCommand_initOptions).call(this);
29
- __classPrivateFieldGet(this, _PpChatbotGetCommand_instances, "m", _PpChatbotGetCommand_initValidators).call(this);
30
- __classPrivateFieldGet(this, _PpChatbotGetCommand_instances, "m", _PpChatbotGetCommand_initOptionSets).call(this);
29
+ _PpCopilotGetCommand_instances.add(this);
30
+ __classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initTelemetry).call(this);
31
+ __classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initOptions).call(this);
32
+ __classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initValidators).call(this);
33
+ __classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initOptionSets).call(this);
31
34
  }
32
35
  async commandAction(logger, args) {
36
+ await this.showDeprecationWarning(logger, commands.CHATBOT_GET, commands.COPILOT_GET);
33
37
  if (this.verbose) {
34
- await logger.logToStderr(`Retrieving chatbot '${args.options.id || args.options.name}'...`);
38
+ await logger.logToStderr(`Retrieving copilot '${args.options.id || args.options.name}'...`);
35
39
  }
36
40
  try {
37
41
  const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
38
- const res = await this.getChatbot(dynamicsApiUrl, args.options);
42
+ const res = await this.getCopilot(dynamicsApiUrl, args.options);
39
43
  await logger.log(res);
40
44
  }
41
45
  catch (err) {
42
46
  this.handleRejectedODataJsonPromise(err);
43
47
  }
44
48
  }
45
- async getChatbot(dynamicsApiUrl, options) {
49
+ async getCopilot(dynamicsApiUrl, options) {
46
50
  const requestOptions = {
47
51
  headers: {
48
52
  accept: 'application/json;odata.metadata=none'
@@ -58,15 +62,15 @@ class PpChatbotGetCommand extends PowerPlatformCommand {
58
62
  const result = await request.get(requestOptions);
59
63
  if (result.value.length > 1) {
60
64
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('botid', result.value);
61
- return await cli.handleMultipleResultsFound(`Multiple chatbots with name '${options.name}' found.`, resultAsKeyValuePair);
65
+ return await cli.handleMultipleResultsFound(`Multiple copilots with name '${options.name}' found.`, resultAsKeyValuePair);
62
66
  }
63
67
  if (result.value.length === 0) {
64
- throw `The specified chatbot '${options.name}' does not exist.`;
68
+ throw `The specified copilot '${options.name}' does not exist.`;
65
69
  }
66
70
  return result.value[0];
67
71
  }
68
72
  }
69
- _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemetry = function _PpChatbotGetCommand_initTelemetry() {
73
+ _PpCopilotGetCommand_instances = new WeakSet(), _PpCopilotGetCommand_initTelemetry = function _PpCopilotGetCommand_initTelemetry() {
70
74
  this.telemetry.push((args) => {
71
75
  Object.assign(this.telemetryProperties, {
72
76
  id: typeof args.options.id !== 'undefined',
@@ -74,7 +78,7 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
74
78
  asAdmin: !!args.options.asAdmin
75
79
  });
76
80
  });
77
- }, _PpChatbotGetCommand_initOptions = function _PpChatbotGetCommand_initOptions() {
81
+ }, _PpCopilotGetCommand_initOptions = function _PpCopilotGetCommand_initOptions() {
78
82
  this.options.unshift({
79
83
  option: '-e, --environmentName <environmentName>'
80
84
  }, {
@@ -84,9 +88,9 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
84
88
  }, {
85
89
  option: '--asAdmin'
86
90
  });
87
- }, _PpChatbotGetCommand_initOptionSets = function _PpChatbotGetCommand_initOptionSets() {
91
+ }, _PpCopilotGetCommand_initOptionSets = function _PpCopilotGetCommand_initOptionSets() {
88
92
  this.optionSets.push({ options: ['id', 'name'] });
89
- }, _PpChatbotGetCommand_initValidators = function _PpChatbotGetCommand_initValidators() {
93
+ }, _PpCopilotGetCommand_initValidators = function _PpCopilotGetCommand_initValidators() {
90
94
  this.validators.push(async (args) => {
91
95
  if (args.options.id && !validation.isValidGuid(args.options.id)) {
92
96
  return `${args.options.id} is not a valid GUID`;
@@ -94,5 +98,5 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
94
98
  return true;
95
99
  });
96
100
  };
97
- export default new PpChatbotGetCommand();
98
- //# sourceMappingURL=chatbot-get.js.map
101
+ export default new PpCopilotGetCommand();
102
+ //# sourceMappingURL=copilot-get.js.map
@@ -3,30 +3,34 @@ 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 _PpChatbotListCommand_instances, _PpChatbotListCommand_initTelemetry, _PpChatbotListCommand_initOptions;
6
+ var _PpCopilotListCommand_instances, _PpCopilotListCommand_initTelemetry, _PpCopilotListCommand_initOptions;
7
7
  import { odata } from '../../../../utils/odata.js';
8
8
  import { powerPlatform } from '../../../../utils/powerPlatform.js';
9
9
  import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
10
10
  import commands from '../../commands.js';
11
- class PpChatbotListCommand extends PowerPlatformCommand {
11
+ class PpCopilotListCommand extends PowerPlatformCommand {
12
12
  get name() {
13
- return commands.CHATBOT_LIST;
13
+ return commands.COPILOT_LIST;
14
14
  }
15
15
  get description() {
16
- return 'Lists Microsoft Power Platform chatbots in the specified Power Platform environment';
16
+ return 'Lists Microsoft Power Platform copilots in the specified Power Platform environment';
17
+ }
18
+ alias() {
19
+ return [commands.CHATBOT_LIST];
17
20
  }
18
21
  defaultProperties() {
19
22
  return ['name', 'botid', 'publishedOn', 'createdOn', 'botModifiedOn'];
20
23
  }
21
24
  constructor() {
22
25
  super();
23
- _PpChatbotListCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _PpChatbotListCommand_instances, "m", _PpChatbotListCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _PpChatbotListCommand_instances, "m", _PpChatbotListCommand_initOptions).call(this);
26
+ _PpCopilotListCommand_instances.add(this);
27
+ __classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initTelemetry).call(this);
28
+ __classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initOptions).call(this);
26
29
  }
27
30
  async commandAction(logger, args) {
31
+ await this.showDeprecationWarning(logger, commands.CHATBOT_LIST, commands.COPILOT_LIST);
28
32
  if (this.verbose) {
29
- await logger.logToStderr(`Retrieving list of chatbots for environment '${args.options.environmentName}'.`);
33
+ await logger.logToStderr(`Retrieving list of copilots for environment '${args.options.environmentName}'.`);
30
34
  }
31
35
  const fetchXml = `
32
36
  <fetch mapping='logical' version='1.0' >
@@ -78,18 +82,18 @@ class PpChatbotListCommand extends PowerPlatformCommand {
78
82
  }
79
83
  }
80
84
  }
81
- _PpChatbotListCommand_instances = new WeakSet(), _PpChatbotListCommand_initTelemetry = function _PpChatbotListCommand_initTelemetry() {
85
+ _PpCopilotListCommand_instances = new WeakSet(), _PpCopilotListCommand_initTelemetry = function _PpCopilotListCommand_initTelemetry() {
82
86
  this.telemetry.push((args) => {
83
87
  Object.assign(this.telemetryProperties, {
84
88
  asAdmin: !!args.options.asAdmin
85
89
  });
86
90
  });
87
- }, _PpChatbotListCommand_initOptions = function _PpChatbotListCommand_initOptions() {
91
+ }, _PpCopilotListCommand_initOptions = function _PpCopilotListCommand_initOptions() {
88
92
  this.options.unshift({
89
93
  option: '-e, --environmentName <environmentName>'
90
94
  }, {
91
95
  option: '--asAdmin'
92
96
  });
93
97
  };
94
- export default new PpChatbotListCommand();
95
- //# sourceMappingURL=chatbot-list.js.map
98
+ export default new PpCopilotListCommand();
99
+ //# sourceMappingURL=copilot-list.js.map
@@ -3,44 +3,48 @@ 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 _PpChatbotRemoveCommand_instances, _PpChatbotRemoveCommand_initTelemetry, _PpChatbotRemoveCommand_initOptions, _PpChatbotRemoveCommand_initOptionSets, _PpChatbotRemoveCommand_initValidators;
6
+ var _PpCopilotRemoveCommand_instances, _PpCopilotRemoveCommand_initTelemetry, _PpCopilotRemoveCommand_initOptions, _PpCopilotRemoveCommand_initOptionSets, _PpCopilotRemoveCommand_initValidators;
7
7
  import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import { powerPlatform } from '../../../../utils/powerPlatform.js';
10
10
  import { validation } from '../../../../utils/validation.js';
11
11
  import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
12
12
  import commands from '../../commands.js';
13
- import ppChatbotGetCommand from './chatbot-get.js';
14
- class PpChatbotRemoveCommand extends PowerPlatformCommand {
13
+ import ppCopilotGetCommand from './copilot-get.js';
14
+ class PpCopilotRemoveCommand extends PowerPlatformCommand {
15
15
  get name() {
16
- return commands.CHATBOT_REMOVE;
16
+ return commands.COPILOT_REMOVE;
17
17
  }
18
18
  get description() {
19
- return 'Removes the specified chatbot';
19
+ return 'Removes the specified copilot';
20
+ }
21
+ alias() {
22
+ return [commands.CHATBOT_REMOVE];
20
23
  }
21
24
  constructor() {
22
25
  super();
23
- _PpChatbotRemoveCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _PpChatbotRemoveCommand_instances, "m", _PpChatbotRemoveCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _PpChatbotRemoveCommand_instances, "m", _PpChatbotRemoveCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _PpChatbotRemoveCommand_instances, "m", _PpChatbotRemoveCommand_initValidators).call(this);
27
- __classPrivateFieldGet(this, _PpChatbotRemoveCommand_instances, "m", _PpChatbotRemoveCommand_initOptionSets).call(this);
26
+ _PpCopilotRemoveCommand_instances.add(this);
27
+ __classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initTelemetry).call(this);
28
+ __classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initOptions).call(this);
29
+ __classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initOptionSets).call(this);
28
31
  }
29
32
  async commandAction(logger, args) {
33
+ await this.showDeprecationWarning(logger, commands.CHATBOT_REMOVE, commands.COPILOT_REMOVE);
30
34
  if (this.verbose) {
31
- await logger.logToStderr(`Removing chatbot '${args.options.id || args.options.name}'...`);
35
+ await logger.logToStderr(`Removing copilot '${args.options.id || args.options.name}'...`);
32
36
  }
33
37
  if (args.options.force) {
34
- await this.deleteChatbot(args);
38
+ await this.deleteCopilot(args);
35
39
  }
36
40
  else {
37
- const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove chatbot '${args.options.id || args.options.name}'?` });
41
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove copilot '${args.options.id || args.options.name}'?` });
38
42
  if (result) {
39
- await this.deleteChatbot(args);
43
+ await this.deleteCopilot(args);
40
44
  }
41
45
  }
42
46
  }
43
- async getChatbotId(args) {
47
+ async getCopilotId(args) {
44
48
  if (args.options.id) {
45
49
  return args.options.id;
46
50
  }
@@ -51,14 +55,14 @@ class PpChatbotRemoveCommand extends PowerPlatformCommand {
51
55
  debug: this.debug,
52
56
  verbose: this.verbose
53
57
  };
54
- const output = await cli.executeCommandWithOutput(ppChatbotGetCommand, { options: { ...options, _: [] } });
58
+ const output = await cli.executeCommandWithOutput(ppCopilotGetCommand, { options: { ...options, _: [] } });
55
59
  const getBotOutput = JSON.parse(output.stdout);
56
60
  return getBotOutput.botid;
57
61
  }
58
- async deleteChatbot(args) {
62
+ async deleteCopilot(args) {
59
63
  try {
60
64
  const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
61
- const botId = await this.getChatbotId(args);
65
+ const botId = await this.getCopilotId(args);
62
66
  const requestOptions = {
63
67
  url: `${dynamicsApiUrl}/api/data/v9.1/bots(${botId})/Microsoft.Dynamics.CRM.PvaDeleteBot?tag=deprovisionbotondelete`,
64
68
  headers: {
@@ -74,7 +78,7 @@ class PpChatbotRemoveCommand extends PowerPlatformCommand {
74
78
  }
75
79
  }
76
80
  }
77
- _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initTelemetry = function _PpChatbotRemoveCommand_initTelemetry() {
81
+ _PpCopilotRemoveCommand_instances = new WeakSet(), _PpCopilotRemoveCommand_initTelemetry = function _PpCopilotRemoveCommand_initTelemetry() {
78
82
  this.telemetry.push((args) => {
79
83
  Object.assign(this.telemetryProperties, {
80
84
  id: typeof args.options.id !== 'undefined',
@@ -83,7 +87,7 @@ _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initT
83
87
  force: !!args.options.force
84
88
  });
85
89
  });
86
- }, _PpChatbotRemoveCommand_initOptions = function _PpChatbotRemoveCommand_initOptions() {
90
+ }, _PpCopilotRemoveCommand_initOptions = function _PpCopilotRemoveCommand_initOptions() {
87
91
  this.options.unshift({
88
92
  option: '-e, --environmentName <environmentName>'
89
93
  }, {
@@ -95,9 +99,9 @@ _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initT
95
99
  }, {
96
100
  option: '-f, --force'
97
101
  });
98
- }, _PpChatbotRemoveCommand_initOptionSets = function _PpChatbotRemoveCommand_initOptionSets() {
102
+ }, _PpCopilotRemoveCommand_initOptionSets = function _PpCopilotRemoveCommand_initOptionSets() {
99
103
  this.optionSets.push({ options: ['id', 'name'] });
100
- }, _PpChatbotRemoveCommand_initValidators = function _PpChatbotRemoveCommand_initValidators() {
104
+ }, _PpCopilotRemoveCommand_initValidators = function _PpCopilotRemoveCommand_initValidators() {
101
105
  this.validators.push(async (args) => {
102
106
  if (args.options.id && !validation.isValidGuid(args.options.id)) {
103
107
  return `${args.options.id} is not a valid GUID`;
@@ -105,5 +109,5 @@ _PpChatbotRemoveCommand_instances = new WeakSet(), _PpChatbotRemoveCommand_initT
105
109
  return true;
106
110
  });
107
111
  };
108
- export default new PpChatbotRemoveCommand();
109
- //# sourceMappingURL=chatbot-remove.js.map
112
+ export default new PpCopilotRemoveCommand();
113
+ //# sourceMappingURL=copilot-remove.js.map
@@ -10,6 +10,9 @@ export default {
10
10
  CHATBOT_GET: `${prefix} chatbot get`,
11
11
  CHATBOT_LIST: `${prefix} chatbot list`,
12
12
  CHATBOT_REMOVE: `${prefix} chatbot remove`,
13
+ COPILOT_GET: `${prefix} copilot get`,
14
+ COPILOT_LIST: `${prefix} copilot list`,
15
+ COPILOT_REMOVE: `${prefix} copilot remove`,
13
16
  DATAVERSE_TABLE_LIST: `${prefix} dataverse table list`,
14
17
  DATAVERSE_TABLE_GET: `${prefix} dataverse table get`,
15
18
  DATAVERSE_TABLE_REMOVE: `${prefix} dataverse table remove`,
@@ -167,7 +167,7 @@ class SpfxPackageGenerateCommand extends AnonymousCommand {
167
167
  return webPartName.replace(/ /g, '-');
168
168
  }
169
169
  static getWebPartAlias(webPartName) {
170
- return 'AutoWP' + webPartName.replace(/[^a-zA-Z0-9]/g, '').substr(0, 40);
170
+ return 'AutoWP' + webPartName.replace(/[^a-zA-Z0-9]/g, '').substring(0, 40);
171
171
  }
172
172
  }
173
173
  _a = SpfxPackageGenerateCommand, _SpfxPackageGenerateCommand_instances = new WeakSet(), _SpfxPackageGenerateCommand_initTelemetry = function _SpfxPackageGenerateCommand_initTelemetry() {
@@ -51,9 +51,9 @@ export class JsonRule extends Rule {
51
51
  isArray = true;
52
52
  const pos = currentProperty.indexOf('[') + 1;
53
53
  // get array element from the property name
54
- arrayElement = currentProperty.substr(pos, currentProperty.length - pos - 1);
54
+ arrayElement = currentProperty.substring(pos, currentProperty.length - 1);
55
55
  // remove array element from the property name
56
- currentProperty = currentProperty.substr(0, pos - 1);
56
+ currentProperty = currentProperty.substring(0, pos - 1);
57
57
  }
58
58
  for (let i = 0; i < node.children.length; i++) {
59
59
  let currentNode = node.children[i];
@@ -40,8 +40,8 @@ export class FN016004_TS_property_pane_property_import extends TsRule {
40
40
  .filter(n => n.getText().indexOf('@microsoft/sp-webpart-base') > 0);
41
41
  obj.forEach(n => {
42
42
  const resource = n.getText();
43
- const importsText = resource.replace(/\s/g, '').substr(resource.indexOf('{'));
44
- const imports = importsText.substr(0, importsText.indexOf('}')).split(',');
43
+ const importsText = resource.replace(/\s/g, '').substring(resource.indexOf('{'));
44
+ const imports = importsText.substring(0, importsText.indexOf('}')).split(',');
45
45
  const importsToStay = [];
46
46
  const importsToBeMoved = [];
47
47
  imports.forEach(importName => {
@@ -929,7 +929,7 @@ class SpfxDoctorCommand extends BaseProjectCommand {
929
929
  });
930
930
  }
931
931
  getNodeVersion() {
932
- return process.version.substr(1);
932
+ return process.version.substring(1);
933
933
  }
934
934
  async checkStatus(what, versionFound, versionCheck) {
935
935
  if (versionFound) {
@@ -40,10 +40,10 @@ class SpoContentTypeGetCommand extends SpoCommand {
40
40
  }
41
41
  requestUrl += "/contenttypes";
42
42
  if (args.options.id) {
43
- requestUrl += `('${formatting.encodeQueryParameter(args.options.id)}')`;
43
+ requestUrl += `('${formatting.encodeQueryParameter(args.options.id)}')?$expand=Parent`;
44
44
  }
45
45
  else if (args.options.name) {
46
- requestUrl += `?$filter=Name eq '${formatting.encodeQueryParameter(args.options.name)}'`;
46
+ requestUrl += `?$filter=Name eq '${formatting.encodeQueryParameter(args.options.name)}'&$expand=Parent`;
47
47
  }
48
48
  const requestOptions = {
49
49
  url: requestUrl,
@@ -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 _SpoContentTypeListCommand_instances, _SpoContentTypeListCommand_initTelemetry, _SpoContentTypeListCommand_initOptions, _SpoContentTypeListCommand_initValidators;
6
+ var _SpoContentTypeListCommand_instances, _SpoContentTypeListCommand_initTelemetry, _SpoContentTypeListCommand_initOptions, _SpoContentTypeListCommand_initValidators, _SpoContentTypeListCommand_initTypes;
7
7
  import { formatting } from '../../../../utils/formatting.js';
8
8
  import { odata } from '../../../../utils/odata.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -25,12 +25,13 @@ class SpoContentTypeListCommand extends SpoCommand {
25
25
  __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initTelemetry).call(this);
26
26
  __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initOptions).call(this);
27
27
  __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initValidators).call(this);
28
+ __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initTypes).call(this);
28
29
  }
29
30
  async commandAction(logger, args) {
30
31
  try {
31
- let requestUrl = `${args.options.webUrl}/_api/web/ContentTypes`;
32
+ let requestUrl = `${args.options.webUrl}/_api/web/ContentTypes?$expand=Parent`;
32
33
  if (args.options.category) {
33
- requestUrl += `?$filter=Group eq '${formatting.encodeQueryParameter(args.options.category)}'`;
34
+ requestUrl += `&$filter=Group eq '${formatting.encodeQueryParameter(args.options.category)}'`;
34
35
  }
35
36
  const res = await odata.getAllItems(requestUrl);
36
37
  await logger.log(res);
@@ -54,6 +55,8 @@ _SpoContentTypeListCommand_instances = new WeakSet(), _SpoContentTypeListCommand
54
55
  });
55
56
  }, _SpoContentTypeListCommand_initValidators = function _SpoContentTypeListCommand_initValidators() {
56
57
  this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
58
+ }, _SpoContentTypeListCommand_initTypes = function _SpoContentTypeListCommand_initTypes() {
59
+ this.types.string.push('webUrl', 'category');
57
60
  };
58
61
  export default new SpoContentTypeListCommand();
59
62
  //# sourceMappingURL=contenttype-list.js.map
@@ -283,7 +283,7 @@ class SpoFileAddCommand extends SpoCommand {
283
283
  const isLastChunk = info.Position >= info.Size;
284
284
  if (isLastChunk) {
285
285
  // trim buffer for last chunk
286
- fileBuffer = fileBuffer.slice(0, readCount);
286
+ fileBuffer = fileBuffer.subarray(0, readCount);
287
287
  }
288
288
  const requestOptions = {
289
289
  url: `${info.WebUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(info.FolderPath)}')/Files('${formatting.encodeQueryParameter(info.Name)}')/${isLastChunk ? 'Finish' : 'Continue'}Upload(uploadId=guid'${info.Id}',fileOffset=${offset})`,
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoFileRetentionLabelEnsureCommand_instances, _SpoFileRetentionLabelEnsureCommand_initTelemetry, _SpoFileRetentionLabelEnsureCommand_initOptions, _SpoFileRetentionLabelEnsureCommand_initValidators, _SpoFileRetentionLabelEnsureCommand_initOptionSets, _SpoFileRetentionLabelEnsureCommand_initTypes;
7
- import * as url from 'url';
8
7
  import request from '../../../../request.js';
9
8
  import { validation } from '../../../../utils/validation.js';
10
9
  import SpoCommand from '../../../base/SpoCommand.js';
@@ -31,7 +30,7 @@ class SpoFileRetentionLabelEnsureCommand extends SpoCommand {
31
30
  async commandAction(logger, args) {
32
31
  try {
33
32
  const fileProperties = await this.getFileProperties(logger, args);
34
- const parsedUrl = url.parse(args.options.webUrl);
33
+ const parsedUrl = new URL(args.options.webUrl);
35
34
  const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
36
35
  const listAbsoluteUrl = urlUtil.urlCombine(tenantUrl, fileProperties.listServerRelativeUrl);
37
36
  if (args.options.assetId) {
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoFileRetentionLabelRemoveCommand_instances, _SpoFileRetentionLabelRemoveCommand_initTelemetry, _SpoFileRetentionLabelRemoveCommand_initOptions, _SpoFileRetentionLabelRemoveCommand_initValidators, _SpoFileRetentionLabelRemoveCommand_initOptionSets, _SpoFileRetentionLabelRemoveCommand_initTypes;
7
- import * as url from 'url';
8
7
  import { cli } from '../../../../cli/cli.js';
9
8
  import request from '../../../../request.js';
10
9
  import { formatting } from '../../../../utils/formatting.js';
@@ -43,7 +42,7 @@ class SpoFileRetentionLabelRemoveCommand extends SpoCommand {
43
42
  async removeFileRetentionLabel(logger, args) {
44
43
  try {
45
44
  const fileProperties = await this.getFileProperties(logger, args);
46
- const parsedUrl = url.parse(args.options.webUrl);
45
+ const parsedUrl = new URL(args.options.webUrl);
47
46
  const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
48
47
  const listAbsoluteUrl = urlUtil.urlCombine(tenantUrl, fileProperties.listServerRelativeUrl);
49
48
  await spo.removeRetentionLabelFromListItems(args.options.webUrl, listAbsoluteUrl, [parseInt(fileProperties.listItemId)], logger, args.options.verbose);
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoFolderRetentionLabelEnsureCommand_instances, _SpoFolderRetentionLabelEnsureCommand_initTelemetry, _SpoFolderRetentionLabelEnsureCommand_initOptions, _SpoFolderRetentionLabelEnsureCommand_initValidators, _SpoFolderRetentionLabelEnsureCommand_initOptionSets, _SpoFolderRetentionLabelEnsureCommand_initTypes;
7
- import * as url from 'url';
8
7
  import request from '../../../../request.js';
9
8
  import { formatting } from '../../../../utils/formatting.js';
10
9
  import { spo } from '../../../../utils/spo.js';
@@ -32,7 +31,7 @@ class SpoFolderRetentionLabelEnsureCommand extends SpoCommand {
32
31
  try {
33
32
  const folderProperties = await this.getFolderProperties(logger, args);
34
33
  if (folderProperties.ListItemAllFields) {
35
- const parsedUrl = url.parse(args.options.webUrl);
34
+ const parsedUrl = new URL(args.options.webUrl);
36
35
  const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
37
36
  const listAbsoluteUrl = urlUtil.urlCombine(tenantUrl, folderProperties.ListItemAllFields.ParentList.RootFolder.ServerRelativeUrl);
38
37
  await spo.applyRetentionLabelToListItems(args.options.webUrl, args.options.name, listAbsoluteUrl, [parseInt(folderProperties.ListItemAllFields.Id)], logger, args.options.verbose);
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoFolderRetentionLabelRemoveCommand_instances, _SpoFolderRetentionLabelRemoveCommand_initTelemetry, _SpoFolderRetentionLabelRemoveCommand_initOptions, _SpoFolderRetentionLabelRemoveCommand_initValidators, _SpoFolderRetentionLabelRemoveCommand_initOptionSets, _SpoFolderRetentionLabelRemoveCommand_initTypes;
7
- import * as url from 'url';
8
7
  import { cli } from '../../../../cli/cli.js';
9
8
  import request from '../../../../request.js';
10
9
  import { formatting } from '../../../../utils/formatting.js';
@@ -44,7 +43,7 @@ class SpoFolderRetentionLabelRemoveCommand extends SpoCommand {
44
43
  try {
45
44
  const folderProperties = await this.getFolderProperties(logger, args);
46
45
  if (folderProperties.ListItemAllFields) {
47
- const parsedUrl = url.parse(args.options.webUrl);
46
+ const parsedUrl = new URL(args.options.webUrl);
48
47
  const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
49
48
  const listAbsoluteUrl = urlUtil.urlCombine(tenantUrl, folderProperties.ListItemAllFields.ParentList.RootFolder.ServerRelativeUrl);
50
49
  await spo.removeRetentionLabelFromListItems(args.options.webUrl, listAbsoluteUrl, [parseInt(folderProperties.ListItemAllFields.Id)], logger, args.options.verbose);
@@ -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 _SpoListContentTypeListCommand_instances, _SpoListContentTypeListCommand_initTelemetry, _SpoListContentTypeListCommand_initOptions, _SpoListContentTypeListCommand_initValidators, _SpoListContentTypeListCommand_initOptionSets;
6
+ var _SpoListContentTypeListCommand_instances, _SpoListContentTypeListCommand_initTelemetry, _SpoListContentTypeListCommand_initOptions, _SpoListContentTypeListCommand_initValidators, _SpoListContentTypeListCommand_initOptionSets, _SpoListContentTypeListCommand_initTypes;
7
7
  import { formatting } from '../../../../utils/formatting.js';
8
8
  import { odata } from '../../../../utils/odata.js';
9
9
  import { urlUtil } from '../../../../utils/urlUtil.js';
@@ -27,6 +27,7 @@ class SpoListContentTypeListCommand extends SpoCommand {
27
27
  __classPrivateFieldGet(this, _SpoListContentTypeListCommand_instances, "m", _SpoListContentTypeListCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListContentTypeListCommand_instances, "m", _SpoListContentTypeListCommand_initValidators).call(this);
29
29
  __classPrivateFieldGet(this, _SpoListContentTypeListCommand_instances, "m", _SpoListContentTypeListCommand_initOptionSets).call(this);
30
+ __classPrivateFieldGet(this, _SpoListContentTypeListCommand_instances, "m", _SpoListContentTypeListCommand_initTypes).call(this);
30
31
  }
31
32
  async commandAction(logger, args) {
32
33
  if (this.verbose) {
@@ -45,7 +46,7 @@ class SpoListContentTypeListCommand extends SpoCommand {
45
46
  requestUrl += `GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
46
47
  }
47
48
  try {
48
- const res = await odata.getAllItems(`${requestUrl}/ContentTypes`);
49
+ const res = await odata.getAllItems(`${requestUrl}/ContentTypes?$expand=Parent`);
49
50
  await logger.log(res);
50
51
  }
51
52
  catch (err) {
@@ -86,6 +87,8 @@ _SpoListContentTypeListCommand_instances = new WeakSet(), _SpoListContentTypeLis
86
87
  });
87
88
  }, _SpoListContentTypeListCommand_initOptionSets = function _SpoListContentTypeListCommand_initOptionSets() {
88
89
  this.optionSets.push({ options: ['listId', 'listTitle', 'listUrl'] });
90
+ }, _SpoListContentTypeListCommand_initTypes = function _SpoListContentTypeListCommand_initTypes() {
91
+ this.types.string.push('webUrl', 'listId', 'listTitle', 'listUrl');
89
92
  };
90
93
  export default new SpoListContentTypeListCommand();
91
94
  //# sourceMappingURL=list-contenttype-list.js.map
@@ -40,7 +40,8 @@ class SpoListItemBatchRemoveCommand extends SpoCommand {
40
40
  if (args.options.filePath) {
41
41
  const csvContent = fs.readFileSync(args.options.filePath, 'utf-8');
42
42
  const jsonContent = formatting.parseCsvToJson(csvContent);
43
- idsToRemove = jsonContent.map((item) => item['ID']);
43
+ const idKey = Object.keys(jsonContent[0]).find(key => key.toLowerCase() === 'id');
44
+ idsToRemove = jsonContent.map((item) => item[idKey]);
44
45
  }
45
46
  else {
46
47
  idsToRemove = formatting.splitAndTrim(args.options.ids);
@@ -193,18 +194,19 @@ _SpoListItemBatchRemoveCommand_instances = new WeakSet(), _SpoListItemBatchRemov
193
194
  }
194
195
  const fileContent = fs.readFileSync(args.options.filePath, 'utf-8');
195
196
  const jsonContent = formatting.parseCsvToJson(fileContent);
196
- if (!jsonContent[0].hasOwnProperty('ID')) {
197
+ const idKey = Object.keys(jsonContent[0]).find(key => key.toLowerCase() === 'id');
198
+ if (!idKey) {
197
199
  return `The file does not contain the required header row with the column name 'ID'.`;
198
200
  }
199
- const nonNumbers = jsonContent.filter(element => isNaN(Number(element['ID'].toString().trim()))).map(element => element['ID']);
200
- if (nonNumbers.length > 0) {
201
- return `The specified ids '${nonNumbers.join(', ')}' are invalid numbers.`;
201
+ const invalidIDs = validation.isValidPositiveIntegerArray(jsonContent.map(element => element[idKey].toString().trim()).join(','));
202
+ if (invalidIDs !== true) {
203
+ return `The file contains one or more invalid IDs: '${invalidIDs}'.`;
202
204
  }
203
205
  }
204
206
  if (args.options.ids) {
205
- const nonNumbers = formatting.splitAndTrim(args.options.ids).filter(element => isNaN(Number(element)));
206
- if (nonNumbers.length > 0) {
207
- return `The specified ids '${nonNumbers.join(', ')}' are invalid numbers.`;
207
+ const isValidIntegerArray = validation.isValidPositiveIntegerArray(args.options.ids);
208
+ if (isValidIntegerArray !== true) {
209
+ return `Option 'ids' contains one or more invalid IDs: '${isValidIntegerArray}'.`;
208
210
  }
209
211
  }
210
212
  return true;
@@ -117,7 +117,7 @@ class SpoListItemBatchSetCommand extends SpoCommand {
117
117
  actionString += `<Method Name="SetFieldValue" Id="${index += 1}" ObjectPathId="${objectPathId}"><Parameters><Parameter Type="String">${field.InternalName}</Parameter><Parameter Type="Array">${lookupMultiString.join('')}</Parameter></Parameters></Method>`;
118
118
  break;
119
119
  default:
120
- actionString += `<Method Name="ParseAndSetFieldValue" Id="${index += 1}" ObjectPathId="${objectPathId}"><Parameters><Parameter Type="String">${field.InternalName}</Parameter><Parameter Type="String">${row[field.InternalName].toString()}</Parameter></Parameters></Method>`;
120
+ actionString += `<Method Name="ParseAndSetFieldValue" Id="${index += 1}" ObjectPathId="${objectPathId}"><Parameters><Parameter Type="String">${field.InternalName}</Parameter><Parameter Type="String">${formatting.escapeXml(row[field.InternalName].toString())}</Parameter></Parameters></Method>`;
121
121
  break;
122
122
  }
123
123
  }
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoListItemRetentionLabelEnsureCommand_instances, _SpoListItemRetentionLabelEnsureCommand_initTelemetry, _SpoListItemRetentionLabelEnsureCommand_initOptions, _SpoListItemRetentionLabelEnsureCommand_initValidators, _SpoListItemRetentionLabelEnsureCommand_initOptionSets;
7
- import * as url from 'url';
8
7
  import request from '../../../../request.js';
9
8
  import { formatting } from '../../../../utils/formatting.js';
10
9
  import { urlUtil } from '../../../../utils/urlUtil.js';
@@ -60,7 +59,7 @@ class SpoListItemRetentionLabelEnsureCommand extends SpoCommand {
60
59
  return label.TagName;
61
60
  }
62
61
  async getListAbsoluteUrl(options, logger) {
63
- const parsedUrl = url.parse(options.webUrl);
62
+ const parsedUrl = new URL(options.webUrl);
64
63
  const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
65
64
  if (options.listUrl) {
66
65
  const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoListItemRetentionLabelRemoveCommand_instances, _SpoListItemRetentionLabelRemoveCommand_initTelemetry, _SpoListItemRetentionLabelRemoveCommand_initOptions, _SpoListItemRetentionLabelRemoveCommand_initValidators, _SpoListItemRetentionLabelRemoveCommand_initOptionSets;
7
- import * as url from 'url';
8
7
  import { cli } from '../../../../cli/cli.js';
9
8
  import request from '../../../../request.js';
10
9
  import { formatting } from '../../../../utils/formatting.js';
@@ -49,7 +48,7 @@ class SpoListItemRetentionLabelRemoveCommand extends SpoCommand {
49
48
  }
50
49
  }
51
50
  async getListAbsoluteUrl(options, logger) {
52
- const parsedUrl = url.parse(options.webUrl);
51
+ const parsedUrl = new URL(options.webUrl);
53
52
  const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
54
53
  if (options.listUrl) {
55
54
  const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
@@ -34,7 +34,7 @@ class SpoPageAddCommand extends SpoCommand {
34
34
  let bannerImageUrl = '';
35
35
  let canvasContent1 = '';
36
36
  let layoutWebpartsContent = '';
37
- const pageTitle = args.options.title ? args.options.title : (args.options.name.indexOf('.aspx') > -1 ? args.options.name.substr(0, args.options.name.indexOf('.aspx')) : args.options.name);
37
+ const pageTitle = args.options.title ? args.options.title : (args.options.name.indexOf('.aspx') > -1 ? args.options.name.substring(0, args.options.name.indexOf('.aspx')) : args.options.name);
38
38
  let pageId = null;
39
39
  const pageDescription = args.options.description || "";
40
40
  if (!pageName.endsWith('.aspx')) {