@pnp/cli-microsoft365 12.0.0-beta.0be7d8d → 12.0.0-beta.c9bd7f3

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 (89) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +2 -6
  4. package/dist/auth/FileTokenStorage.js +0 -3
  5. package/dist/auth/msalCachePlugin.js +201 -12
  6. package/dist/m365/commands/logout.js +2 -4
  7. package/dist/m365/entra/commands/m365group/m365group-remove.js +9 -2
  8. package/dist/m365/spe/commands/container/container-remove.js +6 -7
  9. package/dist/m365/spo/commands/file/file-archive.js +1 -1
  10. package/dist/m365/spo/commands/file/file-remove.js +5 -5
  11. package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
  12. package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
  13. package/dist/m365/spo/commands/folder/folder-remove.js +5 -5
  14. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +5 -0
  15. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +8 -26
  16. package/dist/m365/spo/commands/homesite/homesite-list.js +5 -0
  17. package/dist/m365/spo/commands/list/list-remove.js +4 -4
  18. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +5 -4
  19. package/dist/m365/spo/commands/listitem/listitem-remove.js +8 -5
  20. package/dist/m365/spo/commands/page/page-remove.js +7 -7
  21. package/dist/m365/spo/commands/site/site-list.js +60 -49
  22. package/dist/m365/spo/commands/site/site-remove.js +12 -6
  23. package/dist/m365/spo/commands/spo-get.js +5 -0
  24. package/dist/m365/spo/commands/spo-set.js +10 -21
  25. package/dist/m365/spo/commands/storageentity/storageentity-get.js +23 -17
  26. package/dist/m365/spo/commands/storageentity/storageentity-list.js +39 -36
  27. package/dist/m365/spo/commands/storageentity/storageentity-remove.js +26 -33
  28. package/dist/m365/spo/commands/storageentity/storageentity-set.js +26 -36
  29. package/dist/m365/spo/commands/user/user-ensure.js +24 -60
  30. package/dist/m365/spo/commands/user/user-get.js +25 -65
  31. package/dist/m365/spo/commands/user/user-list.js +10 -18
  32. package/dist/m365/spo/commands/user/user-remove.js +26 -68
  33. package/dist/m365/spo/commands/userprofile/userprofile-get.js +10 -23
  34. package/dist/m365/spo/commands/userprofile/userprofile-set.js +10 -19
  35. package/dist/m365/spo/commands/web/web-add.js +20 -55
  36. package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +10 -18
  37. package/dist/m365/spo/commands/web/web-get.js +12 -30
  38. package/dist/m365/spo/commands/web/web-installedlanguage-list.js +10 -18
  39. package/dist/m365/spo/commands/web/web-list.js +10 -18
  40. package/dist/m365/spo/commands/web/web-reindex.js +10 -18
  41. package/dist/m365/spo/commands/web/web-remove.js +11 -27
  42. package/dist/m365/spo/commands/web/web-retentionlabel-list.js +10 -18
  43. package/dist/m365/spo/commands/web/web-roleassignment-add.js +40 -64
  44. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +31 -58
  45. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +12 -36
  46. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +11 -29
  47. package/dist/m365/spo/commands/web/web-set.js +26 -96
  48. package/dist/m365/spo/commands.js +0 -4
  49. package/dist/m365/teams/commands/channel/channel-list.js +2 -6
  50. package/dist/m365/teams/commands/channel/channel-member-add.js +2 -6
  51. package/dist/m365/teams/commands/channel/channel-member-list.js +2 -6
  52. package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -6
  53. package/dist/m365/teams/commands/channel/channel-member-set.js +2 -6
  54. package/dist/m365/teams/commands/channel/channel-remove.js +2 -8
  55. package/dist/m365/teams/commands/channel/channel-set.js +2 -8
  56. package/dist/m365/teams/commands/tab/tab-get.js +2 -6
  57. package/dist/m365/teams/commands/team/team-archive.js +2 -6
  58. package/dist/m365/teams/commands/team/team-remove.js +2 -6
  59. package/dist/m365/teams/commands/team/team-unarchive.js +2 -6
  60. package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +6 -3
  61. package/docs/docs/cmd/spe/container/container-remove.mdx +5 -5
  62. package/docs/docs/cmd/spo/file/file-archive.mdx +8 -0
  63. package/docs/docs/cmd/spo/file/file-remove.mdx +4 -4
  64. package/docs/docs/cmd/spo/file/file-unarchive.mdx +8 -0
  65. package/docs/docs/cmd/spo/folder/folder-archive.mdx +6 -0
  66. package/docs/docs/cmd/spo/folder/folder-remove.mdx +4 -4
  67. package/docs/docs/cmd/spo/list/list-remove.mdx +4 -4
  68. package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +8 -2
  69. package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +8 -2
  70. package/docs/docs/cmd/spo/page/page-remove.mdx +4 -4
  71. package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +52 -21
  72. package/docs/docs/cmd/spo/site/site-list.mdx +22 -1
  73. package/docs/docs/cmd/spo/site/site-remove.mdx +5 -2
  74. package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +11 -2
  75. package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +9 -3
  76. package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +6 -6
  77. package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +10 -4
  78. package/docs/docs/cmd/teams/app/app-install.mdx +21 -0
  79. package/docs/docs/cmd/teams/app/app-list.mdx +19 -0
  80. package/docs/docs/cmd/teams/app/app-publish.mdx +17 -0
  81. package/docs/docs/cmd/teams/app/app-remove.mdx +19 -0
  82. package/docs/docs/cmd/teams/app/app-uninstall.mdx +21 -0
  83. package/docs/docs/cmd/teams/app/app-update.mdx +19 -0
  84. package/npm-shrinkwrap.json +432 -0
  85. package/package.json +6 -1
  86. package/dist/m365/spo/commands/web/web-rule-list.js +0 -111
  87. package/dist/m365/spo/commands/web/web-rule-remove.js +0 -57
  88. package/docs/docs/cmd/spo/web/web-rule-list.mdx +0 -193
  89. package/docs/docs/cmd/spo/web/web-rule-remove.mdx +0 -71
