@pnp/cli-microsoft365 10.6.0-beta.add4854 → 10.7.0-beta.4bcc4fe

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.
Files changed (56) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +2 -1
  4. package/dist/Command.js +10 -0
  5. package/dist/auth/MsalNetworkClient.js +48 -0
  6. package/dist/config.js +1 -0
  7. package/dist/m365/app/commands/app-get.js +3 -13
  8. package/dist/m365/app/commands/permission/permission-list.js +4 -14
  9. package/dist/m365/entra/commands/app/app-get.js +27 -21
  10. package/dist/m365/entra/commands/app/app-permission-list.js +28 -22
  11. package/dist/m365/entra/commands/app/app-remove.js +22 -19
  12. package/dist/m365/entra/commands/app/app-role-add.js +22 -19
  13. package/dist/m365/entra/commands/app/app-role-list.js +22 -19
  14. package/dist/m365/entra/commands/app/app-role-remove.js +39 -36
  15. package/dist/m365/entra/commands/app/app-set.js +22 -19
  16. package/dist/m365/entra/commands/group/group-member-add.js +1 -1
  17. package/dist/m365/entra/commands/group/group-member-remove.js +197 -0
  18. package/dist/m365/entra/commands/policy/policy-list.js +46 -3
  19. package/dist/m365/entra/commands.js +1 -0
  20. package/dist/m365/flow/commands/flow-list.js +1 -1
  21. package/dist/m365/graph/commands/openextension/openextension-get.js +57 -0
  22. package/dist/m365/graph/commands/openextension/openextension-list.js +62 -0
  23. package/dist/m365/graph/commands/openextension/openextension-remove.js +68 -0
  24. package/dist/m365/graph/commands.js +3 -0
  25. package/dist/m365/pp/commands/card/card-clone.js +7 -1
  26. package/dist/m365/pp/commands/card/card-get.js +5 -2
  27. package/dist/m365/pp/commands/card/card-remove.js +7 -1
  28. package/dist/m365/pp/commands/solution/solution-get.js +5 -11
  29. package/dist/m365/pp/commands/solution/solution-publish.js +6 -16
  30. package/dist/m365/pp/commands/solution/solution-remove.js +4 -13
  31. package/dist/m365/spfx/commands/project/DeployWorkflow.js +9 -2
  32. package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +0 -19
  33. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.21.0.js +25 -0
  34. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.21.1.js +25 -0
  35. package/dist/m365/spfx/commands/project/project-doctor.js +3 -1
  36. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +0 -16
  37. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js +13 -0
  38. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.21.0.js +63 -0
  39. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.21.1.js +53 -0
  40. package/dist/m365/spfx/commands/project/project-upgrade.js +3 -1
  41. package/dist/m365/spfx/commands/spfx-doctor.js +30 -0
  42. package/dist/m365/util/commands/accesstoken/accesstoken-get.js +13 -3
  43. package/dist/utils/accessToken.js +8 -0
  44. package/dist/utils/powerPlatform.js +25 -4
  45. package/dist/utils/prompt.js +9 -2
  46. package/dist/utils/types.js +1 -0
  47. package/docs/docs/cmd/entra/group/group-member-add.mdx +1 -1
  48. package/docs/docs/cmd/entra/group/group-member-remove.mdx +96 -0
  49. package/docs/docs/cmd/entra/policy/policy-list.mdx +1 -1
  50. package/docs/docs/cmd/graph/openextension/openextension-get.mdx +111 -0
  51. package/docs/docs/cmd/graph/openextension/openextension-list.mdx +129 -0
  52. package/docs/docs/cmd/graph/openextension/openextension-remove.mdx +59 -0
  53. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -4
  54. package/docs/docs/cmd/util/accesstoken/accesstoken-get.mdx +72 -0
  55. package/npm-shrinkwrap.json +517 -481
  56. package/package.json +14 -14
@@ -4,14 +4,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _PpSolutionPublishCommand_instances, _PpSolutionPublishCommand_initTelemetry, _PpSolutionPublishCommand_initOptions, _PpSolutionPublishCommand_initOptionSets, _PpSolutionPublishCommand_initValidators;
7
- import { cli } from '../../../../cli/cli.js';
8
7
  import request from '../../../../request.js';
9
8
  import { formatting } from '../../../../utils/formatting.js';
10
9
  import { powerPlatform } from '../../../../utils/powerPlatform.js';
11
10
  import { validation } from '../../../../utils/validation.js';
12
11
  import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
13
12
  import commands from '../../commands.js';
