@pnp/cli-microsoft365 9.1.0-beta.acd25f7 → 10.0.0-beta.04ac437
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.
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/cli/cli.js +1 -1
- package/dist/m365/app/commands/permission/permission-add.js +9 -9
- package/dist/m365/cli/commands/cli-consent.js +3 -7
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/commands/setupPresets.js +2 -4
- package/dist/m365/commands/status.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +13 -13
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +18 -18
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -1
- package/dist/m365/entra/commands/group/group-user-list.js +4 -4
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +4 -4
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +3 -3
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +6 -9
- package/dist/m365/outlook/commands/message/message-get.js +11 -11
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +1 -1
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -10
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +0 -1
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +8 -8
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
- package/dist/m365/spo/commands/file/file-copy.js +59 -34
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/folder/folder-set.js +0 -4
- package/dist/m365/spo/commands/list/list-list.js +1 -4
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +48 -24
- package/dist/m365/spo/commands/site/site-remove.js +1 -7
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +2 -22
- package/dist/m365/spo/commands.js +0 -1
- package/dist/m365/viva/commands/engage/engage-group-list.js +0 -5
- package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -5
- package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-add.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-get.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-like-set.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-list.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-remove.js +0 -5
- package/dist/m365/viva/commands/engage/engage-network-list.js +0 -5
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-search.js +0 -5
- package/dist/m365/viva/commands/engage/engage-user-get.js +0 -5
- package/dist/m365/viva/commands/engage/engage-user-list.js +0 -5
- package/dist/settingsNames.js +0 -1
- package/dist/utils/spo.js +76 -0
- package/docs/docs/_clisettings.mdx +0 -1
- package/docs/docs/cmd/app/permission/permission-add.mdx +5 -5
- package/docs/docs/cmd/cli/cli-consent.mdx +1 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +12 -12
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +14 -14
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +5 -5
- package/docs/docs/cmd/entra/group/group-user-list.mdx +7 -7
- package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +5 -5
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +3 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
- package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
- package/docs/docs/cmd/setup.mdx +1 -3
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +11 -12
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +6 -5
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +7 -7
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-copy.mdx +119 -12
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
- package/docs/docs/cmd/spo/folder/folder-set.mdx +0 -6
- package/docs/docs/cmd/spo/list/list-list.mdx +5 -7
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +11 -2
- package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +2 -49
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/m365/viva/commands/engage/yammerCommands.js +0 -25
package/dist/cli/cli.js
CHANGED
|
@@ -60,7 +60,7 @@ function getSettingWithDefaultValue(settingName, defaultValue) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
function getClientId() {
|
|
63
|
-
return cli.getSettingWithDefaultValue(settingsNames.clientId, process.env.CLIMICROSOFT365_ENTRAAPPID
|
|
63
|
+
return cli.getSettingWithDefaultValue(settingsNames.clientId, process.env.CLIMICROSOFT365_ENTRAAPPID);
|
|
64
64
|
}
|
|
65
65
|
function getTenant() {
|
|
66
66
|
return cli.getSettingWithDefaultValue(settingsNames.tenantId, process.env.CLIMICROSOFT365_TENANT || 'common');
|
|
@@ -33,12 +33,12 @@ class AppPermissionAddCommand extends AppCommand {
|
|
|
33
33
|
const appObject = await this.getAppObject();
|
|
34
34
|
const servicePrincipals = await odata.getAllItems(`${this.resource}/v1.0/myorganization/servicePrincipals?$select=appId,appRoles,id,oauth2PermissionScopes,servicePrincipalNames`);
|
|
35
35
|
const appPermissions = [];
|
|
36
|
-
if (args.options.
|
|
37
|
-
const delegatedPermissions = await this.getRequiredResourceAccessForApis(servicePrincipals, args.options.
|
|
36
|
+
if (args.options.delegatedPermissions) {
|
|
37
|
+
const delegatedPermissions = await this.getRequiredResourceAccessForApis(servicePrincipals, args.options.delegatedPermissions, ScopeType.Scope, appPermissions, logger);
|
|
38
38
|
this.addPermissionsToResourceArray(delegatedPermissions, appObject.requiredResourceAccess);
|
|
39
39
|
}
|
|
40
|
-
if (args.options.
|
|
41
|
-
const applicationPermissions = await this.getRequiredResourceAccessForApis(servicePrincipals, args.options.
|
|
40
|
+
if (args.options.applicationPermissions) {
|
|
41
|
+
const applicationPermissions = await this.getRequiredResourceAccessForApis(servicePrincipals, args.options.applicationPermissions, ScopeType.Role, appPermissions, logger);
|
|
42
42
|
this.addPermissionsToResourceArray(applicationPermissions, appObject.requiredResourceAccess);
|
|
43
43
|
}
|
|
44
44
|
const addPermissionsRequestOptions = {
|
|
@@ -198,17 +198,17 @@ _AppPermissionAddCommand_instances = new WeakSet(), _AppPermissionAddCommand_ini
|
|
|
198
198
|
this.telemetry.push((args) => {
|
|
199
199
|
Object.assign(this.telemetryProperties, {
|
|
200
200
|
appId: typeof args.options.appId !== 'undefined',
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
applicationPermissions: typeof args.options.applicationPermissions !== 'undefined',
|
|
202
|
+
delegatedPermissions: typeof args.options.delegatedPermissions !== 'undefined',
|
|
203
203
|
grantAdminConsent: !!args.options.grantAdminConsent
|
|
204
204
|
});
|
|
205
205
|
});
|
|
206
206
|
}, _AppPermissionAddCommand_initOptions = function _AppPermissionAddCommand_initOptions() {
|
|
207
|
-
this.options.unshift({ option: '--appId [appId]' }, { option: '--
|
|
207
|
+
this.options.unshift({ option: '--appId [appId]' }, { option: '--applicationPermissions [applicationPermissions]' }, { option: '--delegatedPermissions [delegatedPermissions]' }, { option: '--grantAdminConsent' });
|
|
208
208
|
}, _AppPermissionAddCommand_initOptionSets = function _AppPermissionAddCommand_initOptionSets() {
|
|
209
209
|
this.optionSets.push({
|
|
210
|
-
options: ['
|
|
211
|
-
runsWhen: (args) => args.options.
|
|
210
|
+
options: ['applicationPermissions', 'delegatedPermissions'],
|
|
211
|
+
runsWhen: (args) => args.options.delegatedPermissions === undefined && args.options.applicationPermissions === undefined
|
|
212
212
|
});
|
|
213
213
|
};
|
|
214
214
|
export default new AppPermissionAddCommand();
|
|
@@ -23,12 +23,8 @@ class CliConsentCommand extends AnonymousCommand {
|
|
|
23
23
|
}
|
|
24
24
|
async commandAction(logger, args) {
|
|
25
25
|
let scope = '';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
await this.warn(logger, 'The yammer service is deprecated. Please use the VivaEngage service instead.');
|
|
29
|
-
case 'VivaEngage':
|
|
30
|
-
scope = 'https://api.yammer.com/user_impersonation';
|
|
31
|
-
break;
|
|
26
|
+
if (args.options.service === 'VivaEngage') {
|
|
27
|
+
scope = 'https://api.yammer.com/user_impersonation';
|
|
32
28
|
}
|
|
33
29
|
await logger.log(`To consent permissions for executing ${args.options.service} commands, navigate in your web browser to https://login.microsoftonline.com/${cli.getTenant()}/oauth2/v2.0/authorize?client_id=${cli.getClientId()}&response_type=code&scope=${encodeURIComponent(scope)}`);
|
|
34
30
|
}
|
|
@@ -50,7 +46,7 @@ _CliConsentCommand_instances = new WeakSet(), _CliConsentCommand_initTelemetry =
|
|
|
50
46
|
});
|
|
51
47
|
}, _CliConsentCommand_initValidators = function _CliConsentCommand_initValidators() {
|
|
52
48
|
this.validators.push(async (args) => {
|
|
53
|
-
if (args.options.service !== 'VivaEngage'
|
|
49
|
+
if (args.options.service !== 'VivaEngage') {
|
|
54
50
|
return `${args.options.service} is not a valid value for the service option. Allowed values: VivaEngage`;
|
|
55
51
|
}
|
|
56
52
|
return true;
|
|
@@ -36,7 +36,6 @@ class CliConfigSetCommand extends AnonymousCommand {
|
|
|
36
36
|
case settingsNames.printErrorsAsPlainText:
|
|
37
37
|
case settingsNames.prompt:
|
|
38
38
|
case settingsNames.showHelpOnFailure:
|
|
39
|
-
case settingsNames.showSpinner:
|
|
40
39
|
value = args.options.value === 'true';
|
|
41
40
|
break;
|
|
42
41
|
default:
|
|
@@ -4,8 +4,7 @@ export const interactivePreset = {
|
|
|
4
4
|
output: 'text',
|
|
5
5
|
printErrorsAsPlainText: true,
|
|
6
6
|
prompt: true,
|
|
7
|
-
showHelpOnFailure: true
|
|
8
|
-
showSpinner: true
|
|
7
|
+
showHelpOnFailure: true
|
|
9
8
|
};
|
|
10
9
|
export const scriptingPreset = {
|
|
11
10
|
autoOpenLinksInBrowser: false,
|
|
@@ -13,8 +12,7 @@ export const scriptingPreset = {
|
|
|
13
12
|
output: 'json',
|
|
14
13
|
printErrorsAsPlainText: false,
|
|
15
14
|
prompt: false,
|
|
16
|
-
showHelpOnFailure: false
|
|
17
|
-
showSpinner: false
|
|
15
|
+
showHelpOnFailure: false
|
|
18
16
|
};
|
|
19
17
|
export const powerShellPreset = {
|
|
20
18
|
errorOutput: 'stdout'
|
|
@@ -30,8 +30,8 @@ class StatusCommand extends Command {
|
|
|
30
30
|
const connections = await auth.getAllConnections();
|
|
31
31
|
if (this.verbose) {
|
|
32
32
|
const message = connections.length > 0
|
|
33
|
-
? `Logged out
|
|
34
|
-
: 'Logged out
|
|
33
|
+
? `Logged out, signed in connections available`
|
|
34
|
+
: 'Logged out';
|
|
35
35
|
await logger.logToStderr(message);
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
@@ -30,12 +30,12 @@ class EntraEnterpriseAppAddCommand extends GraphCommand {
|
|
|
30
30
|
__classPrivateFieldGet(this, _EntraEnterpriseAppAddCommand_instances, "m", _EntraEnterpriseAppAddCommand_initOptionSets).call(this);
|
|
31
31
|
}
|
|
32
32
|
async getAppId(args) {
|
|
33
|
-
if (args.options.
|
|
34
|
-
return args.options.
|
|
33
|
+
if (args.options.id) {
|
|
34
|
+
return args.options.id;
|
|
35
35
|
}
|
|
36
36
|
let spMatchQuery = '';
|
|
37
|
-
if (args.options.
|
|
38
|
-
spMatchQuery = `displayName eq '${formatting.encodeQueryParameter(args.options.
|
|
37
|
+
if (args.options.displayName) {
|
|
38
|
+
spMatchQuery = `displayName eq '${formatting.encodeQueryParameter(args.options.displayName)}'`;
|
|
39
39
|
}
|
|
40
40
|
else if (args.options.objectId) {
|
|
41
41
|
spMatchQuery = `id eq '${formatting.encodeQueryParameter(args.options.objectId)}'`;
|
|
@@ -54,7 +54,7 @@ class EntraEnterpriseAppAddCommand extends GraphCommand {
|
|
|
54
54
|
}
|
|
55
55
|
if (response.value.length > 1) {
|
|
56
56
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('appId', response.value);
|
|
57
|
-
const result = await cli.handleMultipleResultsFound(`Multiple Entra apps with name '${args.options.
|
|
57
|
+
const result = await cli.handleMultipleResultsFound(`Multiple Entra apps with name '${args.options.displayName}' found.`, resultAsKeyValuePair);
|
|
58
58
|
return result.appId;
|
|
59
59
|
}
|
|
60
60
|
return spItem.appId;
|
|
@@ -85,31 +85,31 @@ class EntraEnterpriseAppAddCommand extends GraphCommand {
|
|
|
85
85
|
_EntraEnterpriseAppAddCommand_instances = new WeakSet(), _EntraEnterpriseAppAddCommand_initTelemetry = function _EntraEnterpriseAppAddCommand_initTelemetry() {
|
|
86
86
|
this.telemetry.push((args) => {
|
|
87
87
|
Object.assign(this.telemetryProperties, {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
id: (!(!args.options.id)).toString(),
|
|
89
|
+
displayName: (!(!args.options.displayName)).toString(),
|
|
90
90
|
objectId: (!(!args.options.objectId)).toString()
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
}, _EntraEnterpriseAppAddCommand_initOptions = function _EntraEnterpriseAppAddCommand_initOptions() {
|
|
94
94
|
this.options.unshift({
|
|
95
|
-
option: '--
|
|
95
|
+
option: '-i, --id [id]'
|
|
96
96
|
}, {
|
|
97
|
-
option: '--
|
|
97
|
+
option: '-n, --displayName [displayName]'
|
|
98
98
|
}, {
|
|
99
99
|
option: '--objectId [objectId]'
|
|
100
100
|
});
|
|
101
101
|
}, _EntraEnterpriseAppAddCommand_initValidators = function _EntraEnterpriseAppAddCommand_initValidators() {
|
|
102
102
|
this.validators.push(async (args) => {
|
|
103
|
-
if (args.options.
|
|
104
|
-
return `${args.options.
|
|
103
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
104
|
+
return `${args.options.id} is not a valid GUID`;
|
|
105
105
|
}
|
|
106
106
|
if (args.options.objectId && !validation.isValidGuid(args.options.objectId)) {
|
|
107
|
-
return `${args.options.objectId} is not a valid
|
|
107
|
+
return `${args.options.objectId} is not a valid GUID`;
|
|
108
108
|
}
|
|
109
109
|
return true;
|
|
110
110
|
});
|
|
111
111
|
}, _EntraEnterpriseAppAddCommand_initOptionSets = function _EntraEnterpriseAppAddCommand_initOptionSets() {
|
|
112
|
-
this.optionSets.push({ options: ['
|
|
112
|
+
this.optionSets.push({ options: ['id', 'displayName', 'objectId'] });
|
|
113
113
|
};
|
|
114
114
|
export default new EntraEnterpriseAppAddCommand();
|
|
115
115
|
//# sourceMappingURL=enterpriseapp-add.js.map
|
|
@@ -30,15 +30,15 @@ class EntraEnterpriseAppGetCommand extends GraphCommand {
|
|
|
30
30
|
__classPrivateFieldGet(this, _EntraEnterpriseAppGetCommand_instances, "m", _EntraEnterpriseAppGetCommand_initOptionSets).call(this);
|
|
31
31
|
}
|
|
32
32
|
async getSpId(args) {
|
|
33
|
-
if (args.options.
|
|
34
|
-
return args.options.
|
|
33
|
+
if (args.options.objectId) {
|
|
34
|
+
return args.options.objectId;
|
|
35
35
|
}
|
|
36
36
|
let spMatchQuery = '';
|
|
37
|
-
if (args.options.
|
|
38
|
-
spMatchQuery = `displayName eq '${formatting.encodeQueryParameter(args.options.
|
|
37
|
+
if (args.options.displayName) {
|
|
38
|
+
spMatchQuery = `displayName eq '${formatting.encodeQueryParameter(args.options.displayName)}'`;
|
|
39
39
|
}
|
|
40
|
-
else if (args.options.
|
|
41
|
-
spMatchQuery = `appId eq '${formatting.encodeQueryParameter(args.options.
|
|
40
|
+
else if (args.options.id) {
|
|
41
|
+
spMatchQuery = `appId eq '${formatting.encodeQueryParameter(args.options.id)}'`;
|
|
42
42
|
}
|
|
43
43
|
const idRequestOptions = {
|
|
44
44
|
url: `${this.resource}/v1.0/servicePrincipals?$filter=${spMatchQuery}`,
|
|
@@ -54,7 +54,7 @@ class EntraEnterpriseAppGetCommand extends GraphCommand {
|
|
|
54
54
|
}
|
|
55
55
|
if (response.value.length > 1) {
|
|
56
56
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
|
|
57
|
-
const result = await cli.handleMultipleResultsFound(`Multiple Entra apps with name '${args.options.
|
|
57
|
+
const result = await cli.handleMultipleResultsFound(`Multiple Entra apps with name '${args.options.displayName}' found.`, resultAsKeyValuePair);
|
|
58
58
|
return result.id;
|
|
59
59
|
}
|
|
60
60
|
return spItem.id;
|
|
@@ -85,31 +85,31 @@ class EntraEnterpriseAppGetCommand extends GraphCommand {
|
|
|
85
85
|
_EntraEnterpriseAppGetCommand_instances = new WeakSet(), _EntraEnterpriseAppGetCommand_initTelemetry = function _EntraEnterpriseAppGetCommand_initTelemetry() {
|
|
86
86
|
this.telemetry.push((args) => {
|
|
87
87
|
Object.assign(this.telemetryProperties, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
id: (!(!args.options.id)).toString(),
|
|
89
|
+
displayName: (!(!args.options.displayName)).toString(),
|
|
90
|
+
objectId: (!(!args.options.objectId)).toString()
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
}, _EntraEnterpriseAppGetCommand_initOptions = function _EntraEnterpriseAppGetCommand_initOptions() {
|
|
94
94
|
this.options.unshift({
|
|
95
|
-
option: '-i, --
|
|
95
|
+
option: '-i, --id [id]'
|
|
96
96
|
}, {
|
|
97
|
-
option: '-n, --
|
|
97
|
+
option: '-n, --displayName [displayName]'
|
|
98
98
|
}, {
|
|
99
|
-
option: '--
|
|
99
|
+
option: '--objectId [objectId]'
|
|
100
100
|
});
|
|
101
101
|
}, _EntraEnterpriseAppGetCommand_initValidators = function _EntraEnterpriseAppGetCommand_initValidators() {
|
|
102
102
|
this.validators.push(async (args) => {
|
|
103
|
-
if (args.options.
|
|
104
|
-
return `${args.options.
|
|
103
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
104
|
+
return `${args.options.id} is not a valid GUID`;
|
|
105
105
|
}
|
|
106
|
-
if (args.options.
|
|
107
|
-
return `${args.options.
|
|
106
|
+
if (args.options.objectId && !validation.isValidGuid(args.options.objectId)) {
|
|
107
|
+
return `${args.options.objectId} is not a valid GUID`;
|
|
108
108
|
}
|
|
109
109
|
return true;
|
|
110
110
|
});
|
|
111
111
|
}, _EntraEnterpriseAppGetCommand_initOptionSets = function _EntraEnterpriseAppGetCommand_initOptionSets() {
|
|
112
|
-
this.optionSets.push({ options: ['
|
|
112
|
+
this.optionSets.push({ options: ['id', 'displayName', 'objectId'] });
|
|
113
113
|
};
|
|
114
114
|
export default new EntraEnterpriseAppGetCommand();
|
|
115
115
|
//# sourceMappingURL=enterpriseapp-get.js.map
|
|
@@ -61,7 +61,7 @@ _EntraEnterpriseAppListCommand_instances = new WeakSet(), _EntraEnterpriseAppLis
|
|
|
61
61
|
});
|
|
62
62
|
}, _EntraEnterpriseAppListCommand_initOptions = function _EntraEnterpriseAppListCommand_initOptions() {
|
|
63
63
|
this.options.unshift({
|
|
64
|
-
option: '--displayName [displayName]'
|
|
64
|
+
option: '-n, --displayName [displayName]'
|
|
65
65
|
}, {
|
|
66
66
|
option: '--tag [tag]'
|
|
67
67
|
});
|
|
@@ -65,7 +65,7 @@ class EntraGroupUserListCommand extends GraphCommand {
|
|
|
65
65
|
if (this.verbose) {
|
|
66
66
|
await logger.logToStderr('Retrieving Group Id...');
|
|
67
67
|
}
|
|
68
|
-
return await entraGroup.getGroupIdByDisplayName(options.
|
|
68
|
+
return await entraGroup.getGroupIdByDisplayName(options.groupName);
|
|
69
69
|
}
|
|
70
70
|
async getUsers(options, role, groupId, logger) {
|
|
71
71
|
const { properties, filter } = options;
|
|
@@ -111,7 +111,7 @@ _EntraGroupUserListCommand_instances = new WeakSet(), _EntraGroupUserListCommand
|
|
|
111
111
|
this.telemetry.push((args) => {
|
|
112
112
|
Object.assign(this.telemetryProperties, {
|
|
113
113
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
114
|
-
|
|
114
|
+
groupName: typeof args.options.groupName !== 'undefined',
|
|
115
115
|
role: typeof args.options.role !== 'undefined',
|
|
116
116
|
properties: typeof args.options.properties !== 'undefined',
|
|
117
117
|
filter: typeof args.options.filter !== 'undefined'
|
|
@@ -121,7 +121,7 @@ _EntraGroupUserListCommand_instances = new WeakSet(), _EntraGroupUserListCommand
|
|
|
121
121
|
this.options.unshift({
|
|
122
122
|
option: "-i, --groupId [groupId]"
|
|
123
123
|
}, {
|
|
124
|
-
option: "-n, --
|
|
124
|
+
option: "-n, --groupName [groupName]"
|
|
125
125
|
}, {
|
|
126
126
|
option: "-r, --role [role]",
|
|
127
127
|
autocomplete: ["Owner", "Member"]
|
|
@@ -132,7 +132,7 @@ _EntraGroupUserListCommand_instances = new WeakSet(), _EntraGroupUserListCommand
|
|
|
132
132
|
});
|
|
133
133
|
}, _EntraGroupUserListCommand_initOptionSets = function _EntraGroupUserListCommand_initOptionSets() {
|
|
134
134
|
this.optionSets.push({
|
|
135
|
-
options: ['groupId', '
|
|
135
|
+
options: ['groupId', 'groupName']
|
|
136
136
|
});
|
|
137
137
|
}, _EntraGroupUserListCommand_initValidators = function _EntraGroupUserListCommand_initValidators() {
|
|
138
138
|
this.validators.push(async (args) => {
|
|
@@ -51,7 +51,7 @@ class EntraM365GroupConversationPostListCommand extends GraphCommand {
|
|
|
51
51
|
if (args.options.groupId) {
|
|
52
52
|
return formatting.encodeQueryParameter(args.options.groupId);
|
|
53
53
|
}
|
|
54
|
-
const group = await entraGroup.getGroupByDisplayName(args.options.
|
|
54
|
+
const group = await entraGroup.getGroupByDisplayName(args.options.groupName);
|
|
55
55
|
return group.id;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -59,14 +59,14 @@ _EntraM365GroupConversationPostListCommand_instances = new WeakSet(), _EntraM365
|
|
|
59
59
|
this.telemetry.push((args) => {
|
|
60
60
|
Object.assign(this.telemetryProperties, {
|
|
61
61
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
62
|
-
|
|
62
|
+
groupName: typeof args.options.groupName !== 'undefined'
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
}, _EntraM365GroupConversationPostListCommand_initOptions = function _EntraM365GroupConversationPostListCommand_initOptions() {
|
|
66
66
|
this.options.unshift({
|
|
67
67
|
option: '-i, --groupId [groupId]'
|
|
68
68
|
}, {
|
|
69
|
-
option: '-d, --
|
|
69
|
+
option: '-d, --groupName [groupName]'
|
|
70
70
|
}, {
|
|
71
71
|
option: '-t, --threadId <threadId>'
|
|
72
72
|
});
|
|
@@ -78,7 +78,7 @@ _EntraM365GroupConversationPostListCommand_instances = new WeakSet(), _EntraM365
|
|
|
78
78
|
return true;
|
|
79
79
|
});
|
|
80
80
|
}, _EntraM365GroupConversationPostListCommand_initOptionSets = function _EntraM365GroupConversationPostListCommand_initOptionSets() {
|
|
81
|
-
this.optionSets.push({ options: ['groupId', '
|
|
81
|
+
this.optionSets.push({ options: ['groupId', 'groupName'] });
|
|
82
82
|
};
|
|
83
83
|
export default new EntraM365GroupConversationPostListCommand();
|
|
84
84
|
//# sourceMappingURL=m365group-conversation-post-list.js.map
|
|
@@ -32,7 +32,7 @@ class EntraM365GroupRecycleBinItemListCommand extends GraphCommand {
|
|
|
32
32
|
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_RECYCLEBINITEM_LIST, commands.M365GROUP_RECYCLEBINITEM_LIST);
|
|
33
33
|
try {
|
|
34
34
|
const filter = `?$filter=groupTypes/any(c:c+eq+'Unified')`;
|
|
35
|
-
const displayNameFilter = args.options.
|
|
35
|
+
const displayNameFilter = args.options.groupName ? ` and startswith(DisplayName,'${formatting.encodeQueryParameter(args.options.groupName).replace(/'/g, `''`)}')` : '';
|
|
36
36
|
const mailNicknameFilter = args.options.groupMailNickname ? ` and startswith(MailNickname,'${formatting.encodeQueryParameter(args.options.groupMailNickname).replace(/'/g, `''`)}')` : '';
|
|
37
37
|
const topCount = '&$top=100';
|
|
38
38
|
const endpoint = `${this.resource}/v1.0/directory/deletedItems/Microsoft.Graph.Group${filter}${displayNameFilter}${mailNicknameFilter}${topCount}`;
|
|
@@ -47,13 +47,13 @@ class EntraM365GroupRecycleBinItemListCommand extends GraphCommand {
|
|
|
47
47
|
_EntraM365GroupRecycleBinItemListCommand_instances = new WeakSet(), _EntraM365GroupRecycleBinItemListCommand_initTelemetry = function _EntraM365GroupRecycleBinItemListCommand_initTelemetry() {
|
|
48
48
|
this.telemetry.push((args) => {
|
|
49
49
|
Object.assign(this.telemetryProperties, {
|
|
50
|
-
|
|
50
|
+
groupName: typeof args.options.groupName !== 'undefined',
|
|
51
51
|
groupMailNickname: typeof args.options.groupMailNickname !== 'undefined'
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
}, _EntraM365GroupRecycleBinItemListCommand_initOptions = function _EntraM365GroupRecycleBinItemListCommand_initOptions() {
|
|
55
55
|
this.options.unshift({
|
|
56
|
-
option: '-d, --
|
|
56
|
+
option: '-d, --groupName [groupName]'
|
|
57
57
|
}, {
|
|
58
58
|
option: '-m, --groupMailNickname [groupMailNickname]'
|
|
59
59
|
});
|
|
@@ -31,9 +31,6 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
31
31
|
async commandAction(logger, args) {
|
|
32
32
|
await this.showDeprecationWarning(logger, aadCommands.M365GROUP_USER_LIST, commands.M365GROUP_USER_LIST);
|
|
33
33
|
try {
|
|
34
|
-
if (args.options.role === 'Guest') {
|
|
35
|
-
await this.warn(logger, `Value 'Guest' for the option role is deprecated. Use --filter "userType eq 'Guest'" instead.`);
|
|
36
|
-
}
|
|
37
34
|
const groupId = await this.getGroupId(args.options, logger);
|
|
38
35
|
const isUnifiedGroup = await entraGroup.isUnifiedGroup(groupId);
|
|
39
36
|
if (!isUnifiedGroup) {
|
|
@@ -42,9 +39,9 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
42
39
|
let users = [];
|
|
43
40
|
if (!args.options.role || args.options.role === 'Owner') {
|
|
44
41
|
const owners = await this.getUsers(args.options, 'Owners', groupId, logger);
|
|
45
|
-
owners.forEach(owner => users.push({ ...owner, roles: ['Owner']
|
|
42
|
+
owners.forEach(owner => users.push({ ...owner, roles: ['Owner'] }));
|
|
46
43
|
}
|
|
47
|
-
if (!args.options.role || args.options.role === 'Member'
|
|
44
|
+
if (!args.options.role || args.options.role === 'Member') {
|
|
48
45
|
const members = await this.getUsers(args.options, 'Members', groupId, logger);
|
|
49
46
|
members.forEach((member) => {
|
|
50
47
|
const user = users.find((u) => u.id === member.id);
|
|
@@ -57,7 +54,7 @@ class EntraM365GroupUserListCommand extends GraphCommand {
|
|
|
57
54
|
});
|
|
58
55
|
}
|
|
59
56
|
if (args.options.role) {
|
|
60
|
-
users = users.filter(i => i.
|
|
57
|
+
users = users.filter(i => i.roles.indexOf(args.options.role) > -1);
|
|
61
58
|
}
|
|
62
59
|
await logger.log(users);
|
|
63
60
|
}
|
|
@@ -128,7 +125,7 @@ _EntraM365GroupUserListCommand_instances = new WeakSet(), _EntraM365GroupUserLis
|
|
|
128
125
|
option: "-n, --groupDisplayName [groupDisplayName]"
|
|
129
126
|
}, {
|
|
130
127
|
option: "-r, --role [type]",
|
|
131
|
-
autocomplete: ["Owner", "Member"
|
|
128
|
+
autocomplete: ["Owner", "Member"]
|
|
132
129
|
}, {
|
|
133
130
|
option: "-p, --properties [properties]"
|
|
134
131
|
}, {
|
|
@@ -144,8 +141,8 @@ _EntraM365GroupUserListCommand_instances = new WeakSet(), _EntraM365GroupUserLis
|
|
|
144
141
|
return `${args.options.groupId} is not a valid GUID`;
|
|
145
142
|
}
|
|
146
143
|
if (args.options.role) {
|
|
147
|
-
if (['Owner', 'Member'
|
|
148
|
-
return `${args.options.role} is not a valid role value. Allowed values Owner|Member
|
|
144
|
+
if (['Owner', 'Member'].indexOf(args.options.role) === -1) {
|
|
145
|
+
return `${args.options.role} is not a valid role value. Allowed values Owner|Member`;
|
|
149
146
|
}
|
|
150
147
|
}
|
|
151
148
|
return true;
|
|
@@ -30,20 +30,20 @@ class OutlookMessageGetCommand extends GraphCommand {
|
|
|
30
30
|
}
|
|
31
31
|
let requestUrl = '';
|
|
32
32
|
if (isAppOnlyAccessToken) {
|
|
33
|
-
if (!args.options.userId && !args.options.
|
|
34
|
-
throw `The option 'userId' or '
|
|
33
|
+
if (!args.options.userId && !args.options.userName) {
|
|
34
|
+
throw `The option 'userId' or 'userName' is required when retrieving an email using app only credentials`;
|
|
35
35
|
}
|
|
36
|
-
if (args.options.userId && args.options.
|
|
37
|
-
throw `Both options 'userId' and '
|
|
36
|
+
if (args.options.userId && args.options.userName) {
|
|
37
|
+
throw `Both options 'userId' and 'userName' cannot be set when retrieving an email using app only credentials`;
|
|
38
38
|
}
|
|
39
|
-
requestUrl += `users/${args.options.userId ? args.options.userId : args.options.
|
|
39
|
+
requestUrl += `users/${args.options.userId ? args.options.userId : args.options.userName}`;
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
if (args.options.userId && args.options.
|
|
43
|
-
throw `Both options 'userId' and '
|
|
42
|
+
if (args.options.userId && args.options.userName) {
|
|
43
|
+
throw `Both options 'userId' and 'userName' cannot be set when retrieving an email using delegated credentials`;
|
|
44
44
|
}
|
|
45
|
-
if (args.options.userId || args.options.
|
|
46
|
-
requestUrl += `users/${args.options.userId ? args.options.userId : args.options.
|
|
45
|
+
if (args.options.userId || args.options.userName) {
|
|
46
|
+
requestUrl += `users/${args.options.userId ? args.options.userId : args.options.userName}`;
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
requestUrl += 'me';
|
|
@@ -69,7 +69,7 @@ _OutlookMessageGetCommand_instances = new WeakSet(), _OutlookMessageGetCommand_i
|
|
|
69
69
|
this.telemetry.push((args) => {
|
|
70
70
|
Object.assign(this.telemetryProperties, {
|
|
71
71
|
userId: typeof args.options.userId !== 'undefined',
|
|
72
|
-
|
|
72
|
+
userName: typeof args.options.userName !== 'undefined'
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
}, _OutlookMessageGetCommand_initOptions = function _OutlookMessageGetCommand_initOptions() {
|
|
@@ -78,7 +78,7 @@ _OutlookMessageGetCommand_instances = new WeakSet(), _OutlookMessageGetCommand_i
|
|
|
78
78
|
}, {
|
|
79
79
|
option: '--userId [userId]'
|
|
80
80
|
}, {
|
|
81
|
-
option: '--
|
|
81
|
+
option: '--userName [userName]'
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
export default new OutlookMessageGetCommand();
|
|
@@ -33,9 +33,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
|
33
33
|
if (this.projectRootPath === null) {
|
|
34
34
|
throw new CommandError(`Couldn't find project root folder`, _a.ERROR_NO_PROJECT_ROOT_FOLDER);
|
|
35
35
|
}
|
|
36
|
-
if (!args.options.overwrite) {
|
|
37
|
-
await this.warn(logger, `We recommend always using the --overwrite option and it will become the default behavior in next major release. Overwriting your sppkg file on every deployment is required to make continuous delivery of the latest version of your app which is the aim of the continuous delivery pipeline.`);
|
|
38
|
-
}
|
|
39
36
|
const solutionPackageJsonFile = path.join(this.projectRootPath, 'package.json');
|
|
40
37
|
const packageJson = fs.readFileSync(solutionPackageJsonFile, 'utf-8');
|
|
41
38
|
const solutionName = JSON.parse(packageJson).name;
|
|
@@ -81,9 +78,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
|
81
78
|
if (options.skipFeatureDeployment) {
|
|
82
79
|
this.getDeployAction(workflow).with.SKIP_FEATURE_DEPLOYMENT = true;
|
|
83
80
|
}
|
|
84
|
-
if (options.overwrite) {
|
|
85
|
-
this.getDeployAction(workflow).with.OVERWRITE = true;
|
|
86
|
-
}
|
|
87
81
|
if (options.loginMethod === 'user') {
|
|
88
82
|
const loginAction = this.getLoginAction(workflow);
|
|
89
83
|
loginAction.with = {
|
|
@@ -125,8 +119,7 @@ _a = SpfxProjectGithubWorkflowAddCommand, _SpfxProjectGithubWorkflowAddCommand_i
|
|
|
125
119
|
manuallyTrigger: !!args.options.manuallyTrigger,
|
|
126
120
|
loginMethod: typeof args.options.loginMethod !== 'undefined',
|
|
127
121
|
scope: typeof args.options.scope !== 'undefined',
|
|
128
|
-
skipFeatureDeployment: !!args.options.skipFeatureDeployment
|
|
129
|
-
overwrite: !!args.options.overwrite
|
|
122
|
+
skipFeatureDeployment: !!args.options.skipFeatureDeployment
|
|
130
123
|
});
|
|
131
124
|
});
|
|
132
125
|
}, _SpfxProjectGithubWorkflowAddCommand_initOptions = function _SpfxProjectGithubWorkflowAddCommand_initOptions() {
|
|
@@ -146,8 +139,6 @@ _a = SpfxProjectGithubWorkflowAddCommand, _SpfxProjectGithubWorkflowAddCommand_i
|
|
|
146
139
|
option: '-u, --siteUrl [siteUrl]'
|
|
147
140
|
}, {
|
|
148
141
|
option: '--skipFeatureDeployment'
|
|
149
|
-
}, {
|
|
150
|
-
option: '--overwrite'
|
|
151
142
|
});
|
|
152
143
|
}, _SpfxProjectGithubWorkflowAddCommand_initValidators = function _SpfxProjectGithubWorkflowAddCommand_initValidators() {
|
|
153
144
|
this.validators.push(async (args) => {
|
|
@@ -33,7 +33,6 @@ class SpoApplicationCustomizerGetCommand extends SpoCommand {
|
|
|
33
33
|
if (!args.options.clientSideComponentProperties) {
|
|
34
34
|
await logger.log({
|
|
35
35
|
...customAction,
|
|
36
|
-
Rights: JSON.stringify(customAction.Rights),
|
|
37
36
|
Scope: this.humanizeScope(customAction.Scope)
|
|
38
37
|
});
|
|
39
38
|
}
|
|
@@ -78,15 +78,15 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand {
|
|
|
78
78
|
const updateChildContentTypes = args.options.listTitle || args.options.listId || args.options.listUrl ? false : args.options.updateChildContentTypes === true;
|
|
79
79
|
if (this.debug) {
|
|
80
80
|
const additionalLog = args.options.listTitle ? `; ListTitle='${args.options.listTitle}'` : args.options.listId ? `; ListId='${args.options.listId}'` : args.options.listUrl ? `; ListUrl='${args.options.listUrl}'` : ` ; UpdateChildContentTypes='${updateChildContentTypes}`;
|
|
81
|
-
await logger.logToStderr(`Remove FieldLink from ContentType.
|
|
81
|
+
await logger.logToStderr(`Remove FieldLink from ContentType. Id='${args.options.id}' ; ContentTypeId='${args.options.contentTypeId}' ${additionalLog}`);
|
|
82
82
|
await logger.logToStderr(`Execute ProcessQuery.`);
|
|
83
83
|
}
|
|
84
84
|
let requestBody = '';
|
|
85
85
|
if (listId) {
|
|
86
|
-
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="18" ObjectPathId="17" /><ObjectPath Id="20" ObjectPathId="19" /><Method Name="DeleteObject" Id="21" ObjectPathId="19" /><Method Name="Update" Id="22" ObjectPathId="15"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="17" ParentId="15" Name="FieldLinks" /><Method Id="19" ParentId="17" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.
|
|
86
|
+
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="18" ObjectPathId="17" /><ObjectPath Id="20" ObjectPathId="19" /><Method Name="DeleteObject" Id="21" ObjectPathId="19" /><Method Name="Update" Id="22" ObjectPathId="15"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="17" ParentId="15" Name="FieldLinks" /><Method Id="19" ParentId="17" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.id)}}</Parameter></Parameters></Method><Identity Id="15" Name="09eec89e-709b-0000-558c-c222dcaf9162|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:list:${listId}:contenttype:${formatting.escapeXml(args.options.contentTypeId)}" /></ObjectPaths></Request>`;
|
|
87
87
|
}
|
|
88
88
|
else {
|
|
89
|
-
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="77" ObjectPathId="76" /><ObjectPath Id="79" ObjectPathId="78" /><Method Name="DeleteObject" Id="80" ObjectPathId="78" /><Method Name="Update" Id="81" ObjectPathId="24"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="76" ParentId="24" Name="FieldLinks" /><Method Id="78" ParentId="76" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.
|
|
89
|
+
requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="77" ObjectPathId="76" /><ObjectPath Id="79" ObjectPathId="78" /><Method Name="DeleteObject" Id="80" ObjectPathId="78" /><Method Name="Update" Id="81" ObjectPathId="24"><Parameters><Parameter Type="Boolean">${updateChildContentTypes}</Parameter></Parameters></Method></Actions><ObjectPaths><Property Id="76" ParentId="24" Name="FieldLinks" /><Method Id="78" ParentId="76" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(args.options.id)}}</Parameter></Parameters></Method><Identity Id="24" Name="6b3ec69e-00a7-0000-55a3-61f8d779d2b3|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:contenttype:${formatting.escapeXml(args.options.contentTypeId)}" /></ObjectPaths></Request>`;
|
|
90
90
|
}
|
|
91
91
|
requestOptions = {
|
|
92
92
|
url: `${args.options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
@@ -110,7 +110,7 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand {
|
|
|
110
110
|
await removeFieldLink();
|
|
111
111
|
}
|
|
112
112
|
else {
|
|
113
|
-
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the column ${args.options.
|
|
113
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the column ${args.options.id} from content type ${args.options.contentTypeId}?` });
|
|
114
114
|
if (result) {
|
|
115
115
|
await removeFieldLink();
|
|
116
116
|
}
|
|
@@ -160,9 +160,9 @@ _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFiel
|
|
|
160
160
|
}, {
|
|
161
161
|
option: '--listUrl [listUrl]'
|
|
162
162
|
}, {
|
|
163
|
-
option: '
|
|
163
|
+
option: '--contentTypeId <contentTypeId>'
|
|
164
164
|
}, {
|
|
165
|
-
option: '--
|
|
165
|
+
option: '-i, --id <id>'
|
|
166
166
|
}, {
|
|
167
167
|
option: '-c, --updateChildContentTypes'
|
|
168
168
|
}, {
|
|
@@ -170,8 +170,8 @@ _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFiel
|
|
|
170
170
|
});
|
|
171
171
|
}, _SpoContentTypeFieldRemoveCommand_initValidators = function _SpoContentTypeFieldRemoveCommand_initValidators() {
|
|
172
172
|
this.validators.push(async (args) => {
|
|
173
|
-
if (!validation.isValidGuid(args.options.
|
|
174
|
-
return `${args.options.
|
|
173
|
+
if (!validation.isValidGuid(args.options.id)) {
|
|
174
|
+
return `${args.options.id} is not a valid GUID`;
|
|
175
175
|
}
|
|
176
176
|
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
177
177
|
return `${args.options.listId} is not a valid GUID`;
|
|
@@ -262,9 +262,9 @@ _SpoContentTypeFieldSetCommand_instances = new WeakSet(), _SpoContentTypeFieldSe
|
|
|
262
262
|
this.options.unshift({
|
|
263
263
|
option: '-u, --webUrl <webUrl>'
|
|
264
264
|
}, {
|
|
265
|
-
option: '
|
|
265
|
+
option: '--contentTypeId <contentTypeId>'
|
|
266
266
|
}, {
|
|
267
|
-
option: '--id <id>'
|
|
267
|
+
option: '-i, --id <id>'
|
|
268
268
|
}, {
|
|
269
269
|
option: '-r, --required [required]',
|
|
270
270
|
autocomplete: ['true', 'false']
|