@@ -1,17 +1,24 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoStorageEntityRemoveCommand_instances, _SpoStorageEntityRemoveCommand_initTelemetry, _SpoStorageEntityRemoveCommand_initOptions, _SpoStorageEntityRemoveCommand_initValidators;
1
+ import { z } from 'zod';
7
2
  import { cli } from '../../../../cli/cli.js';
8
3
  import config from '../../../../config.js';
4
+ import { globalOptionsZod } from '../../../../Command.js';
9
5
  import request from '../../../../request.js';
10
6
  import { formatting } from '../../../../utils/formatting.js';
11
7
  import { spo } from '../../../../utils/spo.js';
12
8
  import { validation } from '../../../../utils/validation.js';
13
9
  import SpoCommand from '../../../base/SpoCommand.js';
14
10
  import commands from '../../commands.js';
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ appCatalogUrl: z.string()
14
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
15
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
16
+ })
17
+ .optional()
18
+ .alias('u'),
19
+ key: z.string().alias('k'),
20
+ force: z.boolean().optional().alias('f')
21
+ });
15
22
  class SpoStorageEntityRemoveCommand extends SpoCommand {
16
23
  get name() {
17
24
  return commands.STORAGEENTITY_REMOVE;
@@ -19,12 +26,8 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
19
26
  get description() {
20
27
  return 'Removes tenant property stored on the specified SharePoint Online app catalog';
21
28
  }
22
- constructor() {
23
- super();
24
- _SpoStorageEntityRemoveCommand_instances.add(this);
25
- __classPrivateFieldGet(this, _SpoStorageEntityRemoveCommand_instances, "m", _SpoStorageEntityRemoveCommand_initTelemetry).call(this);
26
- __classPrivateFieldGet(this, _SpoStorageEntityRemoveCommand_instances, "m", _SpoStorageEntityRemoveCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _SpoStorageEntityRemoveCommand_instances, "m", _SpoStorageEntityRemoveCommand_initValidators).call(this);
29
+ get schema() {
30
+ return options;
28
31
  }
29
32
  async commandAction(logger, args) {
30
33
  if (args.options.force) {
@@ -38,10 +41,17 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
38
41
  }
39
42
  }
40
43
  async removeTenantProperty(logger, args) {
41
- if (this.verbose) {
42
- await logger.logToStderr(`Removing tenant property ${args.options.key} from ${args.options.appCatalogUrl}...`);
43
- }
44
44
  try {
45
+ let appCatalogUrl = args.options.appCatalogUrl;
46
+ if (!appCatalogUrl) {
47
+ appCatalogUrl = await spo.getTenantAppCatalogUrl(logger, this.debug);
48
+ if (!appCatalogUrl) {
49
+ throw 'Tenant app catalog URL not found. Specify the URL of the app catalog site using the appCatalogUrl option.';
50
+ }
51
+ }
52
+ if (this.verbose) {
53
+ await logger.logToStderr(`Removing tenant property ${args.options.key} from ${appCatalogUrl}...`);
54
+ }
45
55
  const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
46
56
  const digestInfo = await spo.getRequestDigest(spoAdminUrl);
47
57
  const requestOptions = {
@@ -49,7 +59,7 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
49
59
  headers: {
50
60
  'X-RequestDigest': digestInfo.FormDigestValue
51
61
  },
52
- data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="31" ObjectPathId="30" /><ObjectPath Id="33" ObjectPathId="32" /><ObjectPath Id="35" ObjectPathId="34" /><Method Name="RemoveStorageEntity" Id="36" ObjectPathId="34"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="30" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="32" ParentId="30" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.appCatalogUrl)}</Parameter></Parameters></Method><Property Id="34" ParentId="32" Name="RootWeb" /></ObjectPaths></Request>`
62
+ data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="31" ObjectPathId="30" /><ObjectPath Id="33" ObjectPathId="32" /><ObjectPath Id="35" ObjectPathId="34" /><Method Name="RemoveStorageEntity" Id="36" ObjectPathId="34"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="30" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="32" ParentId="30" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(appCatalogUrl)}</Parameter></Parameters></Method><Property Id="34" ParentId="32" Name="RootWeb" /></ObjectPaths></Request>`
53
63
  };
54
64
  const processQuery = await request.post(requestOptions);
55
65
  const json = JSON.parse(processQuery);
@@ -63,22 +73,5 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
63
73
  }
64
74
  }
65
75
  }
