@pnp/cli-microsoft365 9.0.0-beta.62575a1 → 9.0.0-beta.872d524
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/Auth.js +9 -9
- package/dist/Command.js +49 -2
- package/dist/cli/cli.js +66 -39
- package/dist/config.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/commands/login.js +44 -96
- package/dist/m365/commands/status.js +2 -2
- package/dist/m365/connection/commands/connection-remove.js +6 -2
- package/dist/m365/connection/commands/connection-set.js +4 -1
- package/dist/m365/connection/commands/connection-use.js +25 -4
- 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/enterpriseapp/enterpriseapp-remove.js +123 -0
- package/dist/m365/entra/commands/group/group-set.js +256 -0
- 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-add.js +109 -32
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +6 -9
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +159 -84
- package/dist/m365/entra/commands/multitenant/multitenant-add.js +65 -0
- package/dist/m365/entra/commands/multitenant/multitenant-remove.js +118 -0
- package/dist/m365/entra/commands/multitenant/multitenant-set.js +72 -0
- package/dist/m365/entra/commands.js +6 -0
- package/dist/m365/flow/commands/flow-get.js +1 -1
- package/dist/m365/outlook/commands/message/message-get.js +11 -11
- package/dist/m365/pa/commands/app/app-export.js +13 -7
- package/dist/m365/spe/ContainerTypeProperties.js +2 -0
- package/dist/m365/spe/commands/containertype/containertype-list.js +49 -0
- package/dist/m365/spe/commands.js +2 -1
- 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 +16 -22
- package/dist/m365/spo/commands/commandset/commandset-get.js +31 -17
- package/dist/m365/spo/commands/file/file-copy.js +55 -34
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-set.js +0 -4
- package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +86 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +110 -0
- package/dist/m365/spo/commands/list/ListInstance.js +6 -1
- package/dist/m365/spo/commands/list/list-get.js +9 -3
- package/dist/m365/spo/commands/list/list-list.js +1 -4
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +46 -21
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +48 -46
- 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/tenant/tenant-applicationcustomizer-get.js +19 -5
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +20 -6
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +2 -22
- package/dist/m365/spo/commands.js +2 -1
- package/dist/m365/teams/commands/message/message-restore.js +106 -0
- package/dist/m365/teams/commands.js +1 -0
- 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/utils/drive.js +61 -0
- package/dist/utils/formatting.js +16 -0
- package/dist/utils/spo.js +143 -6
- package/dist/utils/zod.js +124 -0
- 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/connection/connection-use.mdx +8 -2
- 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/enterpriseapp/enterpriseapp-remove.mdx +65 -0
- package/docs/docs/cmd/entra/group/group-add.mdx +0 -4
- package/docs/docs/cmd/entra/group/group-set.mdx +89 -0
- 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-add.mdx +28 -10
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +35 -11
- package/docs/docs/cmd/entra/multitenant/multitenant-add.mdx +107 -0
- package/docs/docs/cmd/entra/multitenant/multitenant-remove.mdx +58 -0
- package/docs/docs/cmd/entra/multitenant/multitenant-set.mdx +53 -0
- package/docs/docs/cmd/flow/flow-get.mdx +149 -283
- package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
- package/docs/docs/cmd/pa/app/app-export.mdx +15 -9
- package/docs/docs/cmd/planner/plan/plan-remove.mdx +1 -1
- package/docs/docs/cmd/spe/containertype/containertype-list.mdx +102 -0
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +11 -12
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +88 -38
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-list.mdx +22 -28
- package/docs/docs/cmd/spo/commandset/commandset-get.mdx +75 -24
- package/docs/docs/cmd/spo/commandset/commandset-list.mdx +26 -32
- package/docs/docs/cmd/spo/file/file-copy.mdx +119 -12
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-set.mdx +0 -6
- package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +110 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +114 -0
- package/docs/docs/cmd/spo/list/list-get.mdx +6 -0
- package/docs/docs/cmd/spo/list/list-list.mdx +5 -7
- package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +15 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +15 -3
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-ensure.mdx +4 -4
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +9 -9
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +7 -7
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +11 -2
- package/docs/docs/cmd/spo/site/site-recyclebinitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +79 -30
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +20 -19
- package/docs/docs/cmd/spo/tenant/tenant-commandset-get.mdx +84 -38
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +20 -19
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +2 -49
- package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-list.mdx +7 -3
- package/docs/docs/cmd/teams/message/message-remove.mdx +2 -1
- package/docs/docs/cmd/teams/message/message-restore.mdx +62 -0
- package/npm-shrinkwrap.json +1002 -1147
- package/package.json +26 -23
- package/dist/m365/viva/commands/engage/yammerCommands.js +0 -25
|
@@ -0,0 +1,65 @@
|
|
|
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 _EntraMultitenantAddCommand_instances, _EntraMultitenantAddCommand_initTelemetry, _EntraMultitenantAddCommand_initOptions, _EntraMultitenantAddCommand_initTypes;
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
|
+
import commands from '../../commands.js';
|
|
10
|
+
class EntraMultitenantAddCommand extends GraphCommand {
|
|
11
|
+
get name() {
|
|
12
|
+
return commands.MULTITENANT_ADD;
|
|
13
|
+
}
|
|
14
|
+
get description() {
|
|
15
|
+
return 'Creates a new multitenant organization';
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
_EntraMultitenantAddCommand_instances.add(this);
|
|
20
|
+
__classPrivateFieldGet(this, _EntraMultitenantAddCommand_instances, "m", _EntraMultitenantAddCommand_initTelemetry).call(this);
|
|
21
|
+
__classPrivateFieldGet(this, _EntraMultitenantAddCommand_instances, "m", _EntraMultitenantAddCommand_initOptions).call(this);
|
|
22
|
+
__classPrivateFieldGet(this, _EntraMultitenantAddCommand_instances, "m", _EntraMultitenantAddCommand_initTypes).call(this);
|
|
23
|
+
}
|
|
24
|
+
async commandAction(logger, args) {
|
|
25
|
+
if (this.verbose) {
|
|
26
|
+
await logger.logToStderr('Creating multitenant organization...');
|
|
27
|
+
}
|
|
28
|
+
const requestOptions = {
|
|
29
|
+
url: `${this.resource}/v1.0/tenantRelationships/multiTenantOrganization`,
|
|
30
|
+
headers: {
|
|
31
|
+
accept: 'application/json;odata.metadata=none'
|
|
32
|
+
},
|
|
33
|
+
responseType: 'json',
|
|
34
|
+
data: {
|
|
35
|
+
description: args.options.description,
|
|
36
|
+
displayName: args.options.displayName
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
try {
|
|
40
|
+
const multitenantOrg = await request.put(requestOptions);
|
|
41
|
+
await logger.log(multitenantOrg);
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
this.handleRejectedODataJsonPromise(err);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
_EntraMultitenantAddCommand_instances = new WeakSet(), _EntraMultitenantAddCommand_initTelemetry = function _EntraMultitenantAddCommand_initTelemetry() {
|
|
49
|
+
this.telemetry.push((args) => {
|
|
50
|
+
Object.assign(this.telemetryProperties, {
|
|
51
|
+
displayName: typeof args.options.displayName !== 'undefined',
|
|
52
|
+
description: typeof args.options.description !== 'undefined'
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}, _EntraMultitenantAddCommand_initOptions = function _EntraMultitenantAddCommand_initOptions() {
|
|
56
|
+
this.options.unshift({
|
|
57
|
+
option: '-n, --displayName <displayName>'
|
|
58
|
+
}, {
|
|
59
|
+
option: '-d, --description [description]'
|
|
60
|
+
});
|
|
61
|
+
}, _EntraMultitenantAddCommand_initTypes = function _EntraMultitenantAddCommand_initTypes() {
|
|
62
|
+
this.types.string.push('displayName', 'description');
|
|
63
|
+
};
|
|
64
|
+
export default new EntraMultitenantAddCommand();
|
|
65
|
+
//# sourceMappingURL=multitenant-add.js.map
|
|
@@ -0,0 +1,118 @@
|
|
|
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 _EntraMultitenantRemoveCommand_instances, _EntraMultitenantRemoveCommand_initTelemetry, _EntraMultitenantRemoveCommand_initOptions;
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
|
+
import commands from '../../commands.js';
|
|
10
|
+
import { odata } from '../../../../utils/odata.js';
|
|
11
|
+
import { cli } from '../../../../cli/cli.js';
|
|
12
|
+
class EntraMultitenantRemoveCommand extends GraphCommand {
|
|
13
|
+
get name() {
|
|
14
|
+
return commands.MULTITENANT_REMOVE;
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return 'Removes a multitenant organization';
|
|
18
|
+
}
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
_EntraMultitenantRemoveCommand_instances.add(this);
|
|
22
|
+
__classPrivateFieldGet(this, _EntraMultitenantRemoveCommand_instances, "m", _EntraMultitenantRemoveCommand_initTelemetry).call(this);
|
|
23
|
+
__classPrivateFieldGet(this, _EntraMultitenantRemoveCommand_instances, "m", _EntraMultitenantRemoveCommand_initOptions).call(this);
|
|
24
|
+
}
|
|
25
|
+
async commandAction(logger, args) {
|
|
26
|
+
const removeMultitenantOrg = async () => {
|
|
27
|
+
try {
|
|
28
|
+
const tenantId = await this.getCurrentTenantId();
|
|
29
|
+
let tenantsId = await this.getAllTenantsIds();
|
|
30
|
+
const tenantsCount = tenantsId.length;
|
|
31
|
+
if (tenantsCount > 0) {
|
|
32
|
+
const tasks = tenantsId
|
|
33
|
+
.filter(x => x !== tenantId)
|
|
34
|
+
.map(t => this.removeTenant(logger, t));
|
|
35
|
+
await Promise.all(tasks);
|
|
36
|
+
do {
|
|
37
|
+
if (this.verbose) {
|
|
38
|
+
await logger.logToStderr(`Waiting 30 seconds...`);
|
|
39
|
+
}
|
|
40
|
+
await new Promise(resolve => setTimeout(resolve, 30000));
|
|
41
|
+
// from current behavior, removing tenant can take a few seconds
|
|
42
|
+
// current tenant must be removed once all previous ones were removed
|
|
43
|
+
if (this.verbose) {
|
|
44
|
+
await logger.logToStderr(`Checking all tenants were removed...`);
|
|
45
|
+
}
|
|
46
|
+
tenantsId = await this.getAllTenantsIds();
|
|
47
|
+
if (this.verbose) {
|
|
48
|
+
await logger.logToStderr(`Number of removed tenants: ${tenantsCount - tenantsId.length}`);
|
|
49
|
+
}
|
|
50
|
+
} while (tenantsId.length !== 1);
|
|
51
|
+
// current tenant must be removed as the last one
|
|
52
|
+
await this.removeTenant(logger, tenantId);
|
|
53
|
+
await logger.logToStderr('Your Multi-Tenant organization is being removed. This can take up to 2 hours.');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
this.handleRejectedODataJsonPromise(err);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
if (args.options.force) {
|
|
61
|
+
await removeMultitenantOrg();
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
const result = await cli.promptForConfirmation({ message: 'Are you sure you want to remove multitenant organization?' });
|
|
65
|
+
if (result) {
|
|
66
|
+
await removeMultitenantOrg();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async getAllTenantsIds() {
|
|
71
|
+
const requestOptions = {
|
|
72
|
+
url: `${this.resource}/v1.0/tenantRelationships/multiTenantOrganization/tenants?$select=tenantId`,
|
|
73
|
+
headers: {
|
|
74
|
+
accept: 'application/json;odata.metadata=none'
|
|
75
|
+
},
|
|
76
|
+
responseType: 'json'
|
|
77
|
+
};
|
|
78
|
+
const tenants = await odata.getAllItems(requestOptions);
|
|
79
|
+
return tenants.map(x => x.tenantId);
|
|
80
|
+
}
|
|
81
|
+
async getCurrentTenantId() {
|
|
82
|
+
const requestOptions = {
|
|
83
|
+
url: `${this.resource}/v1.0/organization?$select=id`,
|
|
84
|
+
headers: {
|
|
85
|
+
accept: 'application/json;odata.metadata=none'
|
|
86
|
+
},
|
|
87
|
+
responseType: 'json'
|
|
88
|
+
};
|
|
89
|
+
const organizations = await odata.getAllItems(requestOptions);
|
|
90
|
+
return organizations[0].id;
|
|
91
|
+
}
|
|
92
|
+
async removeTenant(logger, tenantId) {
|
|
93
|
+
if (this.verbose) {
|
|
94
|
+
await logger.logToStderr(`Removing tenant: ${tenantId}`);
|
|
95
|
+
}
|
|
96
|
+
const requestOptions = {
|
|
97
|
+
url: `${this.resource}/v1.0/tenantRelationships/multiTenantOrganization/tenants/${tenantId}`,
|
|
98
|
+
headers: {
|
|
99
|
+
accept: 'application/json;odata.metadata=none'
|
|
100
|
+
},
|
|
101
|
+
responseType: 'json'
|
|
102
|
+
};
|
|
103
|
+
await request.delete(requestOptions);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
_EntraMultitenantRemoveCommand_instances = new WeakSet(), _EntraMultitenantRemoveCommand_initTelemetry = function _EntraMultitenantRemoveCommand_initTelemetry() {
|
|
107
|
+
this.telemetry.push((args) => {
|
|
108
|
+
Object.assign(this.telemetryProperties, {
|
|
109
|
+
force: !!args.options.force
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}, _EntraMultitenantRemoveCommand_initOptions = function _EntraMultitenantRemoveCommand_initOptions() {
|
|
113
|
+
this.options.unshift({
|
|
114
|
+
option: '-f, --force'
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
export default new EntraMultitenantRemoveCommand();
|
|
118
|
+
//# sourceMappingURL=multitenant-remove.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
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 _EntraMultitenantSetCommand_instances, _EntraMultitenantSetCommand_initTelemetry, _EntraMultitenantSetCommand_initOptions, _EntraMultitenantSetCommand_initValidators, _EntraMultitenantSetCommand_initTypes;
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
|
+
import commands from '../../commands.js';
|
|
10
|
+
class EntraMultitenantSetCommand extends GraphCommand {
|
|
11
|
+
get name() {
|
|
12
|
+
return commands.MULTITENANT_SET;
|
|
13
|
+
}
|
|
14
|
+
get description() {
|
|
15
|
+
return 'Updates the properties of a multitenant organization';
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
_EntraMultitenantSetCommand_instances.add(this);
|
|
20
|
+
__classPrivateFieldGet(this, _EntraMultitenantSetCommand_instances, "m", _EntraMultitenantSetCommand_initTelemetry).call(this);
|
|
21
|
+
__classPrivateFieldGet(this, _EntraMultitenantSetCommand_instances, "m", _EntraMultitenantSetCommand_initOptions).call(this);
|
|
22
|
+
__classPrivateFieldGet(this, _EntraMultitenantSetCommand_instances, "m", _EntraMultitenantSetCommand_initValidators).call(this);
|
|
23
|
+
__classPrivateFieldGet(this, _EntraMultitenantSetCommand_instances, "m", _EntraMultitenantSetCommand_initTypes).call(this);
|
|
24
|
+
}
|
|
25
|
+
async commandAction(logger, args) {
|
|
26
|
+
if (this.verbose) {
|
|
27
|
+
await logger.logToStderr('Updating multitenant organization...');
|
|
28
|
+
}
|
|
29
|
+
const requestOptions = {
|
|
30
|
+
url: `${this.resource}/v1.0/tenantRelationships/multiTenantOrganization`,
|
|
31
|
+
headers: {
|
|
32
|
+
accept: 'application/json;odata.metadata=none'
|
|
33
|
+
},
|
|
34
|
+
responseType: 'json',
|
|
35
|
+
data: {
|
|
36
|
+
description: args.options.description,
|
|
37
|
+
displayName: args.options.displayName
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
try {
|
|
41
|
+
await request.patch(requestOptions);
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
this.handleRejectedODataJsonPromise(err);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
_EntraMultitenantSetCommand_instances = new WeakSet(), _EntraMultitenantSetCommand_initTelemetry = function _EntraMultitenantSetCommand_initTelemetry() {
|
|
49
|
+
this.telemetry.push((args) => {
|
|
50
|
+
Object.assign(this.telemetryProperties, {
|
|
51
|
+
displayName: typeof args.options.displayName !== 'undefined',
|
|
52
|
+
description: typeof args.options.description !== 'undefined'
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}, _EntraMultitenantSetCommand_initOptions = function _EntraMultitenantSetCommand_initOptions() {
|
|
56
|
+
this.options.unshift({
|
|
57
|
+
option: '-n, --displayName [displayName]'
|
|
58
|
+
}, {
|
|
59
|
+
option: '-d, --description [description]'
|
|
60
|
+
});
|
|
61
|
+
}, _EntraMultitenantSetCommand_initValidators = function _EntraMultitenantSetCommand_initValidators() {
|
|
62
|
+
this.validators.push(async (args) => {
|
|
63
|
+
if (!args.options.displayName && !args.options.description) {
|
|
64
|
+
return 'Specify either displayName or description or both.';
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
});
|
|
68
|
+
}, _EntraMultitenantSetCommand_initTypes = function _EntraMultitenantSetCommand_initTypes() {
|
|
69
|
+
this.types.string.push('displayName', 'description');
|
|
70
|
+
};
|
|
71
|
+
export default new EntraMultitenantSetCommand();
|
|
72
|
+
//# sourceMappingURL=multitenant-set.js.map
|
|
@@ -35,10 +35,12 @@ export default {
|
|
|
35
35
|
ENTERPRISEAPP_ADD: `${prefix} enterpriseapp add`,
|
|
36
36
|
ENTERPRISEAPP_GET: `${prefix} enterpriseapp get`,
|
|
37
37
|
ENTERPRISEAPP_LIST: `${prefix} enterpriseapp list`,
|
|
38
|
+
ENTERPRISEAPP_REMOVE: `${prefix} enterpriseapp remove`,
|
|
38
39
|
GROUP_ADD: `${prefix} group add`,
|
|
39
40
|
GROUP_GET: `${prefix} group get`,
|
|
40
41
|
GROUP_LIST: `${prefix} group list`,
|
|
41
42
|
GROUP_REMOVE: `${prefix} group remove`,
|
|
43
|
+
GROUP_SET: `${prefix} group set`,
|
|
42
44
|
GROUP_USER_ADD: `${prefix} group user add`,
|
|
43
45
|
GROUP_USER_LIST: `${prefix} group user list`,
|
|
44
46
|
GROUP_USER_SET: `${prefix} group user set`,
|
|
@@ -72,7 +74,10 @@ export default {
|
|
|
72
74
|
M365GROUP_USER_LIST: `${prefix} m365group user list`,
|
|
73
75
|
M365GROUP_USER_REMOVE: `${prefix} m365group user remove`,
|
|
74
76
|
M365GROUP_USER_SET: `${prefix} m365group user set`,
|
|
77
|
+
MULTITENANT_ADD: `${prefix} multitenant add`,
|
|
75
78
|
MULTITENANT_GET: `${prefix} multitenant get`,
|
|
79
|
+
MULTITENANT_REMOVE: `${prefix} multitenant remove`,
|
|
80
|
+
MULTITENANT_SET: `${prefix} multitenant set`,
|
|
76
81
|
OAUTH2GRANT_ADD: `${prefix} oauth2grant add`,
|
|
77
82
|
OAUTH2GRANT_LIST: `${prefix} oauth2grant list`,
|
|
78
83
|
OAUTH2GRANT_REMOVE: `${prefix} oauth2grant remove`,
|
|
@@ -89,6 +94,7 @@ export default {
|
|
|
89
94
|
SP_ADD: `${prefix} sp add`,
|
|
90
95
|
SP_GET: `${prefix} sp get`,
|
|
91
96
|
SP_LIST: `${prefix} sp list`,
|
|
97
|
+
SP_REMOVE: `${prefix} sp remove`,
|
|
92
98
|
USER_ADD: `${prefix} user add`,
|
|
93
99
|
USER_GET: `${prefix} user get`,
|
|
94
100
|
USER_GUEST_ADD: `${prefix} user guest add`,
|
|
@@ -29,7 +29,7 @@ class FlowGetCommand extends PowerAutomateCommand {
|
|
|
29
29
|
await logger.logToStderr(`Retrieving information about Microsoft Flow ${args.options.name}...`);
|
|
30
30
|
}
|
|
31
31
|
const requestOptions = {
|
|
32
|
-
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
32
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01&$expand=swagger,properties.connectionreferences.apidefinition,properties.definitionsummary.operations.apioperation,operationDefinition,plan,properties.throttleData,properties.estimatedsuspensiondata,properties.licenseData`,
|
|
33
33
|
headers: {
|
|
34
34
|
accept: 'application/json'
|
|
35
35
|
},
|
|
@@ -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();
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _PaAppExportCommand_instances, _PaAppExportCommand_initTelemetry, _PaAppExportCommand_initOptions, _PaAppExportCommand_initValidators;
|
|
6
|
+
var _PaAppExportCommand_instances, _PaAppExportCommand_initTelemetry, _PaAppExportCommand_initOptions, _PaAppExportCommand_initValidators, _PaAppExportCommand_initTypes;
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import path from 'path';
|
|
9
9
|
import { setTimeout } from 'timers/promises';
|
|
@@ -26,14 +26,18 @@ class PaAppExportCommand extends PowerPlatformCommand {
|
|
|
26
26
|
__classPrivateFieldGet(this, _PaAppExportCommand_instances, "m", _PaAppExportCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _PaAppExportCommand_instances, "m", _PaAppExportCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _PaAppExportCommand_instances, "m", _PaAppExportCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _PaAppExportCommand_instances, "m", _PaAppExportCommand_initTypes).call(this);
|
|
29
30
|
}
|
|
30
31
|
async commandAction(logger, args) {
|
|
31
32
|
try {
|
|
32
33
|
const location = await this.exportPackage(args, logger);
|
|
33
|
-
const packageLink = await this.getPackageLink(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const packageLink = await this.getPackageLink(logger, location);
|
|
35
|
+
let filename = args.options.name;
|
|
36
|
+
if (args.options.packageDisplayName) {
|
|
37
|
+
//Replace all illegal characters from the file name
|
|
38
|
+
const illegalCharsRegEx = /[\\\/:*?"<>|]/g;
|
|
39
|
+
filename = args.options.packageDisplayName.replace(illegalCharsRegEx, '_');
|
|
40
|
+
}
|
|
37
41
|
const requestOptions = {
|
|
38
42
|
url: packageLink,
|
|
39
43
|
// Set responseType to arraybuffer, otherwise binary data will be encoded
|
|
@@ -98,7 +102,7 @@ class PaAppExportCommand extends PowerPlatformCommand {
|
|
|
98
102
|
details: {
|
|
99
103
|
creator: args.options.packageCreatedBy,
|
|
100
104
|
description: args.options.packageDescription,
|
|
101
|
-
displayName: args.options.packageDisplayName,
|
|
105
|
+
displayName: args.options.packageDisplayName || args.options.name,
|
|
102
106
|
sourceEnvironment: args.options.packageSourceEnvironment
|
|
103
107
|
},
|
|
104
108
|
resources: resources
|
|
@@ -108,7 +112,7 @@ class PaAppExportCommand extends PowerPlatformCommand {
|
|
|
108
112
|
const response = await request.post(requestOptions);
|
|
109
113
|
return response.headers.location;
|
|
110
114
|
}
|
|
111
|
-
async getPackageLink(
|
|
115
|
+
async getPackageLink(logger, location) {
|
|
112
116
|
if (this.verbose) {
|
|
113
117
|
await logger.logToStderr('Retrieving the package link and waiting on the exported package.');
|
|
114
118
|
}
|
|
@@ -172,6 +176,8 @@ _PaAppExportCommand_instances = new WeakSet(), _PaAppExportCommand_initTelemetry
|
|
|
172
176
|
}
|
|
173
177
|
return true;
|
|
174
178
|
});
|
|
179
|
+
}, _PaAppExportCommand_initTypes = function _PaAppExportCommand_initTypes() {
|
|
180
|
+
this.types.string.push('name', 'environmentName', 'packageDisplayName', 'packageDescription', 'packageCreatedBy', 'packageSourceEnvironment', 'path');
|
|
175
181
|
};
|
|
176
182
|
export default new PaAppExportCommand();
|
|
177
183
|
//# sourceMappingURL=app-export.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import config from '../../../../config.js';
|
|
2
|
+
import request from '../../../../request.js';
|
|
3
|
+
import { spo } from '../../../../utils/spo.js';
|
|
4
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
class SpeContainertypeListCommand extends SpoCommand {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands.CONTAINERTYPE_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists all Container Types';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['ContainerTypeId', 'DisplayName', 'OwningAppId'];
|
|
15
|
+
}
|
|
16
|
+
async commandAction(logger) {
|
|
17
|
+
try {
|
|
18
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
19
|
+
if (this.verbose) {
|
|
20
|
+
await logger.logToStderr(`Retrieving list of Container types...`);
|
|
21
|
+
}
|
|
22
|
+
const allContainerTypes = await this.getAllContainerTypes(spoAdminUrl, logger);
|
|
23
|
+
await logger.log(allContainerTypes);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
this.handleRejectedPromise(err);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async getAllContainerTypes(spoAdminUrl, logger) {
|
|
30
|
+
const formDigestInfo = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, this.debug);
|
|
31
|
+
const requestOptions = {
|
|
32
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
33
|
+
headers: {
|
|
34
|
+
'X-RequestDigest': formDigestInfo.FormDigestValue
|
|
35
|
+
},
|
|
36
|
+
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="46" ObjectPathId="45" /><Method Name="GetSPOContainerTypes" Id="47" ObjectPathId="45"><Parameters><Parameter Type="Enum">1</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="45" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
37
|
+
};
|
|
38
|
+
const res = await request.post(requestOptions);
|
|
39
|
+
const json = JSON.parse(res);
|
|
40
|
+
const response = json[0];
|
|
41
|
+
if (response.ErrorInfo) {
|
|
42
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
43
|
+
}
|
|
44
|
+
const containerTypes = json[json.length - 1];
|
|
45
|
+
return containerTypes;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export default new SpeContainertypeListCommand();
|
|
49
|
+
//# sourceMappingURL=containertype-list.js.map
|
|
@@ -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) => {
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoApplicationCustomizerGetCommand_instances, _SpoApplicationCustomizerGetCommand_initTelemetry, _SpoApplicationCustomizerGetCommand_initOptions, _SpoApplicationCustomizerGetCommand_initValidators, _SpoApplicationCustomizerGetCommand_initOptionSets;
|
|
6
|
+
var _SpoApplicationCustomizerGetCommand_instances, _SpoApplicationCustomizerGetCommand_initTelemetry, _SpoApplicationCustomizerGetCommand_initOptions, _SpoApplicationCustomizerGetCommand_initValidators, _SpoApplicationCustomizerGetCommand_initOptionSets, _SpoApplicationCustomizerGetCommand_initTypes;
|
|
7
7
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
8
|
import { spo } from '../../../../utils/spo.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -25,33 +25,21 @@ class SpoApplicationCustomizerGetCommand extends SpoCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _SpoApplicationCustomizerGetCommand_instances, "m", _SpoApplicationCustomizerGetCommand_initOptions).call(this);
|
|
26
26
|
__classPrivateFieldGet(this, _SpoApplicationCustomizerGetCommand_instances, "m", _SpoApplicationCustomizerGetCommand_initValidators).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoApplicationCustomizerGetCommand_instances, "m", _SpoApplicationCustomizerGetCommand_initOptionSets).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _SpoApplicationCustomizerGetCommand_instances, "m", _SpoApplicationCustomizerGetCommand_initTypes).call(this);
|
|
28
29
|
}
|
|
29
30
|
async commandAction(logger, args) {
|
|
30
31
|
try {
|
|
31
32
|
const customAction = await this.getCustomAction(args.options);
|
|
32
|
-
if (
|
|
33
|
+
if (!args.options.clientSideComponentProperties) {
|
|
33
34
|
await logger.log({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
CommandUIExtension: customAction.CommandUIExtension,
|
|
37
|
-
Description: customAction.Description,
|
|
38
|
-
Group: customAction.Group,
|
|
39
|
-
Id: customAction.Id,
|
|
40
|
-
ImageUrl: customAction.ImageUrl,
|
|
41
|
-
Location: customAction.Location,
|
|
42
|
-
Name: customAction.Name,
|
|
43
|
-
RegistrationId: customAction.RegistrationId,
|
|
44
|
-
RegistrationType: customAction.RegistrationType,
|
|
45
|
-
Rights: JSON.stringify(customAction.Rights),
|
|
46
|
-
Scope: this.humanizeScope(customAction.Scope),
|
|
47
|
-
ScriptBlock: customAction.ScriptBlock,
|
|
48
|
-
ScriptSrc: customAction.ScriptSrc,
|
|
49
|
-
Sequence: customAction.Sequence,
|
|
50
|
-
Title: customAction.Title,
|
|
51
|
-
Url: customAction.Url,
|
|
52
|
-
VersionOfUserCustomAction: customAction.VersionOfUserCustomAction
|
|
35
|
+
...customAction,
|
|
36
|
+
Scope: this.humanizeScope(customAction.Scope)
|
|
53
37
|
});
|
|
54
38
|
}
|
|
39
|
+
else {
|
|
40
|
+
const properties = formatting.tryParseJson(customAction.ClientSideComponentProperties);
|
|
41
|
+
await logger.log(properties);
|
|
42
|
+
}
|
|
55
43
|
}
|
|
56
44
|
catch (err) {
|
|
57
45
|
this.handleRejectedPromise(err);
|
|
@@ -95,7 +83,8 @@ _SpoApplicationCustomizerGetCommand_instances = new WeakSet(), _SpoApplicationCu
|
|
|
95
83
|
title: typeof args.options.title !== 'undefined',
|
|
96
84
|
id: typeof args.options.id !== 'undefined',
|
|
97
85
|
clientSideComponentId: typeof args.options.clientSideComponentId !== 'undefined',
|
|
98
|
-
scope: typeof args.options.scope !== 'undefined'
|
|
86
|
+
scope: typeof args.options.scope !== 'undefined',
|
|
87
|
+
clientSideComponentProperties: !!args.options.clientSideComponentProperties
|
|
99
88
|
});
|
|
100
89
|
});
|
|
101
90
|
}, _SpoApplicationCustomizerGetCommand_initOptions = function _SpoApplicationCustomizerGetCommand_initOptions() {
|
|
@@ -110,6 +99,8 @@ _SpoApplicationCustomizerGetCommand_instances = new WeakSet(), _SpoApplicationCu
|
|
|
110
99
|
}, {
|
|
111
100
|
option: '-s, --scope [scope]',
|
|
112
101
|
autocomplete: this.allowedScopes
|
|
102
|
+
}, {
|
|
103
|
+
option: '-p, --clientSideComponentProperties'
|
|
113
104
|
});
|
|
114
105
|
}, _SpoApplicationCustomizerGetCommand_initValidators = function _SpoApplicationCustomizerGetCommand_initValidators() {
|
|
115
106
|
this.validators.push(async (args) => {
|
|
@@ -126,6 +117,9 @@ _SpoApplicationCustomizerGetCommand_instances = new WeakSet(), _SpoApplicationCu
|
|
|
126
117
|
});
|
|
127
118
|
}, _SpoApplicationCustomizerGetCommand_initOptionSets = function _SpoApplicationCustomizerGetCommand_initOptionSets() {
|
|
128
119
|
this.optionSets.push({ options: ['title', 'id', 'clientSideComponentId'] });
|
|
120
|
+
}, _SpoApplicationCustomizerGetCommand_initTypes = function _SpoApplicationCustomizerGetCommand_initTypes() {
|
|
121
|
+
this.types.string.push('webUrl', 'title', 'id', 'clientSideComponentId', 'scope');
|
|
122
|
+
this.types.boolean.push('clientSideComponentProperties');
|
|
129
123
|
};
|
|
130
124
|
export default new SpoApplicationCustomizerGetCommand();
|
|
131
125
|
//# sourceMappingURL=applicationcustomizer-get.js.map
|