@pnp/cli-microsoft365 7.0.0-beta.5fdb9e3 → 7.0.0-beta.607e42d
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.cjs +0 -2
- package/dist/GlobalOptions.js +1 -7
- package/dist/m365/aad/commands/app/app-add.js +8 -8
- package/dist/m365/aad/commands/app/app-role-add.js +5 -5
- package/dist/m365/aad/commands/app/app-set.js +5 -5
- package/dist/m365/aad/commands/group/group-get.js +4 -4
- package/dist/m365/aad/commands/group/group-list.js +1 -23
- package/dist/m365/aad/commands/policy/policy-list.js +5 -5
- package/dist/m365/cli/commands/cli-issue.js +5 -5
- package/dist/m365/cli/commands/config/config-get.js +5 -5
- package/dist/m365/cli/commands/config/config-reset.js +5 -5
- package/dist/m365/cli/commands/config/config-set.js +5 -5
- package/dist/m365/commands/login.js +5 -5
- package/dist/m365/commands/request.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +5 -5
- package/dist/m365/pa/commands/app/app-export.js +7 -7
- package/dist/m365/pa/commands/app/app-owner-set.js +5 -5
- package/dist/m365/pa/commands/app/app-permission-ensure.js +5 -5
- package/dist/m365/pa/commands.js +1 -4
- package/dist/m365/planner/commands/task/task-add.js +17 -11
- package/dist/m365/planner/commands/task/task-get.js +35 -25
- package/dist/m365/planner/commands/task/task-list.js +26 -19
- package/dist/m365/planner/commands/task/task-remove.js +39 -34
- package/dist/m365/planner/commands/task/task-set.js +35 -23
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +14 -14
- package/dist/m365/spfx/commands/package/package-generate.js +15 -15
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +55 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +8 -8
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +157 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-model.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -13
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +5 -5
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-add.js +11 -11
- package/dist/m365/spo/commands/commandset/commandset-get.js +8 -8
- package/dist/m365/spo/commands/commandset/commandset-list.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-remove.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-set.js +11 -11
- package/dist/m365/spo/commands/file/file-get.js +9 -6
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +8 -8
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +5 -5
- package/dist/m365/spo/commands/list/list-add.js +4 -4
- package/dist/m365/spo/commands/list/list-set.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-add.js +1 -0
- package/dist/m365/spo/commands/listitem/listitem-set.js +3 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +8 -8
- package/dist/m365/spo/commands/page/clientsidepages.js +1 -81
- package/dist/m365/spo/commands/page/page-get.js +1 -0
- package/dist/m365/spo/commands/page/page-list.js +4 -3
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +30 -32
- package/dist/m365/spo/commands/site/site-add.js +114 -161
- package/dist/m365/spo/commands/site/site-apppermission-add.js +15 -18
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +34 -38
- package/dist/m365/spo/commands/site/site-apppermission-set.js +11 -14
- package/dist/m365/spo/commands/site/site-ensure.js +13 -66
- package/dist/m365/spo/commands/site/site-list.js +9 -17
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +6 -6
- package/dist/m365/spo/commands/site/site-remove.js +166 -210
- package/dist/m365/spo/commands/site/site-set.js +121 -153
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -8
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +8 -8
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -4
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +3 -3
- package/dist/m365/spo/commands/web/web-set.js +5 -5
- package/dist/m365/teams/commands/app/app-list.js +5 -5
- package/dist/m365/teams/commands/chat/chat-member-add.js +5 -5
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +4 -4
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +4 -4
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +4 -4
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +5 -5
- package/dist/m365/teams/commands/team/team-set.js +3 -3
- package/dist/m365/todo/commands/task/task-add.js +6 -6
- package/dist/m365/yammer/commands/message/message-list.js +5 -5
- package/dist/m365/yammer/commands/yammer-search.js +5 -5
- package/dist/utils/aadGroup.js +18 -0
- package/dist/utils/fsUtil.js +5 -0
- package/dist/utils/spo.js +582 -0
- package/dist/utils/validation.js +0 -3
- package/docs/docs/cmd/aad/group/group-get.mdx +5 -5
- package/docs/docs/cmd/aad/group/group-list.mdx +0 -11
- package/docs/docs/cmd/pa/app/app-export.mdx +5 -5
- package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
- package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
- package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +2 -5
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +2 -5
- package/docs/docs/cmd/spo/page/page-get.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-list.mdx +0 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +2 -4
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +2 -4
- package/npm-shrinkwrap.json +239 -1416
- package/package.json +6 -12
- package/dist/m365/pa/cds-project-mutator.js +0 -91
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/generated/ManifestTypes.d.ts +0 -11
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +0 -51
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/generated/ManifestTypes.d.ts +0 -12
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +0 -48
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/index.ts +0 -0
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_index.tsx +0 -58
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_index.tsx +0 -55
- package/dist/m365/pa/commands/pcf/pcf-init/assets/package.json +0 -19
- package/dist/m365/pa/commands/pcf/pcf-init/assets/pcfconfig.json +0 -3
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_.gitignore +0 -14
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj +0 -45
- package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +0 -2
- package/dist/m365/pa/commands/pcf/pcf-init.js +0 -120
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Customizations.xml +0 -18
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Relationships.xml +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/template_Solution.xml +0 -94
- package/dist/m365/pa/commands/solution/solution-init/assets/template_.gitignore +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj +0 -44
- package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +0 -2
- package/dist/m365/pa/commands/solution/solution-init.js +0 -126
- package/dist/m365/pa/commands/solution/solution-reference-add.js +0 -88
- package/dist/m365/pa/template-instantiator.js +0 -57
- package/docs/docs/cmd/pa/pcf/pcf-init.mdx +0 -56
- package/docs/docs/cmd/pa/solution/solution-init.mdx +0 -46
- package/docs/docs/cmd/pa/solution/solution-reference-add.mdx +0 -42
package/.eslintrc.cjs
CHANGED
package/dist/GlobalOptions.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (Output) {
|
|
3
|
-
Output[Output["text"] = 0] = "text";
|
|
4
|
-
Output[Output["json"] = 1] = "json";
|
|
5
|
-
Output[Output["csv"] = 2] = "csv";
|
|
6
|
-
Output[Output["md"] = 3] = "md";
|
|
7
|
-
})(Output || (Output = {}));
|
|
1
|
+
export {};
|
|
8
2
|
//# sourceMappingURL=GlobalOptions.js.map
|
|
@@ -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 _AadAppAddCommand_instances, _AadAppAddCommand_initTelemetry, _AadAppAddCommand_initOptions, _AadAppAddCommand_initValidators, _AadAppAddCommand_initOptionSets;
|
|
6
|
+
var _AadAppAddCommand_instances, _a, _AadAppAddCommand_initTelemetry, _AadAppAddCommand_initOptions, _AadAppAddCommand_initValidators, _AadAppAddCommand_initOptionSets;
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import { v4 } from 'uuid';
|
|
9
9
|
import auth from '../../../../Auth.js';
|
|
@@ -635,7 +635,7 @@ class AadAppAddCommand extends GraphCommand {
|
|
|
635
635
|
return platform.charAt(0).toUpperCase() + platform.substring(1);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
_AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = function _AadAppAddCommand_initTelemetry() {
|
|
638
|
+
_a = AadAppAddCommand, _AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = function _AadAppAddCommand_initTelemetry() {
|
|
639
639
|
this.telemetry.push((args) => {
|
|
640
640
|
Object.assign(this.telemetryProperties, {
|
|
641
641
|
apis: typeof args.options.apisDelegated !== 'undefined',
|
|
@@ -664,7 +664,7 @@ _AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = f
|
|
|
664
664
|
option: '-r, --redirectUris [redirectUris]'
|
|
665
665
|
}, {
|
|
666
666
|
option: '-p, --platform [platform]',
|
|
667
|
-
autocomplete:
|
|
667
|
+
autocomplete: _a.aadApplicationPlatform
|
|
668
668
|
}, {
|
|
669
669
|
option: '--implicitFlow'
|
|
670
670
|
}, {
|
|
@@ -679,7 +679,7 @@ _AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = f
|
|
|
679
679
|
option: '--scopeName [scopeName]'
|
|
680
680
|
}, {
|
|
681
681
|
option: '--scopeConsentBy [scopeConsentBy]',
|
|
682
|
-
autocomplete:
|
|
682
|
+
autocomplete: _a.aadAppScopeConsentBy
|
|
683
683
|
}, {
|
|
684
684
|
option: '--scopeAdminConsentDisplayName [scopeAdminConsentDisplayName]'
|
|
685
685
|
}, {
|
|
@@ -700,8 +700,8 @@ _AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = f
|
|
|
700
700
|
}, _AadAppAddCommand_initValidators = function _AadAppAddCommand_initValidators() {
|
|
701
701
|
this.validators.push(async (args) => {
|
|
702
702
|
if (args.options.platform &&
|
|
703
|
-
|
|
704
|
-
return `${args.options.platform} is not a valid value for platform. Allowed values are ${
|
|
703
|
+
_a.aadApplicationPlatform.indexOf(args.options.platform) < 0) {
|
|
704
|
+
return `${args.options.platform} is not a valid value for platform. Allowed values are ${_a.aadApplicationPlatform.join(', ')}`;
|
|
705
705
|
}
|
|
706
706
|
if (args.options.redirectUris && !args.options.platform) {
|
|
707
707
|
return `When you specify redirectUris you also need to specify platform`;
|
|
@@ -727,8 +727,8 @@ _AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = f
|
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
if (args.options.scopeConsentBy &&
|
|
730
|
-
|
|
731
|
-
return `${args.options.scopeConsentBy} is not a valid value for scopeConsentBy. Allowed values are ${
|
|
730
|
+
_a.aadAppScopeConsentBy.indexOf(args.options.scopeConsentBy) < 0) {
|
|
731
|
+
return `${args.options.scopeConsentBy} is not a valid value for scopeConsentBy. Allowed values are ${_a.aadAppScopeConsentBy.join(', ')}`;
|
|
732
732
|
}
|
|
733
733
|
if (args.options.manifest) {
|
|
734
734
|
try {
|
|
@@ -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 _AadAppRoleAddCommand_instances, _AadAppRoleAddCommand_initTelemetry, _AadAppRoleAddCommand_initOptions, _AadAppRoleAddCommand_initValidators, _AadAppRoleAddCommand_initOptionSets;
|
|
6
|
+
var _AadAppRoleAddCommand_instances, _a, _AadAppRoleAddCommand_initTelemetry, _AadAppRoleAddCommand_initOptions, _AadAppRoleAddCommand_initValidators, _AadAppRoleAddCommand_initOptionSets;
|
|
7
7
|
import { v4 } from 'uuid';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -107,7 +107,7 @@ class AadAppRoleAddCommand extends GraphCommand {
|
|
|
107
107
|
throw `Multiple Azure AD application registration with name ${appName} found. Please disambiguate (app object IDs): ${res.value.map(a => a.id).join(', ')}`;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
_AadAppRoleAddCommand_instances = new WeakSet(), _AadAppRoleAddCommand_initTelemetry = function _AadAppRoleAddCommand_initTelemetry() {
|
|
110
|
+
_a = AadAppRoleAddCommand, _AadAppRoleAddCommand_instances = new WeakSet(), _AadAppRoleAddCommand_initTelemetry = function _AadAppRoleAddCommand_initTelemetry() {
|
|
111
111
|
this.telemetry.push((args) => {
|
|
112
112
|
Object.assign(this.telemetryProperties, {
|
|
113
113
|
appId: typeof args.options.appId !== 'undefined',
|
|
@@ -117,13 +117,13 @@ _AadAppRoleAddCommand_instances = new WeakSet(), _AadAppRoleAddCommand_initTelem
|
|
|
117
117
|
});
|
|
118
118
|
}, _AadAppRoleAddCommand_initOptions = function _AadAppRoleAddCommand_initOptions() {
|
|
119
119
|
this.options.unshift({ option: '--appId [appId]' }, { option: '--appObjectId [appObjectId]' }, { option: '--appName [appName]' }, { option: '-n, --name <name>' }, { option: '-d, --description <description>' }, {
|
|
120
|
-
option: '-m, --allowedMembers <allowedMembers>', autocomplete:
|
|
120
|
+
option: '-m, --allowedMembers <allowedMembers>', autocomplete: _a.allowedMembers
|
|
121
121
|
}, { option: '-c, --claim <claim>' });
|
|
122
122
|
}, _AadAppRoleAddCommand_initValidators = function _AadAppRoleAddCommand_initValidators() {
|
|
123
123
|
this.validators.push(async (args) => {
|
|
124
124
|
const { allowedMembers, claim } = args.options;
|
|
125
|
-
if (
|
|
126
|
-
return `${allowedMembers} is not a valid value for allowedMembers. Valid values are ${
|
|
125
|
+
if (_a.allowedMembers.indexOf(allowedMembers) < 0) {
|
|
126
|
+
return `${allowedMembers} is not a valid value for allowedMembers. Valid values are ${_a.allowedMembers.join(', ')}`;
|
|
127
127
|
}
|
|
128
128
|
if (claim.length > 120) {
|
|
129
129
|
return `Claim must not be longer than 120 characters`;
|
|
@@ -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 _AadAppSetCommand_instances, _AadAppSetCommand_initTelemetry, _AadAppSetCommand_initOptions, _AadAppSetCommand_initValidators, _AadAppSetCommand_initOptionSets;
|
|
6
|
+
var _AadAppSetCommand_instances, _a, _AadAppSetCommand_initTelemetry, _AadAppSetCommand_initOptions, _AadAppSetCommand_initValidators, _AadAppSetCommand_initOptionSets;
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -229,7 +229,7 @@ class AadAppSetCommand extends GraphCommand {
|
|
|
229
229
|
return request.patch(requestOptions);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
_AadAppSetCommand_instances = new WeakSet(), _AadAppSetCommand_initTelemetry = function _AadAppSetCommand_initTelemetry() {
|
|
232
|
+
_a = AadAppSetCommand, _AadAppSetCommand_instances = new WeakSet(), _AadAppSetCommand_initTelemetry = function _AadAppSetCommand_initTelemetry() {
|
|
233
233
|
this.telemetry.push((args) => {
|
|
234
234
|
Object.assign(this.telemetryProperties, {
|
|
235
235
|
appId: typeof args.options.appId !== 'undefined',
|
|
@@ -247,7 +247,7 @@ _AadAppSetCommand_instances = new WeakSet(), _AadAppSetCommand_initTelemetry = f
|
|
|
247
247
|
}, _AadAppSetCommand_initOptions = function _AadAppSetCommand_initOptions() {
|
|
248
248
|
this.options.unshift({ option: '--appId [appId]' }, { option: '--objectId [objectId]' }, { option: '-n, --name [name]' }, { option: '-u, --uri [uri]' }, { option: '-r, --redirectUris [redirectUris]' }, { option: '--certificateFile [certificateFile]' }, { option: '--certificateBase64Encoded [certificateBase64Encoded]' }, { option: '--certificateDisplayName [certificateDisplayName]' }, {
|
|
249
249
|
option: '--platform [platform]',
|
|
250
|
-
autocomplete:
|
|
250
|
+
autocomplete: _a.aadApplicationPlatform
|
|
251
251
|
}, { option: '--redirectUrisToRemove [redirectUrisToRemove]' });
|
|
252
252
|
}, _AadAppSetCommand_initValidators = function _AadAppSetCommand_initValidators() {
|
|
253
253
|
this.validators.push(async (args) => {
|
|
@@ -264,8 +264,8 @@ _AadAppSetCommand_instances = new WeakSet(), _AadAppSetCommand_initTelemetry = f
|
|
|
264
264
|
return `When you specify redirectUris you also need to specify platform`;
|
|
265
265
|
}
|
|
266
266
|
if (args.options.platform &&
|
|
267
|
-
|
|
268
|
-
return `${args.options.platform} is not a valid value for platform. Allowed values are ${
|
|
267
|
+
_a.aadApplicationPlatform.indexOf(args.options.platform) < 0) {
|
|
268
|
+
return `${args.options.platform} is not a valid value for platform. Allowed values are ${_a.aadApplicationPlatform.join(', ')}`;
|
|
269
269
|
}
|
|
270
270
|
return true;
|
|
271
271
|
});
|
|
@@ -30,7 +30,7 @@ class AadGroupGetCommand extends GraphCommand {
|
|
|
30
30
|
group = await aadGroup.getGroupById(args.options.id);
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
group = await aadGroup.getGroupByDisplayName(args.options.
|
|
33
|
+
group = await aadGroup.getGroupByDisplayName(args.options.displayName);
|
|
34
34
|
}
|
|
35
35
|
await logger.log(group);
|
|
36
36
|
}
|
|
@@ -43,7 +43,7 @@ _AadGroupGetCommand_instances = new WeakSet(), _AadGroupGetCommand_initOptions =
|
|
|
43
43
|
this.options.unshift({
|
|
44
44
|
option: '-i, --id [id]'
|
|
45
45
|
}, {
|
|
46
|
-
option: '-
|
|
46
|
+
option: '-n, --displayName [displayName]'
|
|
47
47
|
});
|
|
48
48
|
}, _AadGroupGetCommand_initValidators = function _AadGroupGetCommand_initValidators() {
|
|
49
49
|
this.validators.push(async (args) => {
|
|
@@ -53,12 +53,12 @@ _AadGroupGetCommand_instances = new WeakSet(), _AadGroupGetCommand_initOptions =
|
|
|
53
53
|
return true;
|
|
54
54
|
});
|
|
55
55
|
}, _AadGroupGetCommand_initOptionSets = function _AadGroupGetCommand_initOptionSets() {
|
|
56
|
-
this.optionSets.push({ options: ['id', '
|
|
56
|
+
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
57
57
|
}, _AadGroupGetCommand_initTelemetry = function _AadGroupGetCommand_initTelemetry() {
|
|
58
58
|
this.telemetry.push((args) => {
|
|
59
59
|
Object.assign(this.telemetryProperties, {
|
|
60
60
|
id: typeof args.options.id !== 'undefined',
|
|
61
|
-
|
|
61
|
+
displayName: typeof args.options.displayName !== 'undefined'
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
};
|
|
@@ -1,9 +1,3 @@
|
|
|
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 _AadGroupListCommand_instances, _AadGroupListCommand_initTelemetry, _AadGroupListCommand_initOptions;
|
|
7
1
|
import { Cli } from '../../../../cli/Cli.js';
|
|
8
2
|
import { odata } from '../../../../utils/odata.js';
|
|
9
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -15,19 +9,12 @@ class AadGroupListCommand extends GraphCommand {
|
|
|
15
9
|
get description() {
|
|
16
10
|
return 'Lists all groups defined in Azure Active Directory.';
|
|
17
11
|
}
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
_AadGroupListCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _AadGroupListCommand_instances, "m", _AadGroupListCommand_initTelemetry).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _AadGroupListCommand_instances, "m", _AadGroupListCommand_initOptions).call(this);
|
|
23
|
-
}
|
|
24
12
|
defaultProperties() {
|
|
25
13
|
return ['id', 'displayName', 'groupType'];
|
|
26
14
|
}
|
|
27
15
|
async commandAction(logger, args) {
|
|
28
|
-
const endpoint = args.options.deleted ? 'directory/deletedItems/microsoft.graph.group' : 'groups';
|
|
29
16
|
try {
|
|
30
|
-
const groups = await odata.getAllItems(`${this.resource}/v1.0
|
|
17
|
+
const groups = await odata.getAllItems(`${this.resource}/v1.0/groups`);
|
|
31
18
|
if (Cli.shouldTrimOutput(args.options.output)) {
|
|
32
19
|
groups.forEach((group) => {
|
|
33
20
|
if (group.groupTypes && group.groupTypes.length > 0 && group.groupTypes[0] === 'Unified') {
|
|
@@ -51,14 +38,5 @@ class AadGroupListCommand extends GraphCommand {
|
|
|
51
38
|
}
|
|
52
39
|
}
|
|
53
40
|
}
|
|
54
|
-
_AadGroupListCommand_instances = new WeakSet(), _AadGroupListCommand_initTelemetry = function _AadGroupListCommand_initTelemetry() {
|
|
55
|
-
this.telemetry.push((args) => {
|
|
56
|
-
Object.assign(this.telemetryProperties, {
|
|
57
|
-
deleted: args.options.deleted
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}, _AadGroupListCommand_initOptions = function _AadGroupListCommand_initOptions() {
|
|
61
|
-
this.options.unshift({ option: '-d, --deleted' });
|
|
62
|
-
};
|
|
63
41
|
export default new AadGroupListCommand();
|
|
64
42
|
//# sourceMappingURL=group-list.js.map
|
|
@@ -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 _AadPolicyListCommand_instances, _AadPolicyListCommand_initTelemetry, _AadPolicyListCommand_initOptions, _AadPolicyListCommand_initValidators;
|
|
6
|
+
var _AadPolicyListCommand_instances, _a, _AadPolicyListCommand_initTelemetry, _AadPolicyListCommand_initOptions, _AadPolicyListCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
@@ -73,7 +73,7 @@ class AadPolicyListCommand extends GraphCommand {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
_AadPolicyListCommand_instances = new WeakSet(), _AadPolicyListCommand_initTelemetry = function _AadPolicyListCommand_initTelemetry() {
|
|
76
|
+
_a = AadPolicyListCommand, _AadPolicyListCommand_instances = new WeakSet(), _AadPolicyListCommand_initTelemetry = function _AadPolicyListCommand_initTelemetry() {
|
|
77
77
|
this.telemetry.push((args) => {
|
|
78
78
|
Object.assign(this.telemetryProperties, {
|
|
79
79
|
policyType: args.options.type || 'all'
|
|
@@ -82,14 +82,14 @@ _AadPolicyListCommand_instances = new WeakSet(), _AadPolicyListCommand_initTelem
|
|
|
82
82
|
}, _AadPolicyListCommand_initOptions = function _AadPolicyListCommand_initOptions() {
|
|
83
83
|
this.options.unshift({
|
|
84
84
|
option: '-t, --type [type]',
|
|
85
|
-
autocomplete:
|
|
85
|
+
autocomplete: _a.supportedPolicyTypes
|
|
86
86
|
});
|
|
87
87
|
}, _AadPolicyListCommand_initValidators = function _AadPolicyListCommand_initValidators() {
|
|
88
88
|
this.validators.push(async (args) => {
|
|
89
89
|
if (args.options.type) {
|
|
90
90
|
const policyType = args.options.type.toLowerCase();
|
|
91
|
-
if (!
|
|
92
|
-
return `${args.options.type} is not a valid type. Allowed values are ${
|
|
91
|
+
if (!_a.supportedPolicyTypes.find(p => p.toLowerCase() === policyType)) {
|
|
92
|
+
return `${args.options.type} is not a valid type. Allowed values are ${_a.supportedPolicyTypes.join(', ')}`;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
return true;
|
|
@@ -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 _CliIssueCommand_instances, _CliIssueCommand_initTelemetry, _CliIssueCommand_initOptions, _CliIssueCommand_initValidators;
|
|
6
|
+
var _CliIssueCommand_instances, _a, _CliIssueCommand_initTelemetry, _CliIssueCommand_initOptions, _CliIssueCommand_initValidators;
|
|
7
7
|
import { browserUtil } from '../../../utils/browserUtil.js';
|
|
8
8
|
import AnonymousCommand from '../../base/AnonymousCommand.js';
|
|
9
9
|
import commands from '../commands.js';
|
|
@@ -38,7 +38,7 @@ class CliIssueCommand extends AnonymousCommand {
|
|
|
38
38
|
await logger.log(issueLink);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
_CliIssueCommand_instances = new WeakSet(), _CliIssueCommand_initTelemetry = function _CliIssueCommand_initTelemetry() {
|
|
41
|
+
_a = CliIssueCommand, _CliIssueCommand_instances = new WeakSet(), _CliIssueCommand_initTelemetry = function _CliIssueCommand_initTelemetry() {
|
|
42
42
|
this.telemetry.push((args) => {
|
|
43
43
|
Object.assign(this.telemetryProperties, {
|
|
44
44
|
type: args.options.type
|
|
@@ -47,12 +47,12 @@ _CliIssueCommand_instances = new WeakSet(), _CliIssueCommand_initTelemetry = fun
|
|
|
47
47
|
}, _CliIssueCommand_initOptions = function _CliIssueCommand_initOptions() {
|
|
48
48
|
this.options.unshift({
|
|
49
49
|
option: '-t, --type <type>',
|
|
50
|
-
autocomplete:
|
|
50
|
+
autocomplete: _a.issueType
|
|
51
51
|
});
|
|
52
52
|
}, _CliIssueCommand_initValidators = function _CliIssueCommand_initValidators() {
|
|
53
53
|
this.validators.push(async (args) => {
|
|
54
|
-
if (
|
|
55
|
-
return `${args.options.type} is not a valid Issue type. Allowed values are ${
|
|
54
|
+
if (_a.issueType.indexOf(args.options.type) < 0) {
|
|
55
|
+
return `${args.options.type} is not a valid Issue type. Allowed values are ${_a.issueType.join(', ')}`;
|
|
56
56
|
}
|
|
57
57
|
return true;
|
|
58
58
|
});
|
|
@@ -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 _CliConfigGetCommand_instances, _CliConfigGetCommand_initTelemetry, _CliConfigGetCommand_initOptions, _CliConfigGetCommand_initValidators;
|
|
6
|
+
var _CliConfigGetCommand_instances, _a, _CliConfigGetCommand_initTelemetry, _CliConfigGetCommand_initOptions, _CliConfigGetCommand_initValidators;
|
|
7
7
|
import { Cli } from "../../../../cli/Cli.js";
|
|
8
8
|
import { settingsNames } from "../../../../settingsNames.js";
|
|
9
9
|
import AnonymousCommand from "../../../base/AnonymousCommand.js";
|
|
@@ -26,7 +26,7 @@ class CliConfigGetCommand extends AnonymousCommand {
|
|
|
26
26
|
await logger.log(Cli.getInstance().config.get(args.options.key));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
_CliConfigGetCommand_instances = new WeakSet(), _CliConfigGetCommand_initTelemetry = function _CliConfigGetCommand_initTelemetry() {
|
|
29
|
+
_a = CliConfigGetCommand, _CliConfigGetCommand_instances = new WeakSet(), _CliConfigGetCommand_initTelemetry = function _CliConfigGetCommand_initTelemetry() {
|
|
30
30
|
this.telemetry.push((args) => {
|
|
31
31
|
Object.assign(this.telemetryProperties, {
|
|
32
32
|
key: args.options.key
|
|
@@ -35,12 +35,12 @@ _CliConfigGetCommand_instances = new WeakSet(), _CliConfigGetCommand_initTelemet
|
|
|
35
35
|
}, _CliConfigGetCommand_initOptions = function _CliConfigGetCommand_initOptions() {
|
|
36
36
|
this.options.unshift({
|
|
37
37
|
option: '-k, --key <key>',
|
|
38
|
-
autocomplete:
|
|
38
|
+
autocomplete: _a.optionNames
|
|
39
39
|
});
|
|
40
40
|
}, _CliConfigGetCommand_initValidators = function _CliConfigGetCommand_initValidators() {
|
|
41
41
|
this.validators.push(async (args) => {
|
|
42
|
-
if (
|
|
43
|
-
return `${args.options.key} is not a valid setting. Allowed values: ${
|
|
42
|
+
if (_a.optionNames.indexOf(args.options.key) < 0) {
|
|
43
|
+
return `${args.options.key} is not a valid setting. Allowed values: ${_a.optionNames.join(', ')}`;
|
|
44
44
|
}
|
|
45
45
|
return true;
|
|
46
46
|
});
|
|
@@ -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 _CliConfigResetCommand_instances, _CliConfigResetCommand_initTelemetry, _CliConfigResetCommand_initOptions, _CliConfigResetCommand_initValidators;
|
|
6
|
+
var _CliConfigResetCommand_instances, _a, _CliConfigResetCommand_initTelemetry, _CliConfigResetCommand_initOptions, _CliConfigResetCommand_initValidators;
|
|
7
7
|
import { Cli } from "../../../../cli/Cli.js";
|
|
8
8
|
import { settingsNames } from "../../../../settingsNames.js";
|
|
9
9
|
import AnonymousCommand from "../../../base/AnonymousCommand.js";
|
|
@@ -31,7 +31,7 @@ class CliConfigResetCommand extends AnonymousCommand {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
_CliConfigResetCommand_instances = new WeakSet(), _CliConfigResetCommand_initTelemetry = function _CliConfigResetCommand_initTelemetry() {
|
|
34
|
+
_a = CliConfigResetCommand, _CliConfigResetCommand_instances = new WeakSet(), _CliConfigResetCommand_initTelemetry = function _CliConfigResetCommand_initTelemetry() {
|
|
35
35
|
this.telemetry.push((args) => {
|
|
36
36
|
Object.assign(this.telemetryProperties, {
|
|
37
37
|
key: args.options.key
|
|
@@ -40,13 +40,13 @@ _CliConfigResetCommand_instances = new WeakSet(), _CliConfigResetCommand_initTel
|
|
|
40
40
|
}, _CliConfigResetCommand_initOptions = function _CliConfigResetCommand_initOptions() {
|
|
41
41
|
this.options.unshift({
|
|
42
42
|
option: '-k, --key [key]',
|
|
43
|
-
autocomplete:
|
|
43
|
+
autocomplete: _a.optionNames
|
|
44
44
|
});
|
|
45
45
|
}, _CliConfigResetCommand_initValidators = function _CliConfigResetCommand_initValidators() {
|
|
46
46
|
this.validators.push(async (args) => {
|
|
47
47
|
if (args.options.key) {
|
|
48
|
-
if (
|
|
49
|
-
return `${args.options.key} is not a valid setting. Allowed values: ${
|
|
48
|
+
if (_a.optionNames.indexOf(args.options.key) < 0) {
|
|
49
|
+
return `${args.options.key} is not a valid setting. Allowed values: ${_a.optionNames.join(', ')}`;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return true;
|
|
@@ -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 _CliConfigSetCommand_instances, _CliConfigSetCommand_initTelemetry, _CliConfigSetCommand_initOptions, _CliConfigSetCommand_initValidators;
|
|
6
|
+
var _CliConfigSetCommand_instances, _a, _CliConfigSetCommand_initTelemetry, _CliConfigSetCommand_initOptions, _CliConfigSetCommand_initValidators;
|
|
7
7
|
import { Cli } from "../../../../cli/Cli.js";
|
|
8
8
|
import { settingsNames } from "../../../../settingsNames.js";
|
|
9
9
|
import AnonymousCommand from "../../../base/AnonymousCommand.js";
|
|
@@ -44,21 +44,21 @@ class CliConfigSetCommand extends AnonymousCommand {
|
|
|
44
44
|
Cli.getInstance().config.set(args.options.key, value);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
_CliConfigSetCommand_instances = new WeakSet(), _CliConfigSetCommand_initTelemetry = function _CliConfigSetCommand_initTelemetry() {
|
|
47
|
+
_a = CliConfigSetCommand, _CliConfigSetCommand_instances = new WeakSet(), _CliConfigSetCommand_initTelemetry = function _CliConfigSetCommand_initTelemetry() {
|
|
48
48
|
this.telemetry.push((args) => {
|
|
49
49
|
this.telemetryProperties[args.options.key] = args.options.value;
|
|
50
50
|
});
|
|
51
51
|
}, _CliConfigSetCommand_initOptions = function _CliConfigSetCommand_initOptions() {
|
|
52
52
|
this.options.unshift({
|
|
53
53
|
option: '-k, --key <key>',
|
|
54
|
-
autocomplete:
|
|
54
|
+
autocomplete: _a.optionNames
|
|
55
55
|
}, {
|
|
56
56
|
option: '-v, --value <value>'
|
|
57
57
|
});
|
|
58
58
|
}, _CliConfigSetCommand_initValidators = function _CliConfigSetCommand_initValidators() {
|
|
59
59
|
this.validators.push(async (args) => {
|
|
60
|
-
if (
|
|
61
|
-
return `${args.options.key} is not a valid setting. Allowed values: ${
|
|
60
|
+
if (_a.optionNames.indexOf(args.options.key) < 0) {
|
|
61
|
+
return `${args.options.key} is not a valid setting. Allowed values: ${_a.optionNames.join(', ')}`;
|
|
62
62
|
}
|
|
63
63
|
const allowedOutputs = ['text', 'json', 'csv', 'md', 'none'];
|
|
64
64
|
if (args.options.key === settingsNames.output &&
|
|
@@ -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 _LoginCommand_instances, _LoginCommand_initTelemetry, _LoginCommand_initOptions, _LoginCommand_initValidators;
|
|
6
|
+
var _LoginCommand_instances, _a, _LoginCommand_initTelemetry, _LoginCommand_initOptions, _LoginCommand_initValidators;
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import auth, { AuthType, CloudType } from '../../Auth.js';
|
|
9
9
|
import Command, { CommandError } from '../../Command.js';
|
|
@@ -123,7 +123,7 @@ class LoginCommand extends Command {
|
|
|
123
123
|
await this.commandAction(logger, args);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
_LoginCommand_instances = new WeakSet(), _LoginCommand_initTelemetry = function _LoginCommand_initTelemetry() {
|
|
126
|
+
_a = LoginCommand, _LoginCommand_instances = new WeakSet(), _LoginCommand_initTelemetry = function _LoginCommand_initTelemetry() {
|
|
127
127
|
this.telemetry.push((args) => {
|
|
128
128
|
Object.assign(this.telemetryProperties, {
|
|
129
129
|
authType: args.options.authType || 'deviceCode',
|
|
@@ -133,7 +133,7 @@ _LoginCommand_instances = new WeakSet(), _LoginCommand_initTelemetry = function
|
|
|
133
133
|
}, _LoginCommand_initOptions = function _LoginCommand_initOptions() {
|
|
134
134
|
this.options.unshift({
|
|
135
135
|
option: '-t, --authType [authType]',
|
|
136
|
-
autocomplete:
|
|
136
|
+
autocomplete: _a.allowedAuthTypes
|
|
137
137
|
}, {
|
|
138
138
|
option: '-u, --userName [userName]'
|
|
139
139
|
}, {
|
|
@@ -178,8 +178,8 @@ _LoginCommand_instances = new WeakSet(), _LoginCommand_initTelemetry = function
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
if (args.options.authType &&
|
|
181
|
-
|
|
182
|
-
return `'${args.options.authType}' is not a valid authentication type. Allowed authentication types are ${
|
|
181
|
+
_a.allowedAuthTypes.indexOf(args.options.authType) < 0) {
|
|
182
|
+
return `'${args.options.authType}' is not a valid authentication type. Allowed authentication types are ${_a.allowedAuthTypes.join(', ')}`;
|
|
183
183
|
}
|
|
184
184
|
if (args.options.authType === 'secret') {
|
|
185
185
|
if (!args.options.secret) {
|
|
@@ -6,10 +6,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _RequestCommand_instances, _RequestCommand_initTelemetry, _RequestCommand_initOptions, _RequestCommand_initValidators;
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
import path from 'path';
|
|
9
|
+
import auth from '../../Auth.js';
|
|
9
10
|
import Command from '../../Command.js';
|
|
10
11
|
import request from '../../request.js';
|
|
11
12
|
import commands from './commands.js';
|
|
12
|
-
import auth from '../../Auth.js';
|
|
13
13
|
class RequestCommand extends Command {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.REQUEST;
|
|
@@ -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 _FlowOwnerEnsureCommand_instances, _FlowOwnerEnsureCommand_initTelemetry, _FlowOwnerEnsureCommand_initOptions, _FlowOwnerEnsureCommand_initOptionSets, _FlowOwnerEnsureCommand_initValidators;
|
|
6
|
+
var _FlowOwnerEnsureCommand_instances, _a, _FlowOwnerEnsureCommand_initTelemetry, _FlowOwnerEnsureCommand_initOptions, _FlowOwnerEnsureCommand_initOptionSets, _FlowOwnerEnsureCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
9
9
|
import { aadUser } from '../../../../utils/aadUser.js';
|
|
@@ -78,7 +78,7 @@ class FlowOwnerEnsureCommand extends AzmgmtCommand {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
_FlowOwnerEnsureCommand_instances = new WeakSet(), _FlowOwnerEnsureCommand_initTelemetry = function _FlowOwnerEnsureCommand_initTelemetry() {
|
|
81
|
+
_a = FlowOwnerEnsureCommand, _FlowOwnerEnsureCommand_instances = new WeakSet(), _FlowOwnerEnsureCommand_initTelemetry = function _FlowOwnerEnsureCommand_initTelemetry() {
|
|
82
82
|
this.telemetry.push((args) => {
|
|
83
83
|
Object.assign(this.telemetryProperties, {
|
|
84
84
|
asAdmin: !!args.options.asAdmin,
|
|
@@ -103,7 +103,7 @@ _FlowOwnerEnsureCommand_instances = new WeakSet(), _FlowOwnerEnsureCommand_initT
|
|
|
103
103
|
option: '--groupName [groupName]'
|
|
104
104
|
}, {
|
|
105
105
|
option: '--roleName <roleName>',
|
|
106
|
-
autocomplete:
|
|
106
|
+
autocomplete: _a.allowedRoleNames
|
|
107
107
|
}, {
|
|
108
108
|
option: '--asAdmin'
|
|
109
109
|
});
|
|
@@ -123,8 +123,8 @@ _FlowOwnerEnsureCommand_instances = new WeakSet(), _FlowOwnerEnsureCommand_initT
|
|
|
123
123
|
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
124
124
|
return `${args.options.groupId} is not a valid GUID.`;
|
|
125
125
|
}
|
|
126
|
-
if (
|
|
127
|
-
return `${args.options.roleName} is not a valid roleName. Valid values are: ${
|
|
126
|
+
if (_a.allowedRoleNames.indexOf(args.options.roleName) === -1) {
|
|
127
|
+
return `${args.options.roleName} is not a valid roleName. Valid values are: ${_a.allowedRoleNames.join(', ')}`;
|
|
128
128
|
}
|
|
129
129
|
return true;
|
|
130
130
|
});
|
|
@@ -69,7 +69,7 @@ class PaAppExportCommand extends PowerPlatformCommand {
|
|
|
69
69
|
},
|
|
70
70
|
data: {
|
|
71
71
|
baseResourceIds: [
|
|
72
|
-
`/providers/Microsoft.PowerApps/apps/${args.options.
|
|
72
|
+
`/providers/Microsoft.PowerApps/apps/${args.options.name}`
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
75
|
responseType: 'json'
|
|
@@ -82,7 +82,7 @@ class PaAppExportCommand extends PowerPlatformCommand {
|
|
|
82
82
|
}
|
|
83
83
|
async exportPackage(args, logger) {
|
|
84
84
|
if (this.verbose) {
|
|
85
|
-
await logger.logToStderr(`Initiating package export for Microsoft Power App ${args.options.
|
|
85
|
+
await logger.logToStderr(`Initiating package export for Microsoft Power App ${args.options.name}...`);
|
|
86
86
|
}
|
|
87
87
|
const resources = await this.getPackageResources(args, logger);
|
|
88
88
|
const requestOptions = {
|
|
@@ -93,7 +93,7 @@ class PaAppExportCommand extends PowerPlatformCommand {
|
|
|
93
93
|
responseType: 'json',
|
|
94
94
|
data: {
|
|
95
95
|
includedResourceIds: [
|
|
96
|
-
`/providers/Microsoft.PowerApps/apps/${args.options.
|
|
96
|
+
`/providers/Microsoft.PowerApps/apps/${args.options.name}`
|
|
97
97
|
],
|
|
98
98
|
details: {
|
|
99
99
|
creator: args.options.packageCreatedBy,
|
|
@@ -148,11 +148,11 @@ _PaAppExportCommand_instances = new WeakSet(), _PaAppExportCommand_initTelemetry
|
|
|
148
148
|
});
|
|
149
149
|
}, _PaAppExportCommand_initOptions = function _PaAppExportCommand_initOptions() {
|
|
150
150
|
this.options.unshift({
|
|
151
|
-
option: '-
|
|
151
|
+
option: '-n, --name <name>'
|
|
152
152
|
}, {
|
|
153
153
|
option: '-e, --environmentName <environmentName>'
|
|
154
154
|
}, {
|
|
155
|
-
option: '
|
|
155
|
+
option: '--packageDisplayName [packageDisplayName]'
|
|
156
156
|
}, {
|
|
157
157
|
option: '-d, --packageDescription [packageDescription]'
|
|
158
158
|
}, {
|
|
@@ -164,8 +164,8 @@ _PaAppExportCommand_instances = new WeakSet(), _PaAppExportCommand_initTelemetry
|
|
|
164
164
|
});
|
|
165
165
|
}, _PaAppExportCommand_initValidators = function _PaAppExportCommand_initValidators() {
|
|
166
166
|
this.validators.push(async (args) => {
|
|
167
|
-
if (
|
|
168
|
-
return `${args.options.
|
|
167
|
+
if (!validation.isValidGuid(args.options.name)) {
|
|
168
|
+
return `${args.options.name} is not a valid GUID for option name`;
|
|
169
169
|
}
|
|
170
170
|
if (args.options.path && !fs.existsSync(path.dirname(args.options.path))) {
|
|
171
171
|
return 'Specified path where to save the file does not exist';
|
|
@@ -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 _PaAppOwnerSetCommand_instances, _PaAppOwnerSetCommand_initTelemetry, _PaAppOwnerSetCommand_initOptions, _PaAppOwnerSetCommand_initValidators, _PaAppOwnerSetCommand_initOptionSets;
|
|
6
|
+
var _PaAppOwnerSetCommand_instances, _a, _PaAppOwnerSetCommand_initTelemetry, _PaAppOwnerSetCommand_initOptions, _PaAppOwnerSetCommand_initValidators, _PaAppOwnerSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { aadUser } from '../../../../utils/aadUser.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -55,7 +55,7 @@ class PaAppOwnerSetCommand extends PowerAppsCommand {
|
|
|
55
55
|
return aadUser.getUserIdByUpn(options.userName);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
_PaAppOwnerSetCommand_instances = new WeakSet(), _PaAppOwnerSetCommand_initTelemetry = function _PaAppOwnerSetCommand_initTelemetry() {
|
|
58
|
+
_a = PaAppOwnerSetCommand, _PaAppOwnerSetCommand_instances = new WeakSet(), _PaAppOwnerSetCommand_initTelemetry = function _PaAppOwnerSetCommand_initTelemetry() {
|
|
59
59
|
this.telemetry.push((args) => {
|
|
60
60
|
Object.assign(this.telemetryProperties, {
|
|
61
61
|
userId: typeof args.options.userId !== 'undefined',
|
|
@@ -74,7 +74,7 @@ _PaAppOwnerSetCommand_instances = new WeakSet(), _PaAppOwnerSetCommand_initTelem
|
|
|
74
74
|
option: '--userName [userName]'
|
|
75
75
|
}, {
|
|
76
76
|
option: '--roleForOldAppOwner [roleForOldAppOwner]',
|
|
77
|
-
autocomplete:
|
|
77
|
+
autocomplete: _a.roleForOldAppOwner
|
|
78
78
|
});
|
|
79
79
|
}, _PaAppOwnerSetCommand_initValidators = function _PaAppOwnerSetCommand_initValidators() {
|
|
80
80
|
this.validators.push(async (args) => {
|
|
@@ -87,8 +87,8 @@ _PaAppOwnerSetCommand_instances = new WeakSet(), _PaAppOwnerSetCommand_initTelem
|
|
|
87
87
|
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
88
88
|
return `${args.options.userName} is not a valid UPN for userName`;
|
|
89
89
|
}
|
|
90
|
-
if (args.options.roleForOldAppOwner &&
|
|
91
|
-
return `${args.options.roleForOldAppOwner} is not a valid roleForOldAppOwner. Allowed values are: ${
|
|
90
|
+
if (args.options.roleForOldAppOwner && _a.roleForOldAppOwner.indexOf(args.options.roleForOldAppOwner) < 0) {
|
|
91
|
+
return `${args.options.roleForOldAppOwner} is not a valid roleForOldAppOwner. Allowed values are: ${_a.roleForOldAppOwner.join(', ')}`;
|
|
92
92
|
}
|
|
93
93
|
return true;
|
|
94
94
|
});
|
|
@@ -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 _PaAppPermissionEnsureCommand_instances, _PaAppPermissionEnsureCommand_initTelemetry, _PaAppPermissionEnsureCommand_initOptions, _PaAppPermissionEnsureCommand_initValidators, _PaAppPermissionEnsureCommand_initOptionSets, _PaAppPermissionEnsureCommand_initTypes;
|
|
6
|
+
var _PaAppPermissionEnsureCommand_instances, _a, _PaAppPermissionEnsureCommand_initTelemetry, _PaAppPermissionEnsureCommand_initOptions, _PaAppPermissionEnsureCommand_initValidators, _PaAppPermissionEnsureCommand_initOptionSets, _PaAppPermissionEnsureCommand_initTypes;
|
|
7
7
|
import Auth from '../../../../Auth.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
@@ -88,7 +88,7 @@ class PaAppPermissionEnsureCommand extends PowerAppsCommand {
|
|
|
88
88
|
return accessToken.getTenantIdFromAccessToken(Auth.service.accessTokens[Auth.defaultResource].accessToken);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
_PaAppPermissionEnsureCommand_instances = new WeakSet(), _PaAppPermissionEnsureCommand_initTelemetry = function _PaAppPermissionEnsureCommand_initTelemetry() {
|
|
91
|
+
_a = PaAppPermissionEnsureCommand, _PaAppPermissionEnsureCommand_instances = new WeakSet(), _PaAppPermissionEnsureCommand_initTelemetry = function _PaAppPermissionEnsureCommand_initTelemetry() {
|
|
92
92
|
this.telemetry.push((args) => {
|
|
93
93
|
Object.assign(this.telemetryProperties, {
|
|
94
94
|
userId: typeof args.options.userId !== 'undefined',
|
|
@@ -106,7 +106,7 @@ _PaAppPermissionEnsureCommand_instances = new WeakSet(), _PaAppPermissionEnsureC
|
|
|
106
106
|
option: '--appName <appName>'
|
|
107
107
|
}, {
|
|
108
108
|
option: '--roleName <roleName>',
|
|
109
|
-
autocomplete:
|
|
109
|
+
autocomplete: _a.roleNames
|
|
110
110
|
}, {
|
|
111
111
|
option: '--userId [userId]'
|
|
112
112
|
}, {
|
|
@@ -138,8 +138,8 @@ _PaAppPermissionEnsureCommand_instances = new WeakSet(), _PaAppPermissionEnsureC
|
|
|
138
138
|
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
139
139
|
return `${args.options.userName} is not a valid user principal name (UPN) for userName.`;
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
142
|
-
return `${args.options.roleName} is not a valid roleName. Allowed values are: ${
|
|
141
|
+
if (_a.roleNames.indexOf(args.options.roleName) < 0) {
|
|
142
|
+
return `${args.options.roleName} is not a valid roleName. Allowed values are: ${_a.roleNames.join(', ')}.`;
|
|
143
143
|
}
|
|
144
144
|
if (args.options.environmentName && !args.options.asAdmin) {
|
|
145
145
|
return 'Specifying environmentName is only allowed when using asAdmin.';
|