66
- _SpoStorageEntityRemoveCommand_instances = new WeakSet(), _SpoStorageEntityRemoveCommand_initTelemetry = function _SpoStorageEntityRemoveCommand_initTelemetry() {
67
- this.telemetry.push((args) => {
68
- Object.assign(this.telemetryProperties, {
69
- force: (!(!args.options.force)).toString()
70
- });
71
- });
72
- }, _SpoStorageEntityRemoveCommand_initOptions = function _SpoStorageEntityRemoveCommand_initOptions() {
73
- this.options.unshift({
74
- option: '-u, --appCatalogUrl <appCatalogUrl>'
75
- }, {
76
- option: '-k, --key <key>'
77
- }, {
78
- option: '-f, --force'
79
- });
80
- }, _SpoStorageEntityRemoveCommand_initValidators = function _SpoStorageEntityRemoveCommand_initValidators() {
81
- this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.appCatalogUrl));
82
- };
83
76
  export default new SpoStorageEntityRemoveCommand();
84
77
  //# sourceMappingURL=storageentity-remove.js.map
@@ -1,16 +1,25 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoStorageEntitySetCommand_instances, _SpoStorageEntitySetCommand_initTelemetry, _SpoStorageEntitySetCommand_initOptions, _SpoStorageEntitySetCommand_initValidators;
1
+ import { z } from 'zod';
7
2
  import config from '../../../../config.js';
3
+ import { globalOptionsZod } from '../../../../Command.js';
8
4
  import request from '../../../../request.js';
9
5
  import { formatting } from '../../../../utils/formatting.js';
10
6
  import { spo } from '../../../../utils/spo.js';
11
7
  import { validation } from '../../../../utils/validation.js';
12
8
  import SpoCommand from '../../../base/SpoCommand.js';
13
9
  import commands from '../../commands.js';
10
+ export const options = z.strictObject({
11
+ ...globalOptionsZod.shape,
12
+ appCatalogUrl: z.string()
13
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
14
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
15
+ })
16
+ .optional()
17
+ .alias('u'),
18
+ key: z.string().alias('k'),
19
+ value: z.string().alias('v'),
20
+ description: z.string().optional().alias('d'),
21
+ comment: z.string().optional().alias('c')
22
+ });
14
23
  class SpoStorageEntitySetCommand extends SpoCommand {
15
24
  get name() {
16
25
  return commands.STORAGEENTITY_SET;
@@ -18,26 +27,29 @@ class SpoStorageEntitySetCommand extends SpoCommand {
18
27
  get description() {
19
28
  return 'Sets tenant property on the specified SharePoint Online app catalog';
20
29
  }
21
- constructor() {
22
- super();
23
- _SpoStorageEntitySetCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _SpoStorageEntitySetCommand_instances, "m", _SpoStorageEntitySetCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _SpoStorageEntitySetCommand_instances, "m", _SpoStorageEntitySetCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _SpoStorageEntitySetCommand_instances, "m", _SpoStorageEntitySetCommand_initValidators).call(this);
30
+ get schema() {
31
+ return options;
27
32
  }
28
33
  async commandAction(logger, args) {
29
34
  try {
35
+ let appCatalogUrl = args.options.appCatalogUrl;
36
+ if (!appCatalogUrl) {
37
+ appCatalogUrl = await spo.getTenantAppCatalogUrl(logger, this.debug);
38
+ if (!appCatalogUrl) {
39
+ throw 'Tenant app catalog URL not found. Specify the URL of the app catalog site using the appCatalogUrl option.';
40
+ }
41
+ }
30
42
  const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
31
43
  const res = await spo.getRequestDigest(spoAdminUrl);
32
44
  if (this.verbose) {
33
- await logger.logToStderr(`Setting tenant property ${args.options.key} in ${args.options.appCatalogUrl}...`);
45
+ await logger.logToStderr(`Setting tenant property ${args.options.key} in ${appCatalogUrl}...`);
34
46
  }
35
47
  const requestOptions = {
36
48
  url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
37
49
  headers: {
38
50
  'X-RequestDigest': res.FormDigestValue
39
51
  },
40
- data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="24" ObjectPathId="23" /><ObjectPath Id="26" ObjectPathId="25" /><ObjectPath Id="28" ObjectPathId="27" /><Method Name="SetStorageEntity" Id="29" ObjectPathId="27"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.value)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.description || '')}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.comment || '')}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="23" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="25" ParentId="23" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.appCatalogUrl)}</Parameter></Parameters></Method><Property Id="27" ParentId="25" Name="RootWeb" /></ObjectPaths></Request>`
52
+ data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="24" ObjectPathId="23" /><ObjectPath Id="26" ObjectPathId="25" /><ObjectPath Id="28" ObjectPathId="27" /><Method Name="SetStorageEntity" Id="29" ObjectPathId="27"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.value)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.description || '')}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.comment || '')}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="23" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="25" ParentId="23" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(appCatalogUrl)}</Parameter></Parameters></Method><Property Id="27" ParentId="25" Name="RootWeb" /></ObjectPaths></Request>`
41
53
  };
