@pnp/cli-microsoft365 7.0.0-beta.99e75a7 → 7.0.0-beta.aa2d71e
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/cli/Cli.js +19 -2
- 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/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-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/{doctor-1.18.0-beta.1.js → doctor-1.18.0-beta.5.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +9 -9
- 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/upgrade-1.15.2.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0-beta.5.js} +26 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +14 -14
- package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +27 -26
- package/dist/m365/spo/commands/app/app-add.js +9 -9
- 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-move.js +73 -97
- 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/folder/folder-copy.js +89 -45
- package/dist/m365/spo/commands/folder/folder-move.js +89 -47
- 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/orgassetslibrary/orgassetslibrary-add.js +34 -5
- package/dist/m365/spo/commands/page/clientsidepages.js +1 -81
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +63 -59
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +28 -31
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +30 -32
- package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
- 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 +14 -67
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +22 -22
- package/dist/m365/spo/commands/site/site-list.js +27 -43
- 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 +177 -198
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -8
- 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/theme/theme-remove.js +24 -24
- package/dist/m365/spo/commands/theme/theme-set.js +0 -1
- package/dist/m365/spo/commands/user/user-remove.js +27 -27
- package/dist/m365/spo/commands/web/web-reindex.js +35 -42
- package/dist/m365/spo/commands/web/web-remove.js +21 -21
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -31
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +33 -44
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +18 -18
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +19 -19
- 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-like-set.js +27 -28
- package/dist/m365/yammer/commands/message/message-list.js +67 -86
- package/dist/m365/yammer/commands/message/message-remove.js +18 -18
- package/dist/m365/yammer/commands/yammer-search.js +58 -74
- package/dist/utils/aadGroup.js +18 -0
- package/dist/utils/fsUtil.js +5 -0
- package/dist/utils/spo.js +594 -53
- package/dist/utils/validation.js +0 -3
- 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/file/file-move.mdx +36 -18
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
- package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
- package/npm-shrinkwrap.json +240 -1417
- package/package.json +6 -7
- 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
|
package/dist/cli/Cli.js
CHANGED
|
@@ -761,8 +761,9 @@ export class Cli {
|
|
|
761
761
|
}
|
|
762
762
|
static log(message, ...optionalParams) {
|
|
763
763
|
const cli = Cli.getInstance();
|
|
764
|
+
const spinnerSpinning = cli.spinner.isSpinning;
|
|
764
765
|
/* c8 ignore next 3 */
|
|
765
|
-
if (
|
|
766
|
+
if (spinnerSpinning) {
|
|
766
767
|
cli.spinner.stop();
|
|
767
768
|
}
|
|
768
769
|
if (message) {
|
|
@@ -771,15 +772,31 @@ export class Cli {
|
|
|
771
772
|
else {
|
|
772
773
|
console.log();
|
|
773
774
|
}
|
|
775
|
+
// Restart the spinner if it was running before the log
|
|
776
|
+
/* c8 ignore next 3 */
|
|
777
|
+
if (spinnerSpinning) {
|
|
778
|
+
cli.spinner.start();
|
|
779
|
+
}
|
|
774
780
|
}
|
|
775
781
|
static async error(message, ...optionalParams) {
|
|
776
|
-
const
|
|
782
|
+
const cli = Cli.getInstance();
|
|
783
|
+
const spinnerSpinning = cli.spinner.isSpinning;
|
|
784
|
+
/* c8 ignore next 3 */
|
|
785
|
+
if (spinnerSpinning) {
|
|
786
|
+
cli.spinner.stop();
|
|
787
|
+
}
|
|
788
|
+
const errorOutput = cli.getSettingWithDefaultValue(settingsNames.errorOutput, 'stderr');
|
|
777
789
|
if (errorOutput === 'stdout') {
|
|
778
790
|
console.log(message, ...optionalParams);
|
|
779
791
|
}
|
|
780
792
|
else {
|
|
781
793
|
console.error(message, ...optionalParams);
|
|
782
794
|
}
|
|
795
|
+
// Restart the spinner if it was running before the log
|
|
796
|
+
/* c8 ignore next 3 */
|
|
797
|
+
if (spinnerSpinning) {
|
|
798
|
+
cli.spinner.start();
|
|
799
|
+
}
|
|
783
800
|
}
|
|
784
801
|
static async prompt(options, answers) {
|
|
785
802
|
const inquirer = await import('inquirer');
|
|
@@ -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
|
});
|
|
@@ -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
|
});
|
|
@@ -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.';
|
package/dist/m365/pa/commands.js
CHANGED
|
@@ -12,9 +12,6 @@ export default {
|
|
|
12
12
|
CONNECTOR_EXPORT: `${prefix} connector export`,
|
|
13
13
|
CONNECTOR_LIST: `${prefix} connector list`,
|
|
14
14
|
ENVIRONMENT_GET: `${prefix} environment get`,
|
|
15
|
-
ENVIRONMENT_LIST: `${prefix} environment list
|
|
16
|
-
PCF_INIT: `${prefix} pcf init`,
|
|
17
|
-
SOLUTION_INIT: `${prefix} solution init`,
|
|
18
|
-
SOLUTION_REFERENCE_ADD: `${prefix} solution reference add`
|
|
15
|
+
ENVIRONMENT_LIST: `${prefix} environment list`
|
|
19
16
|
};
|
|
20
17
|
//# sourceMappingURL=commands.js.map
|
|
@@ -141,9 +141,15 @@ class PlannerTaskAddCommand extends GraphCommand {
|
|
|
141
141
|
if (args.options.planId) {
|
|
142
142
|
return args.options.planId;
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
if (args.options.rosterId) {
|
|
145
|
+
const plan = await planner.getPlanByRosterId(args.options.rosterId);
|
|
146
|
+
return plan.id;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
const groupId = await this.getGroupId(args);
|
|
150
|
+
const plan = await planner.getPlanByTitle(args.options.planTitle, groupId);
|
|
151
|
+
return plan.id;
|
|
152
|
+
}
|
|
147
153
|
}
|
|
148
154
|
async getGroupId(args) {
|
|
149
155
|
if (args.options.ownerGroupId) {
|
|
@@ -187,6 +193,7 @@ _PlannerTaskAddCommand_instances = new WeakSet(), _PlannerTaskAddCommand_initTel
|
|
|
187
193
|
Object.assign(this.telemetryProperties, {
|
|
188
194
|
planId: typeof args.options.planId !== 'undefined',
|
|
189
195
|
planTitle: typeof args.options.planTitle !== 'undefined',
|
|
196
|
+
rosterId: typeof args.options.rosterId !== 'undefined',
|
|
190
197
|
ownerGroupId: typeof args.options.ownerGroupId !== 'undefined',
|
|
191
198
|
ownerGroupName: typeof args.options.ownerGroupName !== 'undefined',
|
|
192
199
|
bucketId: typeof args.options.bucketId !== 'undefined',
|
|
@@ -205,7 +212,7 @@ _PlannerTaskAddCommand_instances = new WeakSet(), _PlannerTaskAddCommand_initTel
|
|
|
205
212
|
});
|
|
206
213
|
});
|
|
207
214
|
}, _PlannerTaskAddCommand_initOptions = function _PlannerTaskAddCommand_initOptions() {
|
|
208
|
-
this.options.unshift({ option: '-t, --title <title>' }, { option: '--planId [planId]' }, { option: '--planTitle [planTitle]' }, { option: '--ownerGroupId [ownerGroupId]' }, { option: '--ownerGroupName [ownerGroupName]' }, { option: '--bucketId [bucketId]' }, { option: '--bucketName [bucketName]' }, { option: '--startDateTime [startDateTime]' }, { option: '--dueDateTime [dueDateTime]' }, { option: '--percentComplete [percentComplete]' }, { option: '--assignedToUserIds [assignedToUserIds]' }, { option: '--assignedToUserNames [assignedToUserNames]' }, { option: '--assigneePriority [assigneePriority]' }, { option: '--description [description]' }, {
|
|
215
|
+
this.options.unshift({ option: '-t, --title <title>' }, { option: '--planId [planId]' }, { option: '--planTitle [planTitle]' }, { option: '--rosterId [rosterId]' }, { option: '--ownerGroupId [ownerGroupId]' }, { option: '--ownerGroupName [ownerGroupName]' }, { option: '--bucketId [bucketId]' }, { option: '--bucketName [bucketName]' }, { option: '--startDateTime [startDateTime]' }, { option: '--dueDateTime [dueDateTime]' }, { option: '--percentComplete [percentComplete]' }, { option: '--assignedToUserIds [assignedToUserIds]' }, { option: '--assignedToUserNames [assignedToUserNames]' }, { option: '--assigneePriority [assigneePriority]' }, { option: '--description [description]' }, {
|
|
209
216
|
option: '--appliedCategories [appliedCategories]',
|
|
210
217
|
autocomplete: this.allowedAppliedCategories
|
|
211
218
|
}, {
|
|
@@ -214,12 +221,6 @@ _PlannerTaskAddCommand_instances = new WeakSet(), _PlannerTaskAddCommand_initTel
|
|
|
214
221
|
}, { option: '--orderHint [orderHint]' }, { option: '--priority [priority]', autocomplete: taskPriority.priorityValues });
|
|
215
222
|
}, _PlannerTaskAddCommand_initValidators = function _PlannerTaskAddCommand_initValidators() {
|
|
216
223
|
this.validators.push(async (args) => {
|
|
217
|
-
if (args.options.planTitle && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
218
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
219
|
-
}
|
|
220
|
-
if (args.options.planTitle && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
221
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
222
|
-
}
|
|
223
224
|
if (args.options.ownerGroupId && !validation.isValidGuid(args.options.ownerGroupId)) {
|
|
224
225
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
225
226
|
}
|
|
@@ -260,7 +261,12 @@ _PlannerTaskAddCommand_instances = new WeakSet(), _PlannerTaskAddCommand_initTel
|
|
|
260
261
|
return true;
|
|
261
262
|
});
|
|
262
263
|
}, _PlannerTaskAddCommand_initOptionSets = function _PlannerTaskAddCommand_initOptionSets() {
|
|
263
|
-
this.optionSets.push({ options: ['planId', 'planTitle'] }, { options: ['bucketId', 'bucketName'] }
|
|
264
|
+
this.optionSets.push({ options: ['planId', 'planTitle', 'rosterId'] }, { options: ['bucketId', 'bucketName'] }, {
|
|
265
|
+
options: ['ownerGroupId', 'ownerGroupName'],
|
|
266
|
+
runsWhen: (args) => {
|
|
267
|
+
return args.options.planTitle !== undefined;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
264
270
|
};
|
|
265
271
|
export default new PlannerTaskAddCommand();
|
|
266
272
|
//# sourceMappingURL=task-add.js.map
|