14
- import ppSolutionGetCommand from './solution-get.js';
15
13
  class PpSolutionPublishCommand extends PowerPlatformCommand {
16
14
  get name() {
17
15
  return commands.SOLUTION_PUBLISH;
@@ -29,8 +27,8 @@ class PpSolutionPublishCommand extends PowerPlatformCommand {
29
27
  }
30
28
  async commandAction(logger, args) {
31
29
  try {
32
- const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
33
- const solutionId = await this.getSolutionId(args, logger);
30
+ const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
31
+ const solutionId = await this.getSolutionId(args, dynamicsApiUrl, logger);
34
32
  const solutionComponents = await this.getSolutionComponents(dynamicsApiUrl, solutionId, logger);
35
33
  const parameterXml = await this.buildXmlRequestObject(solutionComponents, logger);
36
34
  const requestOptions = {
@@ -71,23 +69,15 @@ class PpSolutionPublishCommand extends PowerPlatformCommand {
71
69
  const response = await request.get(requestOptions);
72
70
  return response.value;
73
71
  }
74
- async getSolutionId(args, logger) {
72
+ async getSolutionId(args, dynamicsApiUrl, logger) {
75
73
  if (args.options.id) {
76
74
  return args.options.id;
77
75
  }
78
76
  if (this.verbose) {
79
- await logger.logToStderr(`Retrieving solutionId`);
77
+ await logger.logToStderr(`Retrieving solutionId...`);
80
78
  }
81
- const options = {
82
- environmentName: args.options.environmentName,
83
- name: args.options.name,
84
- output: 'json',
85
- debug: this.debug,
86
- verbose: this.verbose
87
- };
88
- const output = await cli.executeCommandWithOutput(ppSolutionGetCommand, { options: { ...options, _: [] } });
89
- const getSolutionOutput = JSON.parse(output.stdout);
90
- return getSolutionOutput.solutionid;
79
+ const solution = await powerPlatform.getSolutionByName(dynamicsApiUrl, args.options.name);
80
+ return solution.solutionid;
91
81
  }
92
82
  async buildXmlRequestObject(solutionComponents, logger) {
93
83
  if (this.verbose) {
@@ -10,7 +10,6 @@ import { powerPlatform } from '../../../../utils/powerPlatform.js';
10
10
  import { validation } from '../../../../utils/validation.js';
11
11
  import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
12
12
  import commands from '../../commands.js';
13
- import ppSolutionGetCommand from './solution-get.js';
14
13
  class PpSolutionRemoveCommand extends PowerPlatformCommand {
15
14
  get name() {
16
15
  return commands.SOLUTION_REMOVE;
@@ -40,25 +39,17 @@ class PpSolutionRemoveCommand extends PowerPlatformCommand {
40
39
  }
41
40
  }
42
41
  }
43
- async getSolutionId(args) {
42
+ async getSolutionId(args, dynamicsApiUrl) {
44
43
  if (args.options.id) {
45
44
  return args.options.id;
46
45
  }
47
- const options = {
48
- environmentName: args.options.environmentName,
49
- name: args.options.name,
50
- output: 'json',
51
- debug: this.debug,
52
- verbose: this.verbose
53
- };
54
- const output = await cli.executeCommandWithOutput(ppSolutionGetCommand, { options: { ...options, _: [] } });
55
- const getSolutionOutput = JSON.parse(output.stdout);
56
- return getSolutionOutput.solutionid;
46
+ const solution = await powerPlatform.getSolutionByName(dynamicsApiUrl, args.options.name);
47
+ return solution.solutionid;
57
48
  }
58
49
  async deleteSolution(args) {
59
50
  try {
60
51
  const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
61
- const solutionId = await this.getSolutionId(args);
52
+ const solutionId = await this.getSolutionId(args, dynamicsApiUrl);
62
53
  const requestOptions = {
63
54
  url: `${dynamicsApiUrl}/api/data/v9.1/solutions(${solutionId})`,
64
55
  headers: {
@@ -10,6 +10,9 @@ export const workflow = {
10
10
  jobs: {
11
11
  "build-and-deploy": {
12
12
  "runs-on": "ubuntu-latest",
13
+ env: {
14
+ NodeVersion: "22.x"
15
+ },
13
16
  steps: [
14
17
  {
15
18
  name: "Checkout",
@@ -19,7 +22,7 @@ export const workflow = {
19
22
  name: "Use Node.js",
20
23
  uses: "actions/setup-node@v4",
21
24
  with: {
22
- "node-version": "18.x"
25
+ "node-version": "${{ env.NodeVersion }}"
23
26
  }
24
27
  },
25
28
  {
@@ -105,6 +108,10 @@ export const pipeline = {
105
108
  {
106
109
  name: "SiteAppCatalogUrl",
107
110
  value: ""
111
+ },
112
+ {
113
+ name: "NodeVersion",
114
+ value: "22.x"
108
115
  }
109
116
  ],
110
117
  stages: [
@@ -118,7 +125,7 @@ export const pipeline = {
118
125
  task: "NodeTool@0",
119
126
  displayName: "Use Node.js",
120
127
  inputs: {
121
- versionSpec: "18.x"
128
+ versionSpec: "$(NodeVersion)"
122
129
  }
123
130
  },
124
131
  {
@@ -13,7 +13,6 @@ import { BaseProjectCommand } from './base-project-command.js';
13
13
  import { validation } from '../../../../utils/validation.js';
14
14
  import { pipeline } from './DeployWorkflow.js';
15
15
  import { fsUtil } from '../../../../utils/fsUtil.js';
16
- import { parse } from 'semver';
17
16
  class SpfxProjectAzureDevOpsPipelineAddCommand extends BaseProjectCommand {
18
17
  get name() {
19
18
  return commands.PROJECT_AZUREDEVOPS_PIPELINE_ADD;
@@ -65,20 +64,6 @@ class SpfxProjectAzureDevOpsPipelineAddCommand extends BaseProjectCommand {
65
64
  if (options.branchName) {
66
65
  pipeline.trigger.branches.include[0] = options.branchName;
67
66
  }
68
- const version = this.getProjectVersion();
69
- if (!version) {
70
- throw `Unable to determine the version of the current SharePoint Framework project`;
71
- }
72
- const minorVersion = parse(version)?.minor;
73
- if (minorVersion === undefined) {
74
- throw `Unable to determine the minor version of the current SharePoint Framework project`;
75
- }
76
- if (minorVersion < 18) {
77
- const node = this.getNodeAction(pipeline);
78
- if (node.inputs) {
79
- node.inputs.versionSpec = '16.x';
80
- }
81
- }
82
67
  const script = this.getScriptAction(pipeline);
83
68
  if (script.script) {
84
69
  if (options.loginMethod === 'user') {
@@ -122,10 +107,6 @@ class SpfxProjectAzureDevOpsPipelineAddCommand extends BaseProjectCommand {
122
107
  const steps = this.getPipelineSteps(pipeline);
123
108
  return steps.find(step => step.script);
124
109
  }
125
- getNodeAction(pipeline) {
126
- const steps = this.getPipelineSteps(pipeline);
127
- return steps.find(step => step.task && step.task.indexOf('NodeTool') >= 0);
128
- }
129
110
  getPipelineSteps(pipeline) {
130
111
  return pipeline.stages[0].jobs[0].steps;
131
112
  }
@@ -0,0 +1,25 @@
1
+ import { FN002021_DEVDEP_rushstack_eslint_config } from '../project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js';
2
+ import { FN001008_DEP_react } from './rules/FN001008_DEP_react.js';
3
+ import { FN001009_DEP_react_dom } from './rules/FN001009_DEP_react_dom.js';
4
+ import { FN001035_DEP_fluentui_react } from './rules/FN001035_DEP_fluentui_react.js';
5
+ import { FN002004_DEVDEP_gulp } from './rules/FN002004_DEVDEP_gulp.js';
6
+ import { FN002007_DEVDEP_ajv } from './rules/FN002007_DEVDEP_ajv.js';
7
+ import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types_webpack_env.js';
8
+ import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
9
+ import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
10
+ import { FN002019_DEVDEP_microsoft_rush_stack_compiler } from './rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js';
11
+ import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
12
+ export default [
13
+ new FN001008_DEP_react('17'),
14
+ new FN001009_DEP_react_dom('17'),
15
+ new FN001035_DEP_fluentui_react('^8.106.4'),
16
+ new FN002004_DEVDEP_gulp('4.0.2'),
17
+ new FN002007_DEVDEP_ajv('^6.12.5'),
18
+ new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
19
+ new FN002015_DEVDEP_types_react('17'),
20
+ new FN002016_DEVDEP_types_react_dom('17'),
21
+ new FN002019_DEVDEP_microsoft_rush_stack_compiler(['5.3']),
22
+ new FN002021_DEVDEP_rushstack_eslint_config('4.0.1'),
23
+ new FN021001_PKG_spfx_deps_versions_match_project_version(true)
24
+ ];
25
+ //# sourceMappingURL=doctor-1.21.0.js.map
@@ -0,0 +1,25 @@
1
+ import { FN002021_DEVDEP_rushstack_eslint_config } from '../project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js';
2
+ import { FN001008_DEP_react } from './rules/FN001008_DEP_react.js';
3
+ import { FN001009_DEP_react_dom } from './rules/FN001009_DEP_react_dom.js';
4
+ import { FN001035_DEP_fluentui_react } from './rules/FN001035_DEP_fluentui_react.js';
5
+ import { FN002004_DEVDEP_gulp } from './rules/FN002004_DEVDEP_gulp.js';
6
+ import { FN002007_DEVDEP_ajv } from './rules/FN002007_DEVDEP_ajv.js';
7
+ import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types_webpack_env.js';
8
+ import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
9
+ import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
10
+ import { FN002019_DEVDEP_microsoft_rush_stack_compiler } from './rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js';
11
+ import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
12
+ export default [
13
+ new FN001008_DEP_react('17'),
14
+ new FN001009_DEP_react_dom('17'),
15
+ new FN001035_DEP_fluentui_react('^8.106.4'),
16
+ new FN002004_DEVDEP_gulp('4.0.2'),
17
+ new FN002007_DEVDEP_ajv('^6.12.5'),
18
+ new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
19
+ new FN002015_DEVDEP_types_react('17'),
20
+ new FN002016_DEVDEP_types_react_dom('17'),
21
+ new FN002019_DEVDEP_microsoft_rush_stack_compiler(['5.3']),
22
+ new FN002021_DEVDEP_rushstack_eslint_config('4.0.1'),
23
+ new FN021001_PKG_spfx_deps_versions_match_project_version(true)
24
+ ];
25
+ //# sourceMappingURL=doctor-1.21.1.js.map
@@ -71,7 +71,9 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
71
71
  '1.18.1',
72
72
  '1.18.2',
73
73
  '1.19.0',
74
- '1.20.0'
74
+ '1.20.0',
75
+ '1.21.0',
76
+ '1.21.1'
75
77
  ];
76
78
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
77
79
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
@@ -13,7 +13,6 @@ import { validation } from '../../../../utils/validation.js';
13
13
  import commands from '../../commands.js';
14
14
  import { workflow } from './DeployWorkflow.js';
15
15
  import { BaseProjectCommand } from './base-project-command.js';
16
- import { parse } from 'semver';
17
16
  class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
18
17
  get name() {
19
18
  return commands.PROJECT_GITHUB_WORKFLOW_ADD;
@@ -64,17 +63,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
64
63
  // eslint-disable-next-line camelcase
65
64
  workflow.on.workflow_dispatch = null;
66
65
  }
67
- const version = this.getProjectVersion();
68
- if (!version) {
69
- throw `Unable to determine the version of the current SharePoint Framework project`;
70
- }
71
- const minorVersion = parse(version)?.minor;
72
- if (minorVersion === undefined) {
73
- throw `Unable to determine the minor version of the current SharePoint Framework project`;
74
- }
75
- if (minorVersion < 18) {
76
- this.getNodeAction(workflow).with['node-version'] = '16.x';
77
- }
78
66
  if (options.skipFeatureDeployment) {
79
67
  this.getDeployAction(workflow).with.SKIP_FEATURE_DEPLOYMENT = true;
80
68
  }
@@ -103,10 +91,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
103
91
  const steps = this.getWorkFlowSteps(workflow);
104
92
  return steps.find(step => step.uses && step.uses.indexOf('action-cli-deploy') >= 0);
105
93
  }
106
- getNodeAction(workflow) {
107
- const steps = this.getWorkFlowSteps(workflow);
108
- return steps.find(step => step.uses && step.uses.indexOf('actions/setup-node@') >= 0);
109
- }
110
94
  getWorkFlowSteps(workflow) {
111
95
  return workflow.jobs['build-and-deploy'].steps;
112
96
  }
@@ -0,0 +1,13 @@
1
+ import { DependencyRule } from "./DependencyRule.js";
2
+ export class FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3 extends DependencyRule {
3
+ constructor(packageVersion) {
4
+ super('@microsoft/rush-stack-compiler-5.3', packageVersion, true);
5
+ }
6
+ get id() {
7
+ return 'FN002029';
8
+ }
9
+ get supersedes() {
10
+ return ['FN002010', 'FN002011', 'FN002012', 'FN002017', 'FN002018', 'FN002020', 'FN002028'];
11
+ }
12
+ }
13
+ //# sourceMappingURL=FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js.map
@@ -0,0 +1,63 @@
1
+ import { FN001001_DEP_microsoft_sp_core_library } from './rules/FN001001_DEP_microsoft_sp_core_library.js';
2
+ import { FN001002_DEP_microsoft_sp_lodash_subset } from './rules/FN001002_DEP_microsoft_sp_lodash_subset.js';
3
+ import { FN001003_DEP_microsoft_sp_office_ui_fabric_core } from './rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js';
4
+ import { FN001004_DEP_microsoft_sp_webpart_base } from './rules/FN001004_DEP_microsoft_sp_webpart_base.js';
5
+ import { FN001011_DEP_microsoft_sp_dialog } from './rules/FN001011_DEP_microsoft_sp_dialog.js';
6
+ import { FN001012_DEP_microsoft_sp_application_base } from './rules/FN001012_DEP_microsoft_sp_application_base.js';
7
+ import { FN001013_DEP_microsoft_decorators } from './rules/FN001013_DEP_microsoft_decorators.js';
8
+ import { FN001014_DEP_microsoft_sp_listview_extensibility } from './rules/FN001014_DEP_microsoft_sp_listview_extensibility.js';
9
+ import { FN001021_DEP_microsoft_sp_property_pane } from './rules/FN001021_DEP_microsoft_sp_property_pane.js';
10
+ import { FN001023_DEP_microsoft_sp_component_base } from './rules/FN001023_DEP_microsoft_sp_component_base.js';
11
+ import { FN001024_DEP_microsoft_sp_diagnostics } from './rules/FN001024_DEP_microsoft_sp_diagnostics.js';
12
+ import { FN001025_DEP_microsoft_sp_dynamic_data } from './rules/FN001025_DEP_microsoft_sp_dynamic_data.js';
13
+ import { FN001026_DEP_microsoft_sp_extension_base } from './rules/FN001026_DEP_microsoft_sp_extension_base.js';
14
+ import { FN001027_DEP_microsoft_sp_http } from './rules/FN001027_DEP_microsoft_sp_http.js';
15
+ import { FN001028_DEP_microsoft_sp_list_subscription } from './rules/FN001028_DEP_microsoft_sp_list_subscription.js';
16
+ import { FN001029_DEP_microsoft_sp_loader } from './rules/FN001029_DEP_microsoft_sp_loader.js';
17
+ import { FN001030_DEP_microsoft_sp_module_interfaces } from './rules/FN001030_DEP_microsoft_sp_module_interfaces.js';
18
+ import { FN001031_DEP_microsoft_sp_odata_types } from './rules/FN001031_DEP_microsoft_sp_odata_types.js';
19
+ import { FN001032_DEP_microsoft_sp_page_context } from './rules/FN001032_DEP_microsoft_sp_page_context.js';
20
+ import { FN001034_DEP_microsoft_sp_adaptive_card_extension_base } from './rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js';
21
+ import { FN002001_DEVDEP_microsoft_sp_build_web } from './rules/FN002001_DEVDEP_microsoft_sp_build_web.js';
22
+ import { FN002002_DEVDEP_microsoft_sp_module_interfaces } from './rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js';
23
+ import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
24
+ import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
25
+ import { FN002024_DEVDEP_eslint } from './rules/FN002024_DEVDEP_eslint.js';
26
+ import { FN002026_DEVDEP_typescript } from './rules/FN002026_DEVDEP_typescript.js';
27
+ import { FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3 } from './rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js';
28
+ import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
29
+ import { FN012017_TSC_extends } from './rules/FN012017_TSC_extends.js';
30
+ import { FN021003_PKG_engines_node } from './rules/FN021003_PKG_engines_node.js';
31
+ export default [
32
+ new FN001001_DEP_microsoft_sp_core_library('1.21.0'),
33
+ new FN001002_DEP_microsoft_sp_lodash_subset('1.21.0'),
34
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.21.0'),
35
+ new FN001004_DEP_microsoft_sp_webpart_base('1.21.0'),
36
+ new FN001011_DEP_microsoft_sp_dialog('1.21.0'),
37
+ new FN001012_DEP_microsoft_sp_application_base('1.21.0'),
38
+ new FN001014_DEP_microsoft_sp_listview_extensibility('1.21.0'),
39
+ new FN001021_DEP_microsoft_sp_property_pane('1.21.0'),
40
+ new FN001023_DEP_microsoft_sp_component_base('1.21.0'),
41
+ new FN001024_DEP_microsoft_sp_diagnostics('1.21.0'),
42
+ new FN001025_DEP_microsoft_sp_dynamic_data('1.21.0'),
43
+ new FN001026_DEP_microsoft_sp_extension_base('1.21.0'),
44
+ new FN001027_DEP_microsoft_sp_http('1.21.0'),
45
+ new FN001028_DEP_microsoft_sp_list_subscription('1.21.0'),
46
+ new FN001029_DEP_microsoft_sp_loader('1.21.0'),
47
+ new FN001030_DEP_microsoft_sp_module_interfaces('1.21.0'),
48
+ new FN001031_DEP_microsoft_sp_odata_types('1.21.0'),
49
+ new FN001032_DEP_microsoft_sp_page_context('1.21.0'),
50
+ new FN001013_DEP_microsoft_decorators('1.21.0'),
51
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.21.0'),
52
+ new FN002001_DEVDEP_microsoft_sp_build_web('1.21.0'),
53
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.21.0'),
54
+ new FN002024_DEVDEP_eslint('8.57.1'),
55
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.21.0'),
56
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.21.0'),
57
+ new FN002026_DEVDEP_typescript('5.3.3'),
58
+ new FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3('0.1.0'),
59
+ new FN010001_YORC_version('1.21.0'),
60
+ new FN012017_TSC_extends('./node_modules/@microsoft/rush-stack-compiler-5.3/includes/tsconfig-web.json'),
61
+ new FN021003_PKG_engines_node('>=22.14.0 < 23.0.0')
62
+ ];
63
+ //# sourceMappingURL=upgrade-1.21.0.js.map
@@ -0,0 +1,53 @@
1
+ import { FN001001_DEP_microsoft_sp_core_library } from './rules/FN001001_DEP_microsoft_sp_core_library.js';
2
+ import { FN001002_DEP_microsoft_sp_lodash_subset } from './rules/FN001002_DEP_microsoft_sp_lodash_subset.js';
3
+ import { FN001003_DEP_microsoft_sp_office_ui_fabric_core } from './rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js';
4
+ import { FN001004_DEP_microsoft_sp_webpart_base } from './rules/FN001004_DEP_microsoft_sp_webpart_base.js';
5
+ import { FN001011_DEP_microsoft_sp_dialog } from './rules/FN001011_DEP_microsoft_sp_dialog.js';
6
+ import { FN001012_DEP_microsoft_sp_application_base } from './rules/FN001012_DEP_microsoft_sp_application_base.js';
7
+ import { FN001013_DEP_microsoft_decorators } from './rules/FN001013_DEP_microsoft_decorators.js';
8
+ import { FN001014_DEP_microsoft_sp_listview_extensibility } from './rules/FN001014_DEP_microsoft_sp_listview_extensibility.js';
9
+ import { FN001021_DEP_microsoft_sp_property_pane } from './rules/FN001021_DEP_microsoft_sp_property_pane.js';
10
+ import { FN001023_DEP_microsoft_sp_component_base } from './rules/FN001023_DEP_microsoft_sp_component_base.js';
11
+ import { FN001024_DEP_microsoft_sp_diagnostics } from './rules/FN001024_DEP_microsoft_sp_diagnostics.js';
12
+ import { FN001025_DEP_microsoft_sp_dynamic_data } from './rules/FN001025_DEP_microsoft_sp_dynamic_data.js';
13
+ import { FN001026_DEP_microsoft_sp_extension_base } from './rules/FN001026_DEP_microsoft_sp_extension_base.js';
14
+ import { FN001027_DEP_microsoft_sp_http } from './rules/FN001027_DEP_microsoft_sp_http.js';
15
+ import { FN001028_DEP_microsoft_sp_list_subscription } from './rules/FN001028_DEP_microsoft_sp_list_subscription.js';
16
+ import { FN001029_DEP_microsoft_sp_loader } from './rules/FN001029_DEP_microsoft_sp_loader.js';
17
+ import { FN001030_DEP_microsoft_sp_module_interfaces } from './rules/FN001030_DEP_microsoft_sp_module_interfaces.js';
18
+ import { FN001031_DEP_microsoft_sp_odata_types } from './rules/FN001031_DEP_microsoft_sp_odata_types.js';
19
+ import { FN001032_DEP_microsoft_sp_page_context } from './rules/FN001032_DEP_microsoft_sp_page_context.js';
20
+ import { FN001034_DEP_microsoft_sp_adaptive_card_extension_base } from './rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js';
21
+ import { FN002001_DEVDEP_microsoft_sp_build_web } from './rules/FN002001_DEVDEP_microsoft_sp_build_web.js';
22
+ import { FN002002_DEVDEP_microsoft_sp_module_interfaces } from './rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js';
23
+ import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
24
+ import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
25
+ import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
26
+ export default [
27
+ new FN001001_DEP_microsoft_sp_core_library('1.21.1'),
28
+ new FN001002_DEP_microsoft_sp_lodash_subset('1.21.1'),
29
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.21.1'),
30
+ new FN001004_DEP_microsoft_sp_webpart_base('1.21.1'),
31
+ new FN001011_DEP_microsoft_sp_dialog('1.21.1'),
32
+ new FN001012_DEP_microsoft_sp_application_base('1.21.1'),
33
+ new FN001014_DEP_microsoft_sp_listview_extensibility('1.21.1'),
34
+ new FN001021_DEP_microsoft_sp_property_pane('1.21.1'),
35
+ new FN001023_DEP_microsoft_sp_component_base('1.21.1'),
36
+ new FN001024_DEP_microsoft_sp_diagnostics('1.21.1'),
37
+ new FN001025_DEP_microsoft_sp_dynamic_data('1.21.1'),
38
+ new FN001026_DEP_microsoft_sp_extension_base('1.21.1'),
39
+ new FN001027_DEP_microsoft_sp_http('1.21.1'),
40
+ new FN001028_DEP_microsoft_sp_list_subscription('1.21.1'),
41
+ new FN001029_DEP_microsoft_sp_loader('1.21.1'),
42
+ new FN001030_DEP_microsoft_sp_module_interfaces('1.21.1'),
43
+ new FN001031_DEP_microsoft_sp_odata_types('1.21.1'),
44
+ new FN001032_DEP_microsoft_sp_page_context('1.21.1'),
45
+ new FN001013_DEP_microsoft_decorators('1.21.1'),
46
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.21.1'),
47
+ new FN002001_DEVDEP_microsoft_sp_build_web('1.21.1'),
48
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.21.1'),
49
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.21.1'),
50
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.21.1'),
51
+ new FN010001_YORC_version('1.21.1')
52
+ ];
53
+ //# sourceMappingURL=upgrade-1.21.1.js.map
@@ -73,7 +73,9 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
73
73
  '1.18.1',
74
74
  '1.18.2',
75
75
  '1.19.0',
76
- '1.20.0'
76
+ '1.20.0',
77
+ '1.21.0',
78
+ '1.21.1'
77
79
  ];
78
80
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
79
81
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
@@ -590,6 +590,36 @@ class SpfxDoctorCommand extends BaseProjectCommand {
590
590
  range: '^4 || ^5',
591
591
  fix: 'npm i -g yo@5'
592
592
  }
593
+ },
594
+ '1.21.0': {
595
+ gulpCli: {
596
+ range: '^1 || ^2 || ^3',
597
+ fix: 'npm i -g gulp-cli@3'
598
+ },
599
+ node: {
600
+ range: '>=22.14.0 < 23.0.0',
601
+ fix: 'Install Node.js >=22.14.0 < 23.0.0'
602
+ },
603
+ sp: SharePointVersion.SPO,
604
+ yo: {
605
+ range: '^4 || ^5',
606
+ fix: 'npm i -g yo@5'
607
+ }
608
+ },
609
+ '1.21.1': {
610
+ gulpCli: {
611
+ range: '^1 || ^2 || ^3',
612
+ fix: 'npm i -g gulp-cli@3'
613
+ },
614
+ node: {
615
+ range: '>=22.14.0 < 23.0.0',
616
+ fix: 'Install Node.js >=22.14.0 < 23.0.0'
617
+ },
618
+ sp: SharePointVersion.SPO,
619
+ yo: {
620
+ range: '^4 || ^5',
621
+ fix: 'npm i -g yo@5'
622
+ }
593
623
  }
594
624
  };
595
625
  this.output = '';
@@ -7,6 +7,7 @@ var _UtilAccessTokenGetCommand_instances, _UtilAccessTokenGetCommand_initTelemet
7
7
  import auth, { Auth } from '../../../../Auth.js';
8
8
  import Command from '../../../../Command.js';
9
9
  import commands from '../../commands.js';
10
+ import { accessToken } from '../../../../utils/accessToken.js';
10
11
  class UtilAccessTokenGetCommand extends Command {
11
12
  get name() {
12
13
  return commands.ACCESSTOKEN_GET;
@@ -34,8 +35,14 @@ class UtilAccessTokenGetCommand extends Command {
34
35
  resource = Auth.getEndpointForResource('https://graph.microsoft.com', auth.connection.cloudType);
35
36
  }
36
37
  try {
37
- const accessToken = await auth.ensureAccessToken(resource, logger, this.debug, args.options.new);
38
- await logger.log(accessToken);
38
+ const token = await auth.ensureAccessToken(resource, logger, this.debug, args.options.new);
39
+ if (args.options.decoded) {
40
+ const { header, payload } = accessToken.getDecodedAccessToken(token);
41
+ await logger.logRaw(`${JSON.stringify(header, null, 2)}.${JSON.stringify(payload, null, 2)}.[signature]`);
42
+ }
43
+ else {
44
+ await logger.log(token);
45
+ }
39
46
  }
40
47
  catch (err) {
41
48
  this.handleRejectedODataJsonPromise(err);
@@ -45,7 +52,8 @@ class UtilAccessTokenGetCommand extends Command {
45
52
  _UtilAccessTokenGetCommand_instances = new WeakSet(), _UtilAccessTokenGetCommand_initTelemetry = function _UtilAccessTokenGetCommand_initTelemetry() {
46
53
  this.telemetry.push((args) => {
47
54
  Object.assign(this.telemetryProperties, {
48
- new: args.options.new
55
+ new: args.options.new,
56
+ decoded: args.options.decoded
49
57
  });
50
58
  });
51
59
  }, _UtilAccessTokenGetCommand_initOptions = function _UtilAccessTokenGetCommand_initOptions() {
@@ -53,6 +61,8 @@ _UtilAccessTokenGetCommand_instances = new WeakSet(), _UtilAccessTokenGetCommand
53
61
  option: '-r, --resource <resource>'
54
62
  }, {
55
63
  option: '--new'
64
+ }, {
65
+ option: '--decoded'
56
66
  });
57
67
  };
58
68
  export default new UtilAccessTokenGetCommand();
@@ -75,6 +75,14 @@ export const accessToken = {
75
75
  }
76
76
  return userId;
77
77
  },
78
+ getDecodedAccessToken(accessToken) {
79
+ const chunks = accessToken.split('.');
80
+ const headerString = Buffer.from(chunks[0], 'base64').toString();
81
+ const payloadString = Buffer.from(chunks[1], 'base64').toString();
82
+ const header = JSON.parse(headerString);
83
+ const payload = JSON.parse(payloadString);
84
+ return { header, payload };
85
+ },
78
86
  /**
79
87
  * Asserts the presence of a delegated access token.
80
88
  * @throws {CommandError} Will throw an error if the access token is not available.
@@ -71,10 +71,7 @@ export const powerPlatform = {
71
71
  * @param logger The logger object
72
72
  * @param verbose Set for verbose logging
73
73
  */
74
- async getCardByName(dynamicsApiUrl, name, logger, verbose) {
75
- if (verbose && logger) {
76
- await logger.logToStderr(`Retrieving the card with name ${name}`);
77
- }
74
+ async getCardByName(dynamicsApiUrl, name) {
78
75
  const requestOptions = {
79
76
  url: `${dynamicsApiUrl}/api/data/v9.1/cards?$filter=name eq '${name}'`,
80
77
  headers: {
@@ -91,6 +88,30 @@ export const powerPlatform = {
91
88
  return cli.handleMultipleResultsFound(`Multiple cards with name '${name}' found.`, resultAsKeyValuePair);
92
89
  }
93
90
  return result.value[0];
91
+ },
92
+ /**
93
+ * Get a solution by name
94
+ * Returns the solution object
95
+ * @param dynamicsApiUrl The dynamics api url of the environment
96
+ * @param name The name of the solution
97
+ */
98
+ async getSolutionByName(dynamicsApiUrl, name) {
99
+ const requestOptions = {
100
+ url: `${dynamicsApiUrl}/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${name}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`,
101
+ headers: {
102
+ accept: 'application/json;odata.metadata=none'
103
+ },
104
+ responseType: 'json'
105
+ };
106
+ const result = await request.get(requestOptions);
107
+ if (result.value.length === 0) {
108
+ throw Error(`The specified solution '${name}' does not exist.`);
109
+ }
110
+ if (result.value.length > 1) {
111
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('solutionid', result.value);
112
+ return cli.handleMultipleResultsFound(`Multiple solutions with name '${name}' found.`, resultAsKeyValuePair);
113
+ }
114
+ return result.value[0];
94
115
  }
95
116
  };
96
117
  //# sourceMappingURL=powerPlatform.js.map
@@ -6,13 +6,20 @@ let inquirerSelect;
6
6
  ;
7
7
  ;
8
8
  export const prompt = {
9
- /* c8 ignore next 9 */
9
+ /* c8 ignore next 16 */
10
10
  async forInput(config) {
11
11
  if (!inquirerInput) {
12
12
  inquirerInput = await import('@inquirer/input');
13
13
  }
14
14
  const errorOutput = cli.getSettingWithDefaultValue(settingsNames.errorOutput, 'stderr');
15
- return inquirerInput.default(config, { output: errorOutput === 'stderr' ? process.stderr : process.stdout });
15
+ return inquirerInput
16
+ .default(config, { output: errorOutput === 'stderr' ? process.stderr : process.stdout })
17
+ .catch(error => {
18
+ if (error instanceof Error && error.name === 'ExitPromptError') {
19
+ return ''; // noop; handle Ctrl + C
20
+ }
21
+ throw error;
22
+ });
16
23
  },
17
24
  /* c8 ignore next 9 */
18
25
  async forConfirmation(config) {
@@ -1,2 +1,3 @@
1
1
  export {};
2
+ // #endregion
2
3
  //# sourceMappingURL=types.js.map
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
 
3
3
  # entra group member add
4
4
 
5
- Adds a member to a Microsoft Entra ID group
5
+ Adds members to a Microsoft Entra group
6
6
 
7
7
  ## Usage
8
8