@pnp/cli-microsoft365 6.3.0-beta.e46ffee → 6.3.0-beta.f76dcaa
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/.eslintrc.js +8 -0
- package/dist/Command.js +12 -1
- package/dist/cli/Cli.js +42 -1
- package/dist/m365/aad/commands/group/group-list.js +2 -1
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +103 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +92 -0
- package/dist/m365/aad/commands.js +2 -0
- package/dist/m365/base/O365MgmtCommand.js +10 -0
- package/dist/m365/context/commands/option/option-list.js +54 -0
- package/dist/m365/context/commands.js +1 -0
- package/dist/m365/graph/commands/changelog/changelog-list.js +3 -2
- package/dist/m365/onenote/commands/notebook/notebook-list.js +51 -40
- package/dist/m365/pa/commands/environment/environment-get.js +13 -5
- package/dist/m365/planner/commands/plan/plan-get.js +40 -26
- package/dist/m365/planner/commands/plan/plan-list.js +24 -14
- package/dist/m365/planner/commands/plan/plan-set.js +21 -10
- package/dist/m365/planner/commands/roster/roster-get.js +61 -0
- package/dist/m365/planner/commands/roster/roster-member-add.js +113 -0
- package/dist/m365/planner/commands/roster/roster-member-list.js +54 -0
- package/dist/m365/planner/commands/roster/roster-member-remove.js +140 -0
- package/dist/m365/planner/commands/task/task-add.js +3 -0
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +2 -1
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -1
- package/dist/m365/planner/commands.js +4 -0
- package/dist/m365/pp/commands/environment/environment-get.js +18 -9
- package/dist/m365/pp/commands/solution/solution-get.js +2 -1
- package/dist/m365/pp/commands/solution/solution-list.js +2 -1
- package/dist/m365/purview/commands/auditlog/auditlog-list.js +205 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-get.js +75 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +46 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +97 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-add.js +77 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-get.js +13 -8
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +43 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +97 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-set.js +90 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-get.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +11 -1
- package/dist/m365/purview/commands.js +8 -0
- package/dist/m365/spo/commands/app/app-add.js +2 -1
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +95 -0
- package/dist/m365/spo/commands/customaction/customaction-get.js +17 -66
- package/dist/m365/spo/commands/customaction/customaction-list.js +2 -36
- package/dist/m365/spo/commands/customaction/customaction-remove.js +11 -18
- package/dist/m365/spo/commands/file/GraphFileDetails.js +0 -1
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +2 -1
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +2 -22
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +137 -0
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +2 -25
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +9 -29
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -25
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +104 -0
- package/dist/m365/spo/commands/group/group-list.js +2 -1
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-add.js +2 -1
- package/dist/m365/spo/commands/listitem/listitem-list.js +2 -1
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +73 -0
- package/dist/m365/spo/commands/page/page-column-get.js +2 -1
- package/dist/m365/spo/commands/page/page-column-list.js +2 -1
- package/dist/m365/spo/commands/page/page-section-get.js +2 -1
- package/dist/m365/spo/commands/page/page-section-list.js +2 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +6 -0
- package/dist/m365/spo/commands/spo-search.js +2 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +179 -0
- package/dist/m365/spo/commands/term/term-list.js +2 -1
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +2 -2
- package/dist/m365/spo/commands.js +5 -0
- package/dist/m365/teams/commands/meeting/meeting-list.js +1 -1
- package/dist/m365/teams/commands/team/team-app-list.js +1 -1
- package/dist/m365/teams/commands/user/user-app-list.js +2 -1
- package/dist/m365/todo/commands/task/task-get.js +2 -1
- package/dist/m365/todo/commands/task/task-list.js +2 -1
- package/dist/m365/yammer/commands/yammer-search.js +2 -1
- package/dist/utils/aadUser.js +38 -0
- package/dist/utils/planner.js +13 -2
- package/dist/utils/spo.js +89 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-clear.md +42 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-remove.md +45 -0
- package/docs/docs/cmd/context/option/option-list.md +63 -0
- package/docs/docs/cmd/login.md +26 -0
- package/docs/docs/cmd/logout.md +4 -0
- package/docs/docs/cmd/pa/app/app-get.md +24 -0
- package/docs/docs/cmd/pa/app/app-list.md +21 -0
- package/docs/docs/cmd/pa/connector/connector-list.md +17 -0
- package/docs/docs/cmd/pa/environment/environment-get.md +26 -2
- package/docs/docs/cmd/pa/environment/environment-list.md +19 -0
- package/docs/docs/cmd/planner/plan/plan-get.md +21 -7
- package/docs/docs/cmd/planner/plan/plan-list.md +16 -2
- package/docs/docs/cmd/planner/plan/plan-set.md +10 -4
- package/docs/docs/cmd/planner/roster/roster-get.md +73 -0
- package/docs/docs/cmd/planner/roster/roster-member-add.md +87 -0
- package/docs/docs/cmd/planner/roster/roster-member-list.md +76 -0
- package/docs/docs/cmd/planner/roster/roster-member-remove.md +51 -0
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-get.md +43 -0
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-list.md +43 -0
- package/docs/docs/cmd/pp/card/card-clone.md +12 -0
- package/docs/docs/cmd/pp/card/card-get.md +49 -0
- package/docs/docs/cmd/pp/card/card-list.md +49 -0
- package/docs/docs/cmd/pp/chatbot/chatbot-get.md +55 -0
- package/docs/docs/cmd/pp/chatbot/chatbot-list.md +36 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.md +30 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.md +30 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-row-list.md +30 -0
- package/docs/docs/cmd/pp/environment/environment-get.md +19 -0
- package/docs/docs/cmd/pp/environment/environment-list.md +19 -0
- package/docs/docs/cmd/pp/gateway/gateway-get.md +19 -0
- package/docs/docs/cmd/pp/gateway/gateway-list.md +19 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-add.md +12 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-list.md +12 -0
- package/docs/docs/cmd/pp/solution/solution-get.md +14 -0
- package/docs/docs/cmd/pp/solution/solution-list.md +14 -0
- package/docs/docs/cmd/pp/solution/solution-publisher-get.md +20 -1
- package/docs/docs/cmd/pp/solution/solution-publisher-list.md +18 -0
- package/docs/docs/cmd/pp/tenant/tenant-settings-list.md +21 -0
- package/docs/docs/cmd/purview/auditlog/auditlog-list.md +123 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.md +132 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-list.md +107 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.md +45 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.md +106 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.md +3 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.md +97 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.md +43 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.md +43 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +3 -0
- package/docs/docs/cmd/request.md +74 -0
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.md +56 -0
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +46 -0
- package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.md +104 -0
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +1 -1
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +1 -1
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +1 -1
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-add.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-get.md +91 -0
- package/docs/docs/cmd/spo/navigation/navigation-node-set.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-add.md +3 -0
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.md +59 -0
- package/docs/docs/cmd/status.md +46 -0
- package/docs/docs/cmd/version.md +26 -0
- package/npm-shrinkwrap.json +911 -876
- package/package.json +12 -12
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoFileSharingLinkSetCommand_instances, _SpoFileSharingLinkSetCommand_initTelemetry, _SpoFileSharingLinkSetCommand_initOptions, _SpoFileSharingLinkSetCommand_initValidators, _SpoFileSharingLinkSetCommand_initOptionSets;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
const spo_1 = require("../../../../utils/spo");
|
|
23
|
+
class SpoFileSharingLinkSetCommand extends SpoCommand_1.default {
|
|
24
|
+
get name() {
|
|
25
|
+
return commands_1.default.FILE_SHARINGLINK_SET;
|
|
26
|
+
}
|
|
27
|
+
get description() {
|
|
28
|
+
return 'Updates a sharing link of a file';
|
|
29
|
+
}
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
_SpoFileSharingLinkSetCommand_instances.add(this);
|
|
33
|
+
__classPrivateFieldGet(this, _SpoFileSharingLinkSetCommand_instances, "m", _SpoFileSharingLinkSetCommand_initTelemetry).call(this);
|
|
34
|
+
__classPrivateFieldGet(this, _SpoFileSharingLinkSetCommand_instances, "m", _SpoFileSharingLinkSetCommand_initOptions).call(this);
|
|
35
|
+
__classPrivateFieldGet(this, _SpoFileSharingLinkSetCommand_instances, "m", _SpoFileSharingLinkSetCommand_initValidators).call(this);
|
|
36
|
+
__classPrivateFieldGet(this, _SpoFileSharingLinkSetCommand_instances, "m", _SpoFileSharingLinkSetCommand_initOptionSets).call(this);
|
|
37
|
+
}
|
|
38
|
+
commandAction(logger, args) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (this.verbose) {
|
|
41
|
+
logger.logToStderr(`Updating sharing link of file ${args.options.fileId || args.options.fileUrl}...`);
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const fileDetails = yield spo_1.spo.getVroomFileDetails(args.options.webUrl, args.options.fileId, args.options.fileUrl);
|
|
45
|
+
const requestOptions = {
|
|
46
|
+
url: `https://graph.microsoft.com/v1.0/sites/${fileDetails.SiteId}/drives/${fileDetails.VroomDriveID}/items/${fileDetails.VroomItemID}/permissions/${args.options.id}`,
|
|
47
|
+
headers: {
|
|
48
|
+
accept: 'application/json;odata.metadata=none'
|
|
49
|
+
},
|
|
50
|
+
responseType: 'json',
|
|
51
|
+
data: {
|
|
52
|
+
expirationDateTime: args.options.expirationDateTime
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const sharingLink = yield request_1.default.patch(requestOptions);
|
|
56
|
+
logger.log(sharingLink);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
this.handleRejectedODataJsonPromise(err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
_SpoFileSharingLinkSetCommand_instances = new WeakSet(), _SpoFileSharingLinkSetCommand_initTelemetry = function _SpoFileSharingLinkSetCommand_initTelemetry() {
|
|
65
|
+
this.telemetry.push((args) => {
|
|
66
|
+
Object.assign(this.telemetryProperties, {
|
|
67
|
+
fileId: typeof args.options.fileId !== 'undefined',
|
|
68
|
+
fileUrl: typeof args.options.fileUrl !== 'undefined'
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}, _SpoFileSharingLinkSetCommand_initOptions = function _SpoFileSharingLinkSetCommand_initOptions() {
|
|
72
|
+
this.options.unshift({
|
|
73
|
+
option: '-u, --webUrl <webUrl>'
|
|
74
|
+
}, {
|
|
75
|
+
option: '--fileId [fileId]'
|
|
76
|
+
}, {
|
|
77
|
+
option: '--fileUrl [fileUrl]'
|
|
78
|
+
}, {
|
|
79
|
+
option: '--id <id>'
|
|
80
|
+
}, {
|
|
81
|
+
option: '--expirationDateTime <expirationDateTime>'
|
|
82
|
+
});
|
|
83
|
+
}, _SpoFileSharingLinkSetCommand_initValidators = function _SpoFileSharingLinkSetCommand_initValidators() {
|
|
84
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
86
|
+
if (isValidSharePointUrl !== true) {
|
|
87
|
+
return isValidSharePointUrl;
|
|
88
|
+
}
|
|
89
|
+
if (args.options.fileId && !validation_1.validation.isValidGuid(args.options.fileId)) {
|
|
90
|
+
return `${args.options.fileId} is not a valid GUID`;
|
|
91
|
+
}
|
|
92
|
+
if (!validation_1.validation.isValidGuid(args.options.id)) {
|
|
93
|
+
return `${args.options.id} is not a valid GUID`;
|
|
94
|
+
}
|
|
95
|
+
if (!validation_1.validation.isValidISODateTime(args.options.expirationDateTime)) {
|
|
96
|
+
return `'${args.options.expirationDateTime}' is not a valid ISO date string`;
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}));
|
|
100
|
+
}, _SpoFileSharingLinkSetCommand_initOptionSets = function _SpoFileSharingLinkSetCommand_initOptionSets() {
|
|
101
|
+
this.optionSets.push({ options: ['fileId', 'fileUrl'] });
|
|
102
|
+
};
|
|
103
|
+
module.exports = new SpoFileSharingLinkSetCommand();
|
|
104
|
+
//# sourceMappingURL=file-sharinglink-set.js.map
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoGroupListCommand_instances, _SpoGroupListCommand_initTelemetry, _SpoGroupListCommand_initOptions, _SpoGroupListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const request_1 = require("../../../../request");
|
|
19
20
|
const odata_1 = require("../../../../utils/odata");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
@@ -73,7 +74,7 @@ class SpoGroupListCommand extends SpoCommand_1.default {
|
|
|
73
74
|
};
|
|
74
75
|
const groupProperties = yield request_1.default.get(requestOptions);
|
|
75
76
|
logger.log(groupProperties);
|
|
76
|
-
if (!options.output || options.output
|
|
77
|
+
if (!options.output || !Cli_1.Cli.shouldTrimOutput(options.output)) {
|
|
77
78
|
logger.log(groupProperties);
|
|
78
79
|
}
|
|
79
80
|
else {
|
|
@@ -45,7 +45,7 @@ class SpoHubSiteGetCommand extends SpoCommand_1.default {
|
|
|
45
45
|
if (args.options.includeAssociatedSites && (args.options.output && args.options.output !== 'json')) {
|
|
46
46
|
throw 'includeAssociatedSites option is only allowed with json output mode';
|
|
47
47
|
}
|
|
48
|
-
if (args.options.includeAssociatedSites === true && args.options.output && args.options.output
|
|
48
|
+
if (args.options.includeAssociatedSites === true && args.options.output && !Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
49
49
|
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
50
50
|
const associatedSitesCommandOutput = yield this.getAssociatedSites(spoAdminUrl, hubSite.SiteId, logger, args);
|
|
51
51
|
const associatedSites = JSON.parse(associatedSitesCommandOutput.stdout);
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoListItemListCommand_instances, _SpoListItemListCommand_initTelemetry, _SpoListItemListCommand_initOptions, _SpoListItemListCommand_initValidators, _SpoListItemListCommand_initOptionSets, _SpoListItemListCommand_initTypes;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const request_1 = require("../../../../request");
|
|
19
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
20
21
|
const spo_1 = require("../../../../utils/spo");
|
|
@@ -53,7 +54,7 @@ class SpoListItemListCommand extends SpoCommand_1.default {
|
|
|
53
54
|
}
|
|
54
55
|
let formDigestValue = '';
|
|
55
56
|
const fieldsArray = args.options.fields ? args.options.fields.split(",")
|
|
56
|
-
: (!args.options.output || args.options.output
|
|
57
|
+
: (!args.options.output || Cli_1.Cli.shouldTrimOutput(args.options.output)) ? ["Title", "Id"] : [];
|
|
57
58
|
const fieldsWithSlash = fieldsArray.filter(item => item.includes('/'));
|
|
58
59
|
const fieldsToExpand = fieldsWithSlash.map(e => e.split('/')[0]);
|
|
59
60
|
const expandFieldsArray = fieldsToExpand.filter((item, pos) => fieldsToExpand.indexOf(item) === pos);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoNavigationNodeGetCommand_instances, _SpoNavigationNodeGetCommand_initOptions, _SpoNavigationNodeGetCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class SpoNavigationNodeGetCommand extends SpoCommand_1.default {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands_1.default.NAVIGATION_NODE_GET;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return 'Retrieve information about a specific navigation node';
|
|
28
|
+
}
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
_SpoNavigationNodeGetCommand_instances.add(this);
|
|
32
|
+
__classPrivateFieldGet(this, _SpoNavigationNodeGetCommand_instances, "m", _SpoNavigationNodeGetCommand_initOptions).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _SpoNavigationNodeGetCommand_instances, "m", _SpoNavigationNodeGetCommand_initValidators).call(this);
|
|
34
|
+
}
|
|
35
|
+
commandAction(logger, args) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (this.verbose) {
|
|
38
|
+
logger.logToStderr(`Retrieving information about navigation node with id ${args.options.id}`);
|
|
39
|
+
}
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
url: `${args.options.webUrl}/_api/web/navigation/GetNodeById(${args.options.id})`,
|
|
42
|
+
headers: {
|
|
43
|
+
'accept': 'application/json;odata=nometadata'
|
|
44
|
+
},
|
|
45
|
+
responseType: 'json'
|
|
46
|
+
};
|
|
47
|
+
try {
|
|
48
|
+
const listInstance = yield request_1.default.get(requestOptions);
|
|
49
|
+
logger.log(listInstance);
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
this.handleRejectedODataJsonPromise(err);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_SpoNavigationNodeGetCommand_instances = new WeakSet(), _SpoNavigationNodeGetCommand_initOptions = function _SpoNavigationNodeGetCommand_initOptions() {
|
|
58
|
+
this.options.unshift({
|
|
59
|
+
option: '-u, --webUrl <webUrl>'
|
|
60
|
+
}, {
|
|
61
|
+
option: '--id <id>'
|
|
62
|
+
});
|
|
63
|
+
}, _SpoNavigationNodeGetCommand_initValidators = function _SpoNavigationNodeGetCommand_initValidators() {
|
|
64
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const id = parseInt(args.options.id);
|
|
66
|
+
if (isNaN(id)) {
|
|
67
|
+
return `${args.options.id} is not a valid number`;
|
|
68
|
+
}
|
|
69
|
+
return validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
module.exports = new SpoNavigationNodeGetCommand();
|
|
73
|
+
//# sourceMappingURL=navigation-node-get.js.map
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoPageColumnGetCommand_instances, _SpoPageColumnGetCommand_initOptions, _SpoPageColumnGetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
@@ -39,7 +40,7 @@ class SpoPageColumnGetCommand extends SpoCommand_1.default {
|
|
|
39
40
|
const sections = clientSidePage.sections
|
|
40
41
|
.filter(section => section.order === args.options.section);
|
|
41
42
|
if (sections.length) {
|
|
42
|
-
const isJSONOutput = args.options.output
|
|
43
|
+
const isJSONOutput = !Cli_1.Cli.shouldTrimOutput(args.options.output);
|
|
43
44
|
const columns = sections[0].columns.filter(col => col.order === args.options.column);
|
|
44
45
|
if (columns.length) {
|
|
45
46
|
const column = Page_1.Page.getColumnsInformation(columns[0], isJSONOutput);
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoPageColumnListCommand_instances, _SpoPageColumnListCommand_initOptions, _SpoPageColumnListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
@@ -39,7 +40,7 @@ class SpoPageColumnListCommand extends SpoCommand_1.default {
|
|
|
39
40
|
const sections = clientSidePage.sections
|
|
40
41
|
.filter(section => section.order === args.options.section);
|
|
41
42
|
if (sections.length) {
|
|
42
|
-
const isJSONOutput = args.options.output
|
|
43
|
+
const isJSONOutput = !Cli_1.Cli.shouldTrimOutput(args.options.output);
|
|
43
44
|
logger.log(sections[0].columns.map(c => {
|
|
44
45
|
const column = Page_1.Page.getColumnsInformation(c, isJSONOutput);
|
|
45
46
|
column.controls = c.controls.length;
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoPageSectionGetCommand_instances, _SpoPageSectionGetCommand_initOptions, _SpoPageSectionGetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
@@ -38,7 +39,7 @@ class SpoPageSectionGetCommand extends SpoCommand_1.default {
|
|
|
38
39
|
const clientSidePage = yield Page_1.Page.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose);
|
|
39
40
|
const sections = clientSidePage.sections
|
|
40
41
|
.filter(section => section.order === args.options.section);
|
|
41
|
-
const isJSONOutput = args.options.output
|
|
42
|
+
const isJSONOutput = !Cli_1.Cli.shouldTrimOutput(args.options.output);
|
|
42
43
|
if (sections.length) {
|
|
43
44
|
logger.log(Page_1.Page.getSectionInformation(sections[0], isJSONOutput));
|
|
44
45
|
}
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoPageSectionListCommand_instances, _SpoPageSectionListCommand_initOptions, _SpoPageSectionListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
@@ -37,7 +38,7 @@ class SpoPageSectionListCommand extends SpoCommand_1.default {
|
|
|
37
38
|
try {
|
|
38
39
|
const clientSidePage = yield Page_1.Page.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose);
|
|
39
40
|
const sections = clientSidePage.sections;
|
|
40
|
-
const isJSONOutput = args.options.output
|
|
41
|
+
const isJSONOutput = !Cli_1.Cli.shouldTrimOutput(args.options.output);
|
|
41
42
|
if (sections.length) {
|
|
42
43
|
const output = sections.map(section => Page_1.Page.getSectionInformation(section, isJSONOutput));
|
|
43
44
|
if (isJSONOutput) {
|
|
@@ -53,6 +53,9 @@ class SpoSiteDesignAddCommand extends SpoCommand_1.default {
|
|
|
53
53
|
if (args.options.previewImageAltText) {
|
|
54
54
|
info.PreviewImageAltText = args.options.previewImageAltText;
|
|
55
55
|
}
|
|
56
|
+
if (args.options.thumbnailUrl) {
|
|
57
|
+
info.ThumbnailUrl = args.options.thumbnailUrl;
|
|
58
|
+
}
|
|
56
59
|
if (args.options.isDefault) {
|
|
57
60
|
info.IsDefault = true;
|
|
58
61
|
}
|
|
@@ -83,6 +86,7 @@ _SpoSiteDesignAddCommand_instances = new WeakSet(), _SpoSiteDesignAddCommand_ini
|
|
|
83
86
|
description: (!(!args.options.description)).toString(),
|
|
84
87
|
previewImageUrl: (!(!args.options.previewImageUrl)).toString(),
|
|
85
88
|
previewImageAltText: (!(!args.options.previewImageAltText)).toString(),
|
|
89
|
+
thumbnailUrl: (!(!args.options.thumbnailUrl)).toString(),
|
|
86
90
|
isDefault: args.options.isDefault || false
|
|
87
91
|
});
|
|
88
92
|
});
|
|
@@ -100,6 +104,8 @@ _SpoSiteDesignAddCommand_instances = new WeakSet(), _SpoSiteDesignAddCommand_ini
|
|
|
100
104
|
option: '-m, --previewImageUrl [previewImageUrl]'
|
|
101
105
|
}, {
|
|
102
106
|
option: '-a, --previewImageAltText [previewImageAltText]'
|
|
107
|
+
}, {
|
|
108
|
+
option: '--thumbnailUrl [thumbnailUrl]'
|
|
103
109
|
}, {
|
|
104
110
|
option: '--isDefault'
|
|
105
111
|
});
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoSearchCommand_instances, _SpoSearchCommand_initTelemetry, _SpoSearchCommand_initOptions, _SpoSearchCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const util_1 = require("util");
|
|
19
|
+
const Cli_1 = require("../../../cli/Cli");
|
|
19
20
|
const request_1 = require("../../../request");
|
|
20
21
|
const formatting_1 = require("../../../utils/formatting");
|
|
21
22
|
const spo_1 = require("../../../utils/spo");
|
|
@@ -137,7 +138,7 @@ class SpoSearchCommand extends SpoCommand_1.default {
|
|
|
137
138
|
else {
|
|
138
139
|
logger.log(this.getParsedOutput(args, results));
|
|
139
140
|
}
|
|
140
|
-
if (!args.options.output || args.options.output
|
|
141
|
+
if (!args.options.output || Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
141
142
|
logger.log("# Rows: " + results[results.length - 1].PrimaryQueryResult.RelevantResults.TotalRows);
|
|
142
143
|
logger.log("# Rows (Including duplicates): " + results[results.length - 1].PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates);
|
|
143
144
|
logger.log("Elapsed Time: " + this.getElapsedTime(results));
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoTenantApplicationCustomizerAddCommand_instances, _SpoTenantApplicationCustomizerAddCommand_initTelemetry, _SpoTenantApplicationCustomizerAddCommand_initOptions, _SpoTenantApplicationCustomizerAddCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const validation_1 = require("../../../../utils/validation");
|
|
19
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
20
|
+
const commands_1 = require("../../commands");
|
|
21
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
22
|
+
const spoTenantAppCatalogUrlGetCommand = require("../tenant/tenant-appcatalogurl-get");
|
|
23
|
+
const spoListItemAddCommand = require("../listitem/listitem-add");
|
|
24
|
+
const spoListItemListCommand = require("../listitem/listitem-list");
|
|
25
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
26
|
+
class SpoTenantApplicationCustomizerAddCommand extends SpoCommand_1.default {
|
|
27
|
+
get name() {
|
|
28
|
+
return commands_1.default.TENANT_APPLICATIONCUSTOMIZER_ADD;
|
|
29
|
+
}
|
|
30
|
+
get description() {
|
|
31
|
+
return 'Add an application customizer as a tenant wide extension.';
|
|
32
|
+
}
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
_SpoTenantApplicationCustomizerAddCommand_instances.add(this);
|
|
36
|
+
__classPrivateFieldGet(this, _SpoTenantApplicationCustomizerAddCommand_instances, "m", _SpoTenantApplicationCustomizerAddCommand_initTelemetry).call(this);
|
|
37
|
+
__classPrivateFieldGet(this, _SpoTenantApplicationCustomizerAddCommand_instances, "m", _SpoTenantApplicationCustomizerAddCommand_initOptions).call(this);
|
|
38
|
+
__classPrivateFieldGet(this, _SpoTenantApplicationCustomizerAddCommand_instances, "m", _SpoTenantApplicationCustomizerAddCommand_initValidators).call(this);
|
|
39
|
+
}
|
|
40
|
+
commandAction(logger, args) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
try {
|
|
43
|
+
const appCatalogUrl = yield this.getAppCatalogUrl(logger);
|
|
44
|
+
const componentManifest = yield this.getComponentManifest(appCatalogUrl, args.options.clientSideComponentId, logger);
|
|
45
|
+
const clientComponentManifest = JSON.parse(componentManifest.ClientComponentManifest);
|
|
46
|
+
if (clientComponentManifest.extensionType !== "ApplicationCustomizer") {
|
|
47
|
+
throw `The extension type of this component is not of type 'ApplicationCustomizer' but of type '${clientComponentManifest.extensionType}'`;
|
|
48
|
+
}
|
|
49
|
+
const solution = yield this.getSolutionFromAppCatalog(appCatalogUrl, componentManifest.SolutionId, logger);
|
|
50
|
+
if (!solution.ContainsTenantWideExtension) {
|
|
51
|
+
throw `The solution does not contain an extension that can be deployed to all sites. Make sure that you've entered the correct component Id.`;
|
|
52
|
+
}
|
|
53
|
+
else if (!solution.SkipFeatureDeployment) {
|
|
54
|
+
throw 'The solution has not been deployed to all sites. Make sure to deploy this solution to all sites.';
|
|
55
|
+
}
|
|
56
|
+
yield this.addTenantWideExtension(appCatalogUrl, args.options, logger);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
this.handleRejectedODataJsonPromise(err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
getAppCatalogUrl(logger) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const spoTenantAppCatalogUrlGetCommandOutput = yield Cli_1.Cli.executeCommandWithOutput(spoTenantAppCatalogUrlGetCommand, { options: { output: 'text', _: [] } });
|
|
66
|
+
if (this.verbose) {
|
|
67
|
+
logger.logToStderr(spoTenantAppCatalogUrlGetCommandOutput.stderr);
|
|
68
|
+
}
|
|
69
|
+
const appCatalogUrl = spoTenantAppCatalogUrlGetCommandOutput.stdout;
|
|
70
|
+
if (!appCatalogUrl) {
|
|
71
|
+
throw 'Cannot add tenant-wide application customizer as app catalog cannot be found';
|
|
72
|
+
}
|
|
73
|
+
if (this.verbose) {
|
|
74
|
+
logger.logToStderr(`Got tenant app catalog url: ${appCatalogUrl}`);
|
|
75
|
+
}
|
|
76
|
+
return appCatalogUrl;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
getComponentManifest(appCatalogUrl, clientSideComponentId, logger) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
if (this.verbose) {
|
|
82
|
+
logger.logToStderr('Retrieving component manifest item from the ComponentManifests list on the app catalog site so that we get the solution id');
|
|
83
|
+
}
|
|
84
|
+
const camlQuery = `<View><ViewFields><FieldRef Name='ClientComponentId'></FieldRef><FieldRef Name='SolutionId'></FieldRef><FieldRef Name='ClientComponentManifest'></FieldRef></ViewFields><Query><Where><Eq><FieldRef Name='ClientComponentId' /><Value Type='Guid'>${clientSideComponentId}</Value></Eq></Where></Query></View>`;
|
|
85
|
+
const commandOptions = {
|
|
86
|
+
webUrl: appCatalogUrl,
|
|
87
|
+
listUrl: `${urlUtil_1.urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/Lists/ComponentManifests`,
|
|
88
|
+
camlQuery: camlQuery,
|
|
89
|
+
verbose: this.verbose,
|
|
90
|
+
debug: this.debug,
|
|
91
|
+
output: 'json'
|
|
92
|
+
};
|
|
93
|
+
const output = yield Cli_1.Cli.executeCommandWithOutput(spoListItemListCommand, { options: Object.assign(Object.assign({}, commandOptions), { _: [] }) });
|
|
94
|
+
if (this.verbose) {
|
|
95
|
+
logger.logToStderr(output.stderr);
|
|
96
|
+
}
|
|
97
|
+
const outputParsed = JSON.parse(output.stdout);
|
|
98
|
+
if (outputParsed.length === 0) {
|
|
99
|
+
throw 'No component found with the specified clientSideComponentId found in the component manifest list. Make sure that the application is added to the application catalog';
|
|
100
|
+
}
|
|
101
|
+
return outputParsed[0];
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
getSolutionFromAppCatalog(appCatalogUrl, solutionId, logger) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
if (this.verbose) {
|
|
107
|
+
logger.logToStderr(`Retrieving solution with id ${solutionId} from the application catalog`);
|
|
108
|
+
}
|
|
109
|
+
const camlQuery = `<View><ViewFields><FieldRef Name='SkipFeatureDeployment'></FieldRef><FieldRef Name='ContainsTenantWideExtension'></FieldRef></ViewFields><Query><Where><Eq><FieldRef Name='AppProductID' /><Value Type='Guid'>${solutionId}</Value></Eq></Where></Query></View>`;
|
|
110
|
+
const commandOptions = {
|
|
111
|
+
webUrl: appCatalogUrl,
|
|
112
|
+
listUrl: `${urlUtil_1.urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/AppCatalog`,
|
|
113
|
+
camlQuery: camlQuery,
|
|
114
|
+
verbose: this.verbose,
|
|
115
|
+
debug: this.debug,
|
|
116
|
+
output: 'json'
|
|
117
|
+
};
|
|
118
|
+
const output = yield Cli_1.Cli.executeCommandWithOutput(spoListItemListCommand, { options: Object.assign(Object.assign({}, commandOptions), { _: [] }) });
|
|
119
|
+
if (this.verbose) {
|
|
120
|
+
logger.logToStderr(output.stderr);
|
|
121
|
+
}
|
|
122
|
+
const outputParsed = JSON.parse(output.stdout);
|
|
123
|
+
if (outputParsed.length === 0) {
|
|
124
|
+
throw `No component found with the solution id ${solutionId}. Make sure that the solution is available in the app catalog`;
|
|
125
|
+
}
|
|
126
|
+
return outputParsed[0];
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
addTenantWideExtension(appCatalogUrl, options, logger) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
if (this.verbose) {
|
|
132
|
+
logger.logToStderr('Pre-checks finished. Adding tenant wide extension to the TenantWideExtensions list');
|
|
133
|
+
}
|
|
134
|
+
const commandOptions = {
|
|
135
|
+
webUrl: appCatalogUrl,
|
|
136
|
+
listUrl: `${urlUtil_1.urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/Lists/TenantWideExtensions`,
|
|
137
|
+
Title: options.title,
|
|
138
|
+
TenantWideExtensionComponentId: options.clientSideComponentId,
|
|
139
|
+
TenantWideExtensionLocation: 'ClientSideExtension.ApplicationCustomizer',
|
|
140
|
+
TenantWideExtensionSequence: 0,
|
|
141
|
+
TenantWideExtensionListTemplate: 0,
|
|
142
|
+
TenantWideExtensionComponentProperties: options.clientSideComponentProperties || '',
|
|
143
|
+
TenantWideExtensionWebTemplate: options.webTemplate || '',
|
|
144
|
+
TenantWideExtensionDisabled: false,
|
|
145
|
+
verbose: this.verbose,
|
|
146
|
+
debug: this.debug,
|
|
147
|
+
output: options.output
|
|
148
|
+
};
|
|
149
|
+
yield Cli_1.Cli.executeCommand(spoListItemAddCommand, { options: Object.assign(Object.assign({}, commandOptions), { _: [] }) });
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
_SpoTenantApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoTenantApplicationCustomizerAddCommand_initTelemetry = function _SpoTenantApplicationCustomizerAddCommand_initTelemetry() {
|
|
154
|
+
this.telemetry.push((args) => {
|
|
155
|
+
Object.assign(this.telemetryProperties, {
|
|
156
|
+
clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
|
|
157
|
+
webTemplate: typeof args.options.webTemplate !== 'undefined'
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
}, _SpoTenantApplicationCustomizerAddCommand_initOptions = function _SpoTenantApplicationCustomizerAddCommand_initOptions() {
|
|
161
|
+
this.options.unshift({
|
|
162
|
+
option: '-t, --title <title>'
|
|
163
|
+
}, {
|
|
164
|
+
option: '-i, --clientSideComponentId <clientSideComponentId>'
|
|
165
|
+
}, {
|
|
166
|
+
option: '-p, --clientSideComponentProperties [clientSideComponentProperties]'
|
|
167
|
+
}, {
|
|
168
|
+
option: '-w, --webTemplate [webTemplate]'
|
|
169
|
+
});
|
|
170
|
+
}, _SpoTenantApplicationCustomizerAddCommand_initValidators = function _SpoTenantApplicationCustomizerAddCommand_initValidators() {
|
|
171
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
172
|
+
if (!validation_1.validation.isValidGuid(args.options.clientSideComponentId)) {
|
|
173
|
+
return `${args.options.clientSideComponentId} is not a valid GUID`;
|
|
174
|
+
}
|
|
175
|
+
return true;
|
|
176
|
+
}));
|
|
177
|
+
};
|
|
178
|
+
module.exports = new SpoTenantApplicationCustomizerAddCommand();
|
|
179
|
+
//# sourceMappingURL=tenant-applicationcustomizer-add.js.map
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoTermListCommand_instances, _SpoTermListCommand_initTelemetry, _SpoTermListCommand_initOptions, _SpoTermListCommand_initValidators, _SpoTermListCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const config_1 = require("../../../../config");
|
|
19
20
|
const request_1 = require("../../../../request");
|
|
20
21
|
const formatting_1 = require("../../../../utils/formatting");
|
|
@@ -62,7 +63,7 @@ class SpoTermListCommand extends SpoCommand_1.default {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
if (!args.options.output || args.options.output
|
|
66
|
+
if (!args.options.output || !Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
66
67
|
logger.log(terms);
|
|
67
68
|
}
|
|
68
69
|
else if (!args.options.includeChildTerms) {
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoUserProfileGetCommand_instances, _SpoUserProfileGetCommand_initOptions, _SpoUserProfileGetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
18
19
|
const request_1 = require("../../../../request");
|
|
19
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
20
21
|
const spo_1 = require("../../../../utils/spo");
|
|
@@ -47,8 +48,7 @@ class SpoUserProfileGetCommand extends SpoCommand_1.default {
|
|
|
47
48
|
responseType: 'json'
|
|
48
49
|
};
|
|
49
50
|
const res = yield request_1.default.get(requestOptions);
|
|
50
|
-
if (!args.options.output ||
|
|
51
|
-
args.options.output === 'text') {
|
|
51
|
+
if (!args.options.output || Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
52
52
|
res.UserProfileProperties = JSON.stringify(res.UserProfileProperties);
|
|
53
53
|
}
|
|
54
54
|
logger.log(res);
|
|
@@ -13,6 +13,7 @@ exports.default = {
|
|
|
13
13
|
APP_TEAMSPACKAGE_DOWNLOAD: `${prefix} app teamspackage download`,
|
|
14
14
|
APP_UNINSTALL: `${prefix} app uninstall`,
|
|
15
15
|
APP_UPGRADE: `${prefix} app upgrade`,
|
|
16
|
+
APPLICATIONCUSTOMIZER_ADD: `${prefix} applicationcustomizer add`,
|
|
16
17
|
APPPAGE_ADD: `${prefix} apppage add`,
|
|
17
18
|
APPPAGE_SET: `${prefix} apppage set`,
|
|
18
19
|
CDN_GET: `${prefix} cdn get`,
|
|
@@ -65,9 +66,11 @@ exports.default = {
|
|
|
65
66
|
FILE_ROLEINHERITANCE_RESET: `${prefix} file roleinheritance reset`,
|
|
66
67
|
FILE_SHARINGINFO_GET: `${prefix} file sharinginfo get`,
|
|
67
68
|
FILE_SHARINGLINK_ADD: `${prefix} file sharinglink add`,
|
|
69
|
+
FILE_SHARINGLINK_CLEAR: `${prefix} file sharinglink clear`,
|
|
68
70
|
FILE_SHARINGLINK_GET: `${prefix} file sharinglink get`,
|
|
69
71
|
FILE_SHARINGLINK_LIST: `${prefix} file sharinglink list`,
|
|
70
72
|
FILE_SHARINGLINK_REMOVE: `${prefix} file sharinglink remove`,
|
|
73
|
+
FILE_SHARINGLINK_SET: `${prefix} file sharinglink set`,
|
|
71
74
|
FILE_VERSION_CLEAR: `${prefix} file version clear`,
|
|
72
75
|
FILE_VERSION_GET: `${prefix} file version get`,
|
|
73
76
|
FILE_VERSION_LIST: `${prefix} file version list`,
|
|
@@ -165,6 +168,7 @@ exports.default = {
|
|
|
165
168
|
LISTITEM_SET: `${prefix} listitem set`,
|
|
166
169
|
MAIL_SEND: `${prefix} mail send`,
|
|
167
170
|
NAVIGATION_NODE_ADD: `${prefix} navigation node add`,
|
|
171
|
+
NAVIGATION_NODE_GET: `${prefix} navigation node get`,
|
|
168
172
|
NAVIGATION_NODE_LIST: `${prefix} navigation node list`,
|
|
169
173
|
NAVIGATION_NODE_REMOVE: `${prefix} navigation node remove`,
|
|
170
174
|
NAVIGATION_NODE_SET: `${prefix} navigation node set`,
|
|
@@ -274,6 +278,7 @@ exports.default = {
|
|
|
274
278
|
STORAGEENTITY_REMOVE: `${prefix} storageentity remove`,
|
|
275
279
|
TENANT_APPCATALOG_ADD: `${prefix} tenant appcatalog add`,
|
|
276
280
|
TENANT_APPCATALOGURL_GET: `${prefix} tenant appcatalogurl get`,
|
|
281
|
+
TENANT_APPLICATIONCUSTOMIZER_ADD: `${prefix} tenant applicationcustomizer add`,
|
|
277
282
|
TENANT_RECYCLEBINITEM_LIST: `${prefix} tenant recyclebinitem list`,
|
|
278
283
|
TENANT_RECYCLEBINITEM_REMOVE: `${prefix} tenant recyclebinitem remove`,
|
|
279
284
|
TENANT_RECYCLEBINITEM_RESTORE: `${prefix} tenant recyclebinitem restore`,
|
|
@@ -79,7 +79,7 @@ class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
|
79
79
|
}
|
|
80
80
|
const res = yield odata_1.odata.getAllItems(requestUrl);
|
|
81
81
|
const resFiltered = res.filter(y => y.isOnlineMeeting);
|
|
82
|
-
if (!args.options.output || args.options.output
|
|
82
|
+
if (!args.options.output || !Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
83
83
|
logger.log(resFiltered);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
@@ -47,7 +47,7 @@ class TeamsTeamAppListCommand extends GraphCommand_1.default {
|
|
|
47
47
|
}
|
|
48
48
|
const teamId = yield this.getTeamId(args);
|
|
49
49
|
const res = yield odata_1.odata.getAllItems(`${this.resource}/v1.0/teams/${teamId}/installedApps?$expand=teamsApp,teamsAppDefinition`);
|
|
50
|
-
if (args.options.output
|
|
50
|
+
if (!Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
51
51
|
logger.log(res);
|
|
52
52
|
}
|
|
53
53
|
else {
|