42
54
  const processQuery = await request.post(requestOptions);
43
55
  const json = JSON.parse(processQuery);
@@ -56,27 +68,5 @@ class SpoStorageEntitySetCommand extends SpoCommand {
56
68
  }
57
69
  }
58
70
  }
59
- _SpoStorageEntitySetCommand_instances = new WeakSet(), _SpoStorageEntitySetCommand_initTelemetry = function _SpoStorageEntitySetCommand_initTelemetry() {
60
- this.telemetry.push((args) => {
61
- Object.assign(this.telemetryProperties, {
62
- description: (!(!args.options.description)).toString(),
63
- comment: (!(!args.options.comment)).toString()
64
- });
65
- });
66
- }, _SpoStorageEntitySetCommand_initOptions = function _SpoStorageEntitySetCommand_initOptions() {
67
- this.options.unshift({
68
- option: '-u, --appCatalogUrl <appCatalogUrl>'
69
- }, {
70
- option: '-k, --key <key>'
71
- }, {
72
- option: '-v, --value <value>'
73
- }, {
74
- option: '-d, --description [description]'
75
- }, {
76
- option: '-c, --comment [comment]'
77
- });
78
- }, _SpoStorageEntitySetCommand_initValidators = function _SpoStorageEntitySetCommand_initValidators() {
79
- this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.appCatalogUrl));
80
- };
81
71
  export default new SpoStorageEntitySetCommand();
82
72
  //# sourceMappingURL=storageentity-set.js.map
@@ -1,15 +1,22 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoUserEnsureCommand_instances, _SpoUserEnsureCommand_initTelemetry, _SpoUserEnsureCommand_initOptions, _SpoUserEnsureCommand_initValidators, _SpoUserEnsureCommand_initOptionSets, _SpoUserEnsureCommand_initTypes;
1
+ import { globalOptionsZod } from '../../../../Command.js';
7
2
  import request from '../../../../request.js';
8
3
  import { entraGroup } from '../../../../utils/entraGroup.js';
9
4
  import { validation } from '../../../../utils/validation.js';
10
5
  import SpoCommand from '../../../base/SpoCommand.js';
11
6
  import commands from '../../commands.js';
12
7
  import { entraUser } from '../../../../utils/entraUser.js';
8
+ import { z } from 'zod';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ webUrl: z.string().refine(webUrl => validation.isValidSharePointUrl(webUrl) === true, {
12
+ error: e => `${e.input} is not a valid SharePoint Online site URL.`
13
+ }).alias('u'),
14
+ entraId: z.string().refine(id => validation.isValidGuid(id), { error: e => `${e.input} is not a valid GUID.` }).optional(),
15
+ userName: z.string().refine(userName => validation.isValidUserPrincipalName(userName), { error: e => `${e.input} is not a valid userName.` }).optional(),
16
+ loginName: z.string().optional(),
17
+ entraGroupId: z.string().refine(id => validation.isValidGuid(id), { error: e => `${e.input} is not a valid GUID for option 'entraGroupId'.` }).optional(),
18
+ entraGroupName: z.string().optional()
19
+ });
13
20
  class SpoUserEnsureCommand extends SpoCommand {
14
21
  get name() {
15
22
  return commands.USER_ENSURE;
@@ -17,14 +24,17 @@ class SpoUserEnsureCommand extends SpoCommand {
17
24
  get description() {
18
25
  return 'Ensures that a user is available on a specific site';
19
26
  }
20
- constructor() {
21
- super();
22
- _SpoUserEnsureCommand_instances.add(this);
23
- __classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initTelemetry).call(this);
24
- __classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initValidators).call(this);
26
- __classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initOptionSets).call(this);
27
- __classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initTypes).call(this);
27
+ get schema() {
28
+ return options;
29
+ }
30
+ getRefinedSchema(schema) {
31
+ return schema.refine(opts => [opts.entraId, opts.userName, opts.loginName, opts.entraGroupId, opts.entraGroupName].filter(value => value !== undefined).length === 1, {
32
+ error: 'Specify one of the following options: entraId, userName, loginName, entraGroupId, entraGroupName.',
33
+ params: {
34
+ customCode: 'optionSet',
35
+ options: ['entraId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName']
36
+ }
37
+ });
28
38
  }
