@pnp/cli-microsoft365 11.8.0 → 11.9.0-beta.0365d84

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 (54) hide show
  1. package/dist/cli/cli.js +49 -13
  2. package/dist/index.js +9 -1
  3. package/dist/m365/adaptivecard/commands/adaptivecard-send.js +4 -1
  4. package/dist/m365/app/commands/permission/permission-add.js +4 -1
  5. package/dist/m365/booking/commands/business/business-get.js +5 -1
  6. package/dist/m365/commands/login.js +26 -6
  7. package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +5 -1
  8. package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +10 -2
  9. package/dist/m365/entra/commands/organization/organization-set.js +14 -3
  10. package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +10 -2
  11. package/dist/m365/entra/commands/roledefinition/roledefinition-get.js +10 -2
  12. package/dist/m365/entra/commands/roledefinition/roledefinition-remove.js +10 -2
  13. package/dist/m365/entra/commands/roledefinition/roledefinition-set.js +14 -3
  14. package/dist/m365/entra/commands/user/user-session-revoke.js +5 -1
  15. package/dist/m365/exo/commands/approleassignment/approleassignment-add.js +60 -12
  16. package/dist/m365/flow/commands/environment/environment-get.js +5 -1
  17. package/dist/m365/graph/commands/directoryextension/directoryextension-add.js +5 -1
  18. package/dist/m365/graph/commands/directoryextension/directoryextension-get.js +15 -3
  19. package/dist/m365/graph/commands/directoryextension/directoryextension-list.js +5 -1
  20. package/dist/m365/graph/commands/directoryextension/directoryextension-remove.js +15 -3
  21. package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +5 -1
  22. package/dist/m365/outlook/commands/mailbox/mailbox-settings-get.js +5 -1
  23. package/dist/m365/outlook/commands/mailbox/mailbox-settings-set.js +9 -2
  24. package/dist/m365/pa/commands/environment/environment-get.js +5 -1
  25. package/dist/m365/pp/commands/environment/environment-get.js +5 -1
  26. package/dist/m365/pp/commands/website/website-get.js +5 -1
  27. package/dist/m365/spe/commands/container/container-add.js +5 -1
  28. package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +5 -1
  29. package/dist/m365/spe/commands/container/container-recyclebinitem-remove.js +10 -2
  30. package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +10 -2
  31. package/dist/m365/spe/commands/container/container-remove.js +10 -2
  32. package/dist/m365/spe/commands/containertype/containertype-get.js +5 -1
  33. package/dist/m365/spe/commands/containertype/containertype-remove.js +5 -1
  34. package/dist/m365/spo/commands/file/file-version-keep.js +5 -1
  35. package/dist/m365/spo/commands/homesite/homesite-add.js +5 -1
  36. package/dist/m365/spo/commands/homesite/homesite-set.js +9 -2
  37. package/dist/m365/spo/commands/list/list-defaultvalue-clear.js +10 -2
  38. package/dist/m365/spo/commands/list/list-defaultvalue-get.js +5 -1
  39. package/dist/m365/spo/commands/list/list-defaultvalue-list.js +5 -1
  40. package/dist/m365/spo/commands/list/list-defaultvalue-remove.js +5 -1
  41. package/dist/m365/spo/commands/list/list-defaultvalue-set.js +5 -1
  42. package/dist/m365/spo/commands/list/list-view-add.js +17 -4
  43. package/dist/m365/spo/commands/page/page-get.js +5 -1
  44. package/dist/m365/spo/commands/web/web-alert-list.js +10 -2
  45. package/dist/m365/spp/commands/autofillcolumn/autofillcolumn-set.js +10 -2
  46. package/dist/m365/spp/commands/model/model-apply.js +10 -2
  47. package/dist/m365/teams/commands/callrecord/callrecord-list.js +5 -1
  48. package/dist/m365/viva/commands/engage/engage-community-user-add.js +20 -4
  49. package/dist/m365/viva/commands/engage/engage-community-user-list.js +10 -2
  50. package/dist/m365/viva/commands/engage/engage-community-user-remove.js +16 -7
  51. package/dist/m365/viva/commands/engage/engage-role-member-list.js +5 -1
  52. package/dist/utils/prompt.js +1 -7
  53. package/npm-shrinkwrap.json +2 -2
  54. package/package.json +2 -2
@@ -26,7 +26,11 @@ class OutlookMailboxSettingsGetCommand extends GraphCommand {
26
26
  getRefinedSchema(schema) {
27
27
  return schema
28
28
  .refine(options => !(options.userId && options.userName), {
29
- error: 'Specify either userId or userName, but not both'
29
+ error: 'Specify either userId or userName, but not both',
30
+ params: {
31
+ customCode: 'optionSet',
32
+ options: ['userId', 'userName']
33
+ }
30
34
  });
31
35
  }
32
36
  async commandAction(logger, args) {
@@ -45,7 +45,11 @@ class OutlookMailboxSettingsSetCommand extends GraphCommand {
45
45
  getRefinedSchema(schema) {
46
46
  return schema
47
47
  .refine(options => !(options.userId && options.userName), {
48
- error: 'Specify either userId or userName, but not both'
48
+ error: 'Specify either userId or userName, but not both',
49
+ params: {
50
+ customCode: 'optionSet',
51
+ options: ['userId', 'userName']
52
+ }
49
53
  })
50
54
  .refine(options => [
51
55
  options.workingDays, options.workingHoursStartTime, options.workingHoursEndTime, options.workingHoursTimeZone,
@@ -53,7 +57,10 @@ class OutlookMailboxSettingsSetCommand extends GraphCommand {
53
57
  options.autoReplyStartDateTime, options.autoReplyStartTimeZone, options.autoReplyEndDateTime, options.autoReplyEndTimeZone,
54
58
  options.timeFormat, options.timeZone, options.dateFormat, options.delegateMeetingMessageDeliveryOptions, options.language
55
59
  ].filter(o => o !== undefined).length > 0, {
56
- error: 'Specify at least one of the following options: workingDays, workingHoursStartTime, workingHoursEndTime, workingHoursTimeZone, autoReplyStatus, autoReplyExternalAudience, autoReplyExternalMessage, autoReplyInternalMessage, autoReplyStartDateTime, autoReplyStartTimeZone, autoReplyEndDateTime, autoReplyEndTimeZone, timeFormat, timeZone, dateFormat, delegateMeetingMessageDeliveryOptions, or language'
60
+ error: 'Specify at least one of the following options: workingDays, workingHoursStartTime, workingHoursEndTime, workingHoursTimeZone, autoReplyStatus, autoReplyExternalAudience, autoReplyExternalMessage, autoReplyInternalMessage, autoReplyStartDateTime, autoReplyStartTimeZone, autoReplyEndDateTime, autoReplyEndTimeZone, timeFormat, timeZone, dateFormat, delegateMeetingMessageDeliveryOptions, or language',
61
+ params: {
62
+ customCode: 'required'
63
+ }
57
64
  });
58
65
  }
59
66
  async commandAction(logger, args) {
@@ -22,7 +22,11 @@ class PaEnvironmentGetCommand extends PowerAppsCommand {
22
22
  getRefinedSchema(schema) {
23
23
  return schema
24
24
  .refine(options => !!options.name !== !!options.default, {
25
- error: `Specify either name or default, but not both.`
25
+ error: `Specify either name or default, but not both.`,
26
+ params: {
27
+ customCode: 'optionSet',
28
+ options: ['name', 'default']
29
+ }
26
30
  });
27
31
  }
28
32
  async commandAction(logger, args) {
@@ -23,7 +23,11 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand {
23
23
  getRefinedSchema(schema) {
24
24
  return schema
25
25
  .refine(options => !!options.name !== !!options.default, {
26
- error: `Specify either name or default, but not both.`
26
+ error: `Specify either name or default, but not both.`,
27
+ params: {
28
+ customCode: 'optionSet',
29
+ options: ['name', 'default']
30
+ }
27
31
  });
28
32
  }
29
33
  async commandAction(logger, args) {
@@ -28,7 +28,11 @@ class PpWebSiteGetCommand extends PowerPlatformCommand {
28
28
  getRefinedSchema(schema) {
29
29
  return schema
30
30
  .refine(options => [options.url, options.id, options.name].filter(x => x !== undefined).length === 1, {
31
- error: `Specify either url, id or name, but not multiple.`
31
+ error: `Specify either url, id or name, but not multiple.`,
32
+ params: {
33
+ customCode: 'optionSet',
34
+ options: ['url', 'id', 'name']
35
+ }
32
36
  });
33
37
  }
34
38
  async commandAction(logger, args) {
@@ -31,7 +31,11 @@ class SpeContainerAddCommand extends GraphCommand {
31
31
  getRefinedSchema(schema) {
32
32
  return schema
33
33
  .refine((options) => [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 1, {
34
- error: 'Use one of the following options: containerTypeId or containerTypeName.'
34
+ error: 'Use one of the following options: containerTypeId or containerTypeName.',
35
+ params: {
36
+ customCode: 'optionSet',
37
+ options: ['containerTypeId', 'containerTypeName']
38
+ }
35
39
  });
36
40
  }
37
41
  async commandAction(logger, args) {
@@ -25,7 +25,11 @@ class SpeContainerRecycleBinItemListCommand extends GraphCommand {
25
25
  getRefinedSchema(schema) {
26
26
  return schema
27
27
  .refine((options) => [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 1, {
28
- error: 'Use one of the following options: containerTypeId or containerTypeName.'
28
+ error: 'Use one of the following options: containerTypeId or containerTypeName.',
29
+ params: {
30
+ customCode: 'optionSet',
31
+ options: ['containerTypeId', 'containerTypeName']
32
+ }
29
33
  });
30
34
  }
31
35
  async commandAction(logger, args) {
@@ -28,10 +28,18 @@ class SpeContainerRecycleBinItemRemoveCommand extends GraphCommand {
28
28
  getRefinedSchema(schema) {
29
29
  return schema
30
30
  .refine((options) => [options.id, options.name].filter(o => o !== undefined).length === 1, {
31
- error: 'Use one of the following options: id or name.'
31
+ error: 'Use one of the following options: id or name.',
32
+ params: {
33
+ customCode: 'optionSet',
34
+ options: ['id', 'name']
35
+ }
32
36
  })
33
37
  .refine((options) => !options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 1, {
34
- error: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.'
38
+ error: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.',
39
+ params: {
40
+ customCode: 'optionSet',
41
+ options: ['containerTypeId', 'containerTypeName']
42
+ }
35
43
  })
36
44
  .refine((options) => options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 0, {
37
45
  error: 'Options containerTypeId and containerTypeName are only required when removing a container by name.'
@@ -27,10 +27,18 @@ class SpeContainerRecycleBinItemRestoreCommand extends GraphCommand {
27
27
  getRefinedSchema(schema) {
28
28
  return schema
29
29
  .refine((options) => [options.id, options.name].filter(o => o !== undefined).length === 1, {
30
- error: 'Use one of the following options: id or name.'
30
+ error: 'Use one of the following options: id or name.',
31
+ params: {
32
+ customCode: 'optionSet',
33
+ options: ['id', 'name']
34
+ }
31
35
  })
32
36
  .refine((options) => !options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 1, {
33
- error: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.'
37
+ error: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.',
38
+ params: {
39
+ customCode: 'optionSet',
40
+ options: ['containerTypeId', 'containerTypeName']
41
+ }
34
42
  })
35
43
  .refine((options) => options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 0, {
36
44
  error: 'Options containerTypeId and containerTypeName are only required when restoring a container by name.'
@@ -27,10 +27,18 @@ class SpeContainerRemoveCommand extends GraphCommand {
27
27
  getRefinedSchema(schema) {
28
28
  return schema
29
29
  .refine((options) => [options.id, options.name].filter(o => o !== undefined).length === 1, {
30
- error: 'Use one of the following options: id or name.'
30
+ error: 'Use one of the following options: id or name.',
31
+ params: {
32
+ customCode: 'optionSet',
33
+ options: ['id', 'name']
34
+ }
31
35
  })
32
36
  .refine((options) => !options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 1, {
33
- error: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.'
37
+ error: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.',
38
+ params: {
39
+ customCode: 'optionSet',
40
+ options: ['containerTypeId', 'containerTypeName']
41
+ }
34
42
  })
35
43
  .refine((options) => options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 0, {
36
44
  error: 'Options containerTypeId and containerTypeName are only required when deleting a container by name.'
@@ -24,7 +24,11 @@ class SpeContainerTypeGetCommand extends GraphDelegatedCommand {
24
24
  getRefinedSchema(schema) {
25
25
  return schema
26
26
  .refine(options => [options.id, options.name].filter(o => o !== undefined).length === 1, {
27
- error: 'Use one of the following options: id or name.'
27
+ error: 'Use one of the following options: id or name.',
28
+ params: {
29
+ customCode: 'optionSet',
30
+ options: ['id', 'name']
31
+ }
28
32
  });
29
33
  }
30
34
  async commandAction(logger, args) {
@@ -26,7 +26,11 @@ class SpeContainerTypeRemoveCommand extends SpoCommand {
26
26
  getRefinedSchema(schema) {
27
27
  return schema
28
28
  .refine(options => [options.id, options.name].filter(o => o !== undefined).length === 1, {
29
- error: 'Use one of the following options: id, name.'
29
+ error: 'Use one of the following options: id, name.',
30
+ params: {
31
+ customCode: 'optionSet',
32
+ options: ['id', 'name']
33
+ }
30
34
  });
31
35
  }
32
36
  async commandAction(logger, args) {
@@ -31,7 +31,11 @@ class SpoFileVersionKeepCommand extends SpoCommand {
31
31
  getRefinedSchema(schema) {
32
32
  return schema
33
33
  .refine(options => [options.fileUrl, options.fileId].filter(o => o !== undefined).length === 1, {
34
- error: `Specify 'fileUrl' or 'fileId', but not both.`
34
+ error: `Specify 'fileUrl' or 'fileId', but not both.`,
35
+ params: {
36
+ customCode: 'optionSet',
37
+ options: ['fileUrl', 'fileId']
38
+ }
35
39
  });
36
40
  }
37
41
  async commandAction(logger, args) {
@@ -37,7 +37,11 @@ class SpoHomeSiteAddCommand extends SpoCommand {
37
37
  getRefinedSchema(schema) {
38
38
  return schema
39
39
  .refine((options) => [options.audienceIds, options.audienceNames].filter(o => o !== undefined).length <= 1, {
40
- message: 'You must specify either audienceIds or audienceNames but not both.'
40
+ message: 'You must specify either audienceIds or audienceNames but not both.',
41
+ params: {
42
+ customCode: 'optionSet',
43
+ options: ['audienceIds', 'audienceNames']
44
+ }
41
45
  });
42
46
  }
43
47
  async commandAction(logger, args) {
@@ -38,7 +38,11 @@ class SpoHomeSiteSetCommand extends SpoCommand {
38
38
  getRefinedSchema(schema) {
39
39
  return schema
40
40
  .refine((options) => [options.audienceIds, options.audienceNames].filter(o => o !== undefined).length <= 1, {
41
- message: 'You must specify either audienceIds or audienceNames but not both.'
41
+ message: 'You must specify either audienceIds or audienceNames but not both.',
42
+ params: {
43
+ customCode: 'optionSet',
44
+ options: ['audienceIds', 'audienceNames']
45
+ }
42
46
  })
43
47
  .refine((options) => options.vivaConnectionsDefaultStart !== undefined ||
44
48
  options.draftMode !== undefined ||
@@ -46,7 +50,10 @@ class SpoHomeSiteSetCommand extends SpoCommand {
46
50
  options.audienceNames !== undefined ||
47
51
  options.targetedLicenseType !== undefined ||
48
52
  options.order !== undefined, {
49
- message: 'You must specify at least one option to configure.'
53
+ message: 'You must specify at least one option to configure.',
54
+ params: {
55
+ customCode: 'required'
56
+ }
50
57
  });
51
58
  }
52
59
  async commandAction(logger, args) {
@@ -35,10 +35,18 @@ class SpoListDefaultValueClearCommand extends SpoCommand {
35
35
  getRefinedSchema(schema) {
36
36
  return schema
37
37
  .refine(options => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
38
- error: 'Use one of the following options: listId, listTitle, listUrl.'
38
+ error: 'Use one of the following options: listId, listTitle, listUrl.',
39
+ params: {
40
+ customCode: 'optionSet',
41
+ options: ['listId', 'listTitle', 'listUrl']
42
+ }
39
43
  })
40
44
  .refine(options => (options.fieldName !== undefined) !== (options.folderUrl !== undefined) || (options.fieldName === undefined && options.folderUrl === undefined), {
41
- error: `Specify 'fieldName' or 'folderUrl', but not both.`
45
+ error: `Specify 'fieldName' or 'folderUrl', but not both.`,
46
+ params: {
47
+ customCode: 'optionSet',
48
+ options: ['fieldName', 'folderUrl']
49
+ }
42
50
  });
43
51
  }
44
52
  async commandAction(logger, args) {
@@ -33,7 +33,11 @@ class SpoListDefaultValueGetCommand extends SpoCommand {
33
33
  getRefinedSchema(schema) {
34
34
  return schema
35
35
  .refine(options => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
36
- error: 'Use one of the following options: listId, listTitle, listUrl.'
36
+ error: 'Use one of the following options: listId, listTitle, listUrl.',
37
+ params: {
38
+ customCode: 'optionSet',
39
+ options: ['listId', 'listTitle', 'listUrl']
40
+ }
37
41
  });
38
42
  }
39
43
  async commandAction(logger, args) {
@@ -32,7 +32,11 @@ class SpoListDefaultValueListCommand extends SpoCommand {
32
32
  getRefinedSchema(schema) {
33
33
  return schema
34
34
  .refine(options => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
35
- error: 'Use one of the following options: listId, listTitle, listUrl.'
35
+ error: 'Use one of the following options: listId, listTitle, listUrl.',
36
+ params: {
37
+ customCode: 'optionSet',
38
+ options: ['listId', 'listTitle', 'listUrl']
39
+ }
36
40
  });
37
41
  }
38
42
  async commandAction(logger, args) {
@@ -35,7 +35,11 @@ class SpoListDefaultValueRemoveCommand extends SpoCommand {
35
35
  getRefinedSchema(schema) {
36
36
  return schema
37
37
  .refine(options => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
38
- error: 'Use one of the following options: listId, listTitle, listUrl.'
38
+ error: 'Use one of the following options: listId, listTitle, listUrl.',
39
+ params: {
40
+ customCode: 'optionSet',
41
+ options: ['listId', 'listTitle', 'listUrl']
42
+ }
39
43
  });
40
44
  }
41
45
  async commandAction(logger, args) {
@@ -36,7 +36,11 @@ class SpoListDefaultValueSetCommand extends SpoCommand {
36
36
  getRefinedSchema(schema) {
37
37
  return schema
38
38
  .refine(options => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
39
- error: 'Use one of the following options: listId, listTitle, listUrl.'
39
+ error: 'Use one of the following options: listId, listTitle, listUrl.',
40
+ params: {
41
+ customCode: 'optionSet',
42
+ options: ['listId', 'listTitle', 'listUrl']
43
+ }
40
44
  });
41
45
  }
42
46
  async commandAction(logger, args) {
@@ -57,25 +57,38 @@ class SpoListViewAddCommand extends SpoCommand {
57
57
  getRefinedSchema(schema) {
58
58
  return schema
59
59
  .refine((options) => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
60
- error: 'Use one of the following options: listId, listTitle, or listUrl.'
60
+ error: 'Use one of the following options: listId, listTitle, or listUrl.',
61
+ params: {
62
+ customCode: 'optionSet',
63
+ options: ['listId', 'listTitle', 'listUrl']
64
+ }
61
65
  })
62
66
  .refine((options) => !options.personal || !options.default, {
63
67
  error: 'Default view cannot be a personal view.'
64
68
  })
65
69
  .refine((options) => options.type !== 'calendar' || [options.calendarStartDateField, options.calendarEndDateField, options.calendarTitleField].filter(o => o === undefined).length === 0, {
66
- error: 'When type is calendar, do specify calendarStartDateField, calendarEndDateField, and calendarTitleField.'
70
+ error: 'When type is calendar, do specify calendarStartDateField, calendarEndDateField, and calendarTitleField.',
71
+ params: {
72
+ customCode: 'required'
73
+ }
67
74
  })
68
75
  .refine((options) => options.type === 'calendar' || [options.calendarStartDateField, options.calendarEndDateField, options.calendarTitleField].filter(o => o === undefined).length === 3, {
69
76
  error: 'When type is not calendar, do not specify calendarStartDateField, calendarEndDateField, and calendarTitleField.'
70
77
  })
71
78
  .refine((options) => options.type !== 'kanban' || options.kanbanBucketField !== undefined, {
72
- error: 'When type is kanban, do specify kanbanBucketField.'
79
+ error: 'When type is kanban, do specify kanbanBucketField.',
80
+ params: {
81
+ customCode: 'required'
82
+ }
73
83
  })
74
84
  .refine((options) => options.type === 'kanban' || options.kanbanBucketField === undefined, {
75
85
  error: 'When type is not kanban, do not specify kanbanBucketField.'
76
86
  })
77
87
  .refine((options) => options.type === 'calendar' || options.fields !== undefined, {
78
- error: 'When type is not calendar, do specify fields.'
88
+ error: 'When type is not calendar, do specify fields.',
89
+ params: {
90
+ customCode: 'required'
91
+ }
79
92
  });
80
93
  }
81
94
  async commandAction(logger, args) {
@@ -30,7 +30,11 @@ class SpoPageGetCommand extends SpoCommand {
30
30
  getRefinedSchema(schema) {
31
31
  return schema
32
32
  .refine(options => [options.name, options.default].filter(x => x !== undefined).length === 1, {
33
- error: `Specify either name or default, but not both.`
33
+ error: `Specify either name or default, but not both.`,
34
+ params: {
35
+ customCode: 'optionSet',
36
+ options: ['name', 'default']
37
+ }
34
38
  });
35
39
  }
36
40
  async commandAction(logger, args) {
@@ -38,10 +38,18 @@ class SpoWebAlertListCommand extends SpoCommand {
38
38
  getRefinedSchema(schema) {
39
39
  return schema
40
40
  .refine(options => [options.listId, options.listUrl, options.listTitle].filter(x => x !== undefined).length <= 1, {
41
- error: `Specify either listId, listUrl, or listTitle, but not more than one.`
41
+ error: `Specify either listId, listUrl, or listTitle, but not more than one.`,
42
+ params: {
43
+ customCode: 'optionSet',
44
+ options: ['listId', 'listUrl', 'listTitle']
45
+ }
42
46
  })
43
47
  .refine(options => [options.userName, options.userId].filter(x => x !== undefined).length <= 1, {
44
- error: `Specify either userName or userId, but not both.`
48
+ error: `Specify either userName or userId, but not both.`,
49
+ params: {
50
+ customCode: 'optionSet',
51
+ options: ['userName', 'userId']
52
+ }
45
53
  });
46
54
  }
47
55
  async commandAction(logger, args) {
@@ -55,10 +55,18 @@ class SppAutofillColumnSetCommand extends SpoCommand {
55
55
  getRefinedSchema(schema) {
56
56
  return schema
57
57
  .refine(options => [options.columnId, options.columnTitle, options.columnInternalName].filter(Boolean).length === 1, {
58
- message: `Specify exactly one of the following options: 'columnId', 'columnTitle' or 'columnInternalName'.`
58
+ message: `Specify exactly one of the following options: 'columnId', 'columnTitle' or 'columnInternalName'.`,
59
+ params: {
60
+ customCode: 'optionSet',
61
+ options: ['columnId', 'columnTitle', 'columnInternalName']
62
+ }
59
63
  })
60
64
  .refine(options => [options.listTitle, options.listId, options.listUrl].filter(Boolean).length === 1, {
61
- message: `Specify exactly one of the following options: 'listTitle', 'listId' or 'listUrl'.`
65
+ message: `Specify exactly one of the following options: 'listTitle', 'listId' or 'listUrl'.`,
66
+ params: {
67
+ customCode: 'optionSet',
68
+ options: ['listTitle', 'listId', 'listUrl']
69
+ }
62
70
  });
63
71
  }
64
72
  async commandAction(logger, args) {
@@ -39,10 +39,18 @@ class SppModelApplyCommand extends SpoCommand {
39
39
  getRefinedSchema(schema) {
40
40
  return schema
41
41
  .refine(options => [options.id, options.title].filter(x => x !== undefined).length === 1, {
42
- error: `Specify exactly one of the following options: 'id' or 'title'.`
42
+ error: `Specify exactly one of the following options: 'id' or 'title'.`,
43
+ params: {
44
+ customCode: 'optionSet',
45
+ options: ['id', 'title']
46
+ }
43
47
  })
44
48
  .refine(options => [options.listTitle, options.listId, options.listUrl].filter(x => x !== undefined).length === 1, {
45
- error: `Specify exactly one of the following options: 'listTitle', 'listId' or 'listUrl'.`
49
+ error: `Specify exactly one of the following options: 'listTitle', 'listId' or 'listUrl'.`,
50
+ params: {
51
+ customCode: 'optionSet',
52
+ options: ['listTitle', 'listId', 'listUrl']
53
+ }
46
54
  });
47
55
  }
48
56
  async commandAction(logger, args) {
@@ -55,7 +55,11 @@ class TeamsCallRecordListCommand extends GraphApplicationCommand {
55
55
  getRefinedSchema(schema) {
56
56
  return schema
57
57
  .refine((options) => [options.userId, options.userName].filter(o => o !== undefined).length <= 1, {
58
- error: 'Use one of the following options: userId or userName but not both.'
58
+ error: 'Use one of the following options: userId or userName but not both.',
59
+ params: {
60
+ customCode: 'optionSet',
61
+ options: ['userId', 'userName']
62
+ }
59
63
  })
60
64
  .refine((options) => [options.startDateTime, options.endDateTime].filter(o => o !== undefined).length <= 1 || new Date(options.startDateTime) < new Date(options.endDateTime), {
61
65
  message: 'Value of startDateTime, must be before endDateTime.'
@@ -35,16 +35,32 @@ class VivaEngageCommunityUserAddCommand extends GraphCommand {
35
35
  getRefinedSchema(schema) {
36
36
  return schema
37
37
  .refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
38
- error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
38
+ error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.',
39
+ params: {
40
+ customCode: 'optionSet',
41
+ options: ['communityId', 'communityDisplayName', 'entraGroupId']
42
+ }
39
43
  })
40
44
  .refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
41
- error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
45
+ error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.',
46
+ params: {
47
+ customCode: 'optionSet',
48
+ options: ['communityId', 'communityDisplayName', 'entraGroupId']
49
+ }
42
50
  })
43
51
  .refine(options => options.ids || options.userNames, {
44
- error: 'Specify either of ids or userNames.'
52
+ error: 'Specify either of ids or userNames.',
53
+ params: {
54
+ customCode: 'optionSet',
55
+ options: ['ids', 'userNames']
56
+ }
45
57
  })
46
58
  .refine(options => typeof options.userNames !== 'undefined' || typeof options.ids !== 'undefined', {
47
- error: 'Specify either ids or userNames, but not both.'
59
+ error: 'Specify either ids or userNames, but not both.',
60
+ params: {
61
+ customCode: 'optionSet',
62
+ options: ['ids', 'userNames']
63
+ }
48
64
  });
49
65
  }
50
66
  async commandAction(logger, args) {
@@ -24,10 +24,18 @@ class VivaEngageCommunityUserListCommand extends GraphCommand {
24
24
  getRefinedSchema(schema) {
25
25
  return schema
26
26
  .refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
27
- error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
27
+ error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.',
28
+ params: {
29
+ customCode: 'optionSet',
30
+ options: ['communityId', 'communityDisplayName', 'entraGroupId']
31
+ }
28
32
  })
29
33
  .refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
30
- error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
34
+ error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.',
35
+ params: {
36
+ customCode: 'optionSet',
37
+ options: ['communityId', 'communityDisplayName', 'entraGroupId']
38
+ }
31
39
  });
32
40
  }
33
41
  defaultProperties() {
@@ -32,16 +32,25 @@ class VivaEngageCommunityUserRemoveCommand extends GraphCommand {
32
32
  getRefinedSchema(schema) {
33
33
  return schema
34
34
  .refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
35
- error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
35
+ error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.',
36
+ params: {
37
+ customCode: 'optionSet',
38
+ options: ['communityId', 'communityDisplayName', 'entraGroupId']
39
+ }
36
40
  })
37
41
  .refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
38
- error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
39
- })
40
- .refine(options => options.id || options.userName, {
41
- error: 'Specify either of id or userName.'
42
+ error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.',
43
+ params: {
44
+ customCode: 'optionSet',
45
+ options: ['communityId', 'communityDisplayName', 'entraGroupId']
46
+ }
42
47
  })
43
- .refine(options => typeof options.userName !== 'undefined' || typeof options.id !== 'undefined', {
44
- error: 'Specify either id or userName, but not both.'
48
+ .refine(options => [options.id, options.userName].filter(o => o !== undefined).length === 1, {
49
+ error: 'Specify either id or userName, but not both.',
50
+ params: {
51
+ customCode: 'optionSet',
52
+ options: ['id', 'userName']
53
+ }
45
54
  });
46
55
  }
47
56
  async commandAction(logger, args) {
@@ -22,7 +22,11 @@ class VivaEngageRoleMemberListCommand extends GraphCommand {
22
22
  getRefinedSchema(schema) {
23
23
  return schema
24
24
  .refine(options => [options.roleId, options.roleName].filter(x => x !== undefined).length === 1, {
25
- error: 'Specify either roleId, or roleName, but not both.'
25
+ error: 'Specify either roleId, or roleName, but not both.',
26
+ params: {
27
+ customCode: 'optionSet',
28
+ options: ['roleId', 'roleName']
29
+ }
26
30
  });
27
31
  }
28
32
  defaultProperties() {
@@ -13,13 +13,7 @@ export const prompt = {
13
13
  }
14
14
  const errorOutput = cli.getSettingWithDefaultValue(settingsNames.errorOutput, 'stderr');
15
15
  return inquirerInput
16
- .default(config, { output: errorOutput === 'stderr' ? process.stderr : process.stdout })
17
- .catch(error => {
18
- if (error instanceof Error && error.name === 'ExitPromptError') {
19
- return ''; // noop; handle Ctrl + C
20
- }
21
- throw error;
22
- });
16
+ .default(config, { output: errorOutput === 'stderr' ? process.stderr : process.stdout });
23
17
  },
24
18
  /* c8 ignore next 9 */
25
19
  async forConfirmation(config) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "11.8.0",
3
+ "version": "11.9.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pnp/cli-microsoft365",
9
- "version": "11.8.0",
9
+ "version": "11.9.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@azure/msal-common": "^16.5.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "11.8.0",
3
+ "version": "11.9.0-beta.0365d84",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -359,4 +359,4 @@
359
359
  "source-map-support": "^0.5.21",
360
360
  "tsc-watch": "^7.2.0"
361
361
  }
362
- }
362
+ }