29
39
  async commandAction(logger, args) {
30
40
  if (this.verbose) {
@@ -73,51 +83,5 @@ class SpoUserEnsureCommand extends SpoCommand {
73
83
  return entraGroup.getGroupByDisplayName(entraGroupName);
74
84
  }
75
85
  }
76
- _SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelemetry = function _SpoUserEnsureCommand_initTelemetry() {
77
- this.telemetry.push((args) => {
78
- Object.assign(this.telemetryProperties, {
79
- entraId: typeof args.options.entraId !== 'undefined',
80
- userName: typeof args.options.userName !== 'undefined',
81
- loginName: typeof args.options.loginName !== 'undefined',
82
- entraGroupId: typeof args.options.entraGroupId !== 'undefined',
83
- entraGroupName: typeof args.options.entraGroupName !== 'undefined'
84
- });
85
- });
86
- }, _SpoUserEnsureCommand_initOptions = function _SpoUserEnsureCommand_initOptions() {
87
- this.options.unshift({
88
- option: '-u, --webUrl <webUrl>'
89
- }, {
90
- option: '--entraId [entraId]'
91
- }, {
92
- option: '--userName [userName]'
93
- }, {
94
- option: '--loginName [loginName]'
95
- }, {
96
- option: '--entraGroupId [entraGroupId]'
97
- }, {
98
- option: '--entraGroupName [entraGroupName]'
99
- });
100
- }, _SpoUserEnsureCommand_initValidators = function _SpoUserEnsureCommand_initValidators() {
101
- this.validators.push(async (args) => {
102
- const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
103
- if (isValidSharePointUrl !== true) {
104
- return isValidSharePointUrl;
105
- }
106
- if (args.options.entraId && !validation.isValidGuid(args.options.entraId)) {
107
- return `${args.options.entraId} is not a valid GUID.`;
108
- }
109
- if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
110
- return `${args.options.userName} is not a valid userName.`;
111
- }
112
- if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
113
- return `${args.options.entraGroupId} is not a valid GUID for option 'entraGroupId'.`;
114
- }
115
- return true;
116
- });
117
- }, _SpoUserEnsureCommand_initOptionSets = function _SpoUserEnsureCommand_initOptionSets() {
118
- this.optionSets.push({ options: ['entraId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName'] });
119
- }, _SpoUserEnsureCommand_initTypes = function _SpoUserEnsureCommand_initTypes() {
120
- this.types.string.push('webUrl', 'entraId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName');
121
- };
122
86
  export default new SpoUserEnsureCommand();
123
87
  //# sourceMappingURL=user-ensure.js.map
@@ -1,15 +1,23 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoUserGetCommand_instances, _SpoUserGetCommand_initTelemetry, _SpoUserGetCommand_initOptions, _SpoUserGetCommand_initTypes, _SpoUserGetCommand_initValidators, _SpoUserGetCommand_initOptionSets;
1
+ import { globalOptionsZod } from '../../../../Command.js';
7
2
  import request from '../../../../request.js';
8
3
  import { entraGroup } from '../../../../utils/entraGroup.js';
9
4
  import { formatting } from '../../../../utils/formatting.js';
10
5
  import { validation } from '../../../../utils/validation.js';
11
6
  import SpoCommand from '../../../base/SpoCommand.js';
12
7
  import commands from '../../commands.js';
8
+ import { z } from 'zod';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ webUrl: z.string().refine(webUrl => validation.isValidSharePointUrl(webUrl) === true, {
12
+ error: e => `${e.input} is not a valid SharePoint Online site URL.`
13
+ }).alias('u'),
14
+ id: z.number().int().positive().optional().alias('i'),
15
+ email: z.string().refine(email => validation.isValidUserPrincipalName(email), { error: e => `${e.input} is not a valid email.` }).optional(),
16
+ loginName: z.string().optional(),
17
+ userName: z.string().refine(userName => validation.isValidUserPrincipalName(userName), { error: e => `${e.input} is not a valid userName.` }).optional(),
18
+ entraGroupId: z.string().refine(id => validation.isValidGuid(id), { error: e => `${e.input} is not a valid GUID.` }).optional(),
19
+ entraGroupName: z.string().optional()
20
+ });
13
21
  class SpoUserGetCommand extends SpoCommand {
14
22
  get name() {
15
23
  return commands.USER_GET;
@@ -17,14 +25,17 @@ class SpoUserGetCommand extends SpoCommand {
17
25
  get description() {
18
26
  return 'Gets a site user within specific web';
19
27
  }
20
- constructor() {
21
- super();
22
- _SpoUserGetCommand_instances.add(this);
23
- __classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initTelemetry).call(this);
24
- __classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initValidators).call(this);
26
- __classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initOptionSets).call(this);
27
- __classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initTypes).call(this);
28
+ get schema() {
29
+ return options;
30
+ }
31
+ getRefinedSchema(schema) {
32
+ return schema.refine(opts => [opts.id, opts.email, opts.loginName, opts.userName, opts.entraGroupId, opts.entraGroupName].filter(value => value !== undefined).length <= 1, {
33
+ error: 'Specify no more than one of the following options: id, email, loginName, userName, entraGroupId, entraGroupName.',
34
+ params: {
35
+ customCode: 'optionSet',
36
+ options: ['id', 'email', 'loginName', 'userName', 'entraGroupId', 'entraGroupName']
37
+ }
38
+ });
28
39
  }
29
40
  async commandAction(logger, args) {
30
41
  if (this.verbose) {
@@ -96,56 +107,5 @@ class SpoUserGetCommand extends SpoCommand {
96
107
  return entraGroup.getGroupByDisplayName(entraGroupName);
97
108
  }
98
109
  }
99
- _SpoUserGetCommand_instances = new WeakSet(), _SpoUserGetCommand_initTelemetry = function _SpoUserGetCommand_initTelemetry() {
100
- this.telemetry.push((args) => {
101
- Object.assign(this.telemetryProperties, {
102
- id: typeof args.options.id !== 'undefined',
103
- email: typeof args.options.email !== 'undefined',
104
- loginName: typeof args.options.loginName !== 'undefined',
105
- userName: typeof args.options.userName !== 'undefined',
106
- entraGroupId: typeof args.options.entraGroupId !== 'undefined',
107
- entraGroupName: typeof args.options.entraGroupName !== 'undefined'
108
- });
109
- });
110
- }, _SpoUserGetCommand_initOptions = function _SpoUserGetCommand_initOptions() {
111
- this.options.unshift({
112
- option: '-u, --webUrl <webUrl>'
113
- }, {
114
- option: '-i, --id [id]'
115
- }, {
116
- option: '--email [email]'
117
- }, {
118
- option: '--loginName [loginName]'
119
- }, {
120
- option: '--userName [userName]'
121
- }, {
122
- option: '--entraGroupId [entraGroupId]'
123
- }, {
124
- option: '--entraGroupName [entraGroupName]'
125
- });
126
- }, _SpoUserGetCommand_initTypes = function _SpoUserGetCommand_initTypes() {
127
- this.types.string.push('webUrl', 'email', 'loginName', 'userName', 'entraGroupId', 'entraGroupName');
128
- }, _SpoUserGetCommand_initValidators = function _SpoUserGetCommand_initValidators() {
129
- this.validators.push(async (args) => {
130
- if (args.options.id && !validation.isValidPositiveInteger(args.options.id)) {
131
- return `Specified id ${args.options.id} is not a valid number.`;
132
- }
133
- if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
134
- return `${args.options.entraGroupId} is not a valid GUID.`;
135
- }
136
- if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
137
- return `${args.options.userName} is not a valid userName.`;
138
- }
139
- if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
140
- return `${args.options.email} is not a valid email.`;
141
- }
142
- return validation.isValidSharePointUrl(args.options.webUrl);
143
- });
144
- }, _SpoUserGetCommand_initOptionSets = function _SpoUserGetCommand_initOptionSets() {
145
- this.optionSets.push({
146
- options: ['id', 'email', 'loginName', 'userName', 'entraGroupId', 'entraGroupName'],
147
- runsWhen: (args) => args.options.id || args.options.email || args.options.loginName || args.options.userName || args.options.entraGroupId || args.options.entraGroupName
148
- });
149
- };
150
110
  export default new SpoUserGetCommand();
151
111
  //# sourceMappingURL=user-get.js.map
@@ -1,13 +1,15 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoUserListCommand_instances, _SpoUserListCommand_initOptions, _SpoUserListCommand_initValidators;
1
+ import { globalOptionsZod } from '../../../../Command.js';
7
2
  import request from '../../../../request.js';
8
3
  import { validation } from '../../../../utils/validation.js';
9
4
  import SpoCommand from '../../../base/SpoCommand.js';
10
5
  import commands from '../../commands.js';
6
+ import { z } from 'zod';
7
+ export const options = z.strictObject({
8
+ ...globalOptionsZod.shape,
9
+ webUrl: z.string().refine(webUrl => validation.isValidSharePointUrl(webUrl) === true, {
10
+ error: e => `${e.input} is not a valid SharePoint Online site URL.`
11
+ }).alias('u')
12
+ });
11
13
  class SpoUserListCommand extends SpoCommand {
12
14
  get name() {
13
15
  return commands.USER_LIST;
@@ -18,11 +20,8 @@ class SpoUserListCommand extends SpoCommand {
18
20
  defaultProperties() {
19
21
  return ['Id', 'Title', 'LoginName'];
20
22
  }
21
- constructor() {
22
- super();
23
- _SpoUserListCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _SpoUserListCommand_instances, "m", _SpoUserListCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _SpoUserListCommand_instances, "m", _SpoUserListCommand_initValidators).call(this);
23
+ get schema() {
24
+ return options;
26
25
  }
27
26
  async commandAction(logger, args) {
28
27
  if (this.verbose) {
@@ -45,12 +44,5 @@ class SpoUserListCommand extends SpoCommand {
45
44
  }
46
45
  }
47
46
  }
48
- _SpoUserListCommand_instances = new WeakSet(), _SpoUserListCommand_initOptions = function _SpoUserListCommand_initOptions() {
49
- this.options.unshift({
50
- option: '-u, --webUrl <webUrl>'
51
- });
52
- }, _SpoUserListCommand_initValidators = function _SpoUserListCommand_initValidators() {
53
- this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
54
- };
55
47
  export default new SpoUserListCommand();
56
48
  //# sourceMappingURL=user-list.js.map
@@ -1,10 +1,5 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoUserRemoveCommand_instances, _SpoUserRemoveCommand_initTelemetry, _SpoUserRemoveCommand_initOptions, _SpoUserRemoveCommand_initValidators, _SpoUserRemoveCommand_initOptionSets;
7
1
  import { cli } from '../../../../cli/cli.js';
2
+ import { globalOptionsZod } from '../../../../Command.js';
8
3
  import { spo } from '../../../../utils/spo.js';
9
4
  import request from '../../../../request.js';
10
5
  import { entraGroup } from '../../../../utils/entraGroup.js';
@@ -12,6 +7,20 @@ import { formatting } from '../../../../utils/formatting.js';
12
7
  import { validation } from '../../../../utils/validation.js';
13
8
  import SpoCommand from '../../../base/SpoCommand.js';
14
9
  import commands from '../../commands.js';
10
+ import { z } from 'zod';
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ webUrl: z.string().refine(webUrl => validation.isValidSharePointUrl(webUrl) === true, {
14
+ error: e => `${e.input} is not a valid SharePoint Online site URL.`
15
+ }).alias('u'),
16
+ id: z.number().int().positive().optional().alias('i'),
17
+ loginName: z.string().optional(),
18
+ email: z.string().refine(email => validation.isValidUserPrincipalName(email), { error: e => `${e.input} is not a valid email.` }).optional(),
19
+ userName: z.string().refine(userName => validation.isValidUserPrincipalName(userName), { error: e => `${e.input} is not a valid userName.` }).optional(),
20
+ entraGroupId: z.string().refine(id => validation.isValidGuid(id), { error: e => `${e.input} is not a valid GUID.` }).optional(),
21
+ entraGroupName: z.string().optional(),
22
+ force: z.boolean().optional().alias('f')
23
+ });
15
24
  ;
16
25
  class SpoUserRemoveCommand extends SpoCommand {
17
26
  get name() {
@@ -20,13 +29,17 @@ class SpoUserRemoveCommand extends SpoCommand {
20
29
  get description() {
21
30
  return 'Removes user from specific web';
22
31
  }
23
- constructor() {
24
- super();
25
- _SpoUserRemoveCommand_instances.add(this);
26
- __classPrivateFieldGet(this, _SpoUserRemoveCommand_instances, "m", _SpoUserRemoveCommand_initTelemetry).call(this);
27
- __classPrivateFieldGet(this, _SpoUserRemoveCommand_instances, "m", _SpoUserRemoveCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _SpoUserRemoveCommand_instances, "m", _SpoUserRemoveCommand_initValidators).call(this);
29
- __classPrivateFieldGet(this, _SpoUserRemoveCommand_instances, "m", _SpoUserRemoveCommand_initOptionSets).call(this);
32
+ get schema() {
33
+ return options;
34
+ }
35
+ getRefinedSchema(schema) {
36
+ return schema.refine(opts => [opts.id, opts.loginName, opts.email, opts.userName, opts.entraGroupId, opts.entraGroupName].filter(value => value !== undefined).length === 1, {
37
+ error: 'Specify one of the following options: id, loginName, email, userName, entraGroupId, entraGroupName.',
38
+ params: {
39
+ customCode: 'optionSet',
40
+ options: ['id', 'loginName', 'email', 'userName', 'entraGroupId', 'entraGroupName']
41
+ }
42
+ });
30
43
  }
31
44
  async commandAction(logger, args) {
32
45
  if (args.options.force) {
@@ -109,60 +122,5 @@ class SpoUserRemoveCommand extends SpoCommand {
109
122
  return options.entraGroupId ? await entraGroup.getGroupById(options.entraGroupId) : await entraGroup.getGroupByDisplayName(options.entraGroupName);
110
123
  }
111
124
  }
112
- _SpoUserRemoveCommand_instances = new WeakSet(), _SpoUserRemoveCommand_initTelemetry = function _SpoUserRemoveCommand_initTelemetry() {
113
- this.telemetry.push((args) => {
114
- Object.assign(this.telemetryProperties, {
115
- id: typeof args.options.id !== 'undefined',
116
- loginName: typeof args.options.loginName !== 'undefined',
117
- email: typeof args.options.email !== 'undefined',
118
- userName: typeof args.options.userName !== 'undefined',
119
- entraGroupId: typeof args.options.entraGroupId !== 'undefined',
120
- entraGroupName: typeof args.options.entraGroupName !== 'undefined',
121
- force: !!args.options.force
122
- });
123
- });
124
- }, _SpoUserRemoveCommand_initOptions = function _SpoUserRemoveCommand_initOptions() {
125
- this.options.unshift({
126
- option: '-u, --webUrl <webUrl>'
127
- }, {
128
- option: '-i, --id [id]'
129
- }, {
130
- option: '--loginName [loginName]'
131
- }, {
132
- option: '--email [email]'
133
- }, {
134
- option: '--userName [userName]'
135
- }, {
136
- option: '--entraGroupId [entraGroupId]'
137
- }, {
138
- option: '--entraGroupName [entraGroupName]'
139
- }, {
140
- option: '-f, --force'
141
- });
142
- }, _SpoUserRemoveCommand_initValidators = function _SpoUserRemoveCommand_initValidators() {
143
- this.validators.push(async (args) => {
144
- const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
145
- if (isValidSharePointUrl !== true) {
146
- return isValidSharePointUrl;
147
- }
148
- if (args.options.id && isNaN(parseInt(args.options.id))) {
149
- return `Specified id ${args.options.id} is not a number`;
150
- }
151
- if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
152
- return `${args.options.entraId} is not a valid GUID.`;
153
- }
154
- if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
155
- return `${args.options.userName} is not a valid userName.`;
156
- }
157
- if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
158
- return `${args.options.email} is not a valid email.`;
159
- }
160
- return true;
161
- });
162
- }, _SpoUserRemoveCommand_initOptionSets = function _SpoUserRemoveCommand_initOptionSets() {
163
- this.optionSets.push({
164
- options: ['id', 'loginName', 'email', 'userName', 'entraGroupId', 'entraGroupName']
165
- });
166
- };
167
125
  export default new SpoUserRemoveCommand();
168
126
  //# sourceMappingURL=user-remove.js.map
@@ -1,16 +1,18 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoUserProfileGetCommand_instances, _SpoUserProfileGetCommand_initOptions, _SpoUserProfileGetCommand_initValidators;
7
1
  import { cli } from '../../../../cli/cli.js';
2
+ import { globalOptionsZod } from '../../../../Command.js';
8
3
  import request from '../../../../request.js';
9
4
  import { formatting } from '../../../../utils/formatting.js';
10
5
  import { spo } from '../../../../utils/spo.js';
11
6
  import { validation } from '../../../../utils/validation.js';
12
7
  import SpoCommand from '../../../base/SpoCommand.js';
13
8
  import commands from '../../commands.js';
9
+ import { z } from 'zod';
10
+ export const options = z.strictObject({
11
+ ...globalOptionsZod.shape,
12
+ userName: z.string().refine(userName => validation.isValidUserPrincipalName(userName), {
13
+ error: e => `${e.input} is not a valid user principal name`
14
+ }).alias('u')
15
+ });
14
16
  class SpoUserProfileGetCommand extends SpoCommand {
15
17
  get name() {
16
18
  return commands.USERPROFILE_GET;
@@ -18,11 +20,8 @@ class SpoUserProfileGetCommand extends SpoCommand {
18
20
  get description() {
19
21
  return 'Gets SharePoint user profile properties for the specified user';
20
22
  }
21
- constructor() {
22
- super();
23
- _SpoUserProfileGetCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _SpoUserProfileGetCommand_instances, "m", _SpoUserProfileGetCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _SpoUserProfileGetCommand_instances, "m", _SpoUserProfileGetCommand_initValidators).call(this);
23
+ get schema() {
24
+ return options;
26
25
  }
27
26
  async commandAction(logger, args) {
28
27
  try {
@@ -46,17 +45,5 @@ class SpoUserProfileGetCommand extends SpoCommand {
46
45
  }
47
46
  }
48
47
  }
49
- _SpoUserProfileGetCommand_instances = new WeakSet(), _SpoUserProfileGetCommand_initOptions = function _SpoUserProfileGetCommand_initOptions() {
50
- this.options.unshift({
51
- option: '-u, --userName <userName>'
52
- });
53
- }, _SpoUserProfileGetCommand_initValidators = function _SpoUserProfileGetCommand_initValidators() {
54
- this.validators.push(async (args) => {
55
- if (!validation.isValidUserPrincipalName(args.options.userName)) {
56
- return `${args.options.userName} is not a valid user principal name`;
57
- }
58
- return true;
59
- });
60
- };
61
48
  export default new SpoUserProfileGetCommand();
62
49
  //# sourceMappingURL=userprofile-get.js.map