@pnp/cli-microsoft365 11.2.0-beta.0432e1f → 11.2.0-beta.7eeb404

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 (40) hide show
  1. package/.devproxy/api-specs/sharepoint.yaml +38 -15
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/m365/commands/docs.js +5 -0
  5. package/dist/m365/entra/commands/multitenant/multitenant-add.js +10 -28
  6. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.22.0-beta.1.js → doctor-1.22.0-rc.0.js} +3 -3
  7. package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
  8. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js +1 -1
  9. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_css_loader.js +10 -0
  10. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js +10 -0
  11. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002035_DEVDEP_types_heft_jest.js +10 -0
  12. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021014_PKG_scripts_test_only.js +45 -0
  13. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021015_PKG_scripts_trust_dev_cert.js +45 -0
  14. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021016_PKG_scripts_untrust_dev_cert.js +45 -0
  15. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js +57 -0
  16. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js +57 -0
  17. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js +50 -0
  18. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js +50 -0
  19. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.22.0-beta.1.js → upgrade-1.22.0-rc.0.js} +56 -141
  20. package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
  21. package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
  22. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +4 -0
  23. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +8 -2
  24. package/dist/m365/spo/commands/commandset/commandset-add.js +4 -0
  25. package/dist/m365/spo/commands/commandset/commandset-set.js +8 -1
  26. package/dist/m365/spo/commands/site/site-versionpolicy-get.js +69 -0
  27. package/dist/m365/spo/commands.js +1 -0
  28. package/dist/m365/teams/commands/channel/channel-add.js +13 -33
  29. package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-get.mdx +20 -1
  30. package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-list.mdx +22 -1
  31. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +3 -0
  32. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +3 -0
  33. package/docs/docs/cmd/spo/commandset/commandset-add.mdx +3 -0
  34. package/docs/docs/cmd/spo/commandset/commandset-set.mdx +3 -0
  35. package/docs/docs/cmd/spo/site/site-versionpolicy-get.mdx +97 -0
  36. package/npm-shrinkwrap.json +1358 -665
  37. package/package.json +17 -17
  38. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_jest_junit.js +0 -10
  39. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015012_FILE_config_heft_json.js +0 -10
  40. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015013_FILE_config_jest_config_json.js +0 -10
@@ -25,18 +25,19 @@ import { FN002007_DEVDEP_ajv } from './rules/FN002007_DEVDEP_ajv.js';
25
25
  import { FN002021_DEVDEP_rushstack_eslint_config } from './rules/FN002021_DEVDEP_rushstack_eslint_config.js';
26
26
  import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
27
27
  import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
28
+ import { FN002026_DEVDEP_typescript } from './rules/FN002026_DEVDEP_typescript.js';
28
29
  import { FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3 } from './rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js';
29
30
  import { FN002030_DEVDEP_microsoft_spfx_web_build_rig } from './rules/FN002030_DEVDEP_microsoft_spfx_web_build_rig.js';
30
31
  import { FN002031_DEVDEP_rushstack_heft } from './rules/FN002031_DEVDEP_rushstack_heft.js';
31
32
  import { FN002032_DEVDEP_typescript_eslint_parser } from './rules/FN002032_DEVDEP_typescript_eslint_parser.js';
32
- import { FN002033_DEVDEP_jest_junit } from './rules/FN002033_DEVDEP_jest_junit.js';
33
+ import { FN002033_DEVDEP_css_loader } from './rules/FN002033_DEVDEP_css_loader.js';
34
+ import { FN002034_DEVDEP_microsoft_spfx_heft_plugins } from './rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js';
35
+ import { FN002035_DEVDEP_types_heft_jest } from './rules/FN002035_DEVDEP_types_heft_jest.js';
33
36
  import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
34
37
  import { FN010011_YORC_useGulp } from './rules/FN010011_YORC_useGulp.js';
35
38
  import { FN015005_FILE_src_index_ts } from './rules/FN015005_FILE_src_index_ts.js';
36
39
  import { FN015010_FILE_gulpfile_js } from './rules/FN015010_FILE_gulpfile_js.js';
37
40
  import { FN015011_FILE_tsconfig_json } from './rules/FN015011_FILE_tsconfig_json.js';
38
- import { FN015012_FILE_config_heft_json } from './rules/FN015012_FILE_config_heft_json.js';
39
- import { FN015013_FILE_config_jest_config_json } from './rules/FN015013_FILE_config_jest_config_json.js';
40
41
  import { FN015014_FILE_config_rig_json } from './rules/FN015014_FILE_config_rig_json.js';
41
42
  import { FN015015_FILE_config_typescript_json } from './rules/FN015015_FILE_config_typescript_json.js';
42
43
  import { FN020001_RES_types_react } from './rules/FN020001_RES_types_react.js';
@@ -51,154 +52,61 @@ import { FN021010_PKG_scripts_package_solution } from './rules/FN021010_PKG_scri
51
52
  import { FN021011_PKG_scripts_deploy_azure_storage } from './rules/FN021011_PKG_scripts_deploy_azure_storage.js';
52
53
  import { FN021012_PKG_scripts_eject_webpack } from './rules/FN021012_PKG_scripts_eject_webpack.js';
53
54
  import { FN021013_PKG_overrides_rushstack_heft } from './rules/FN021013_PKG_overrides_rushstack_heft.js';
55
+ import { FN021014_PKG_scripts_test_only } from './rules/FN021014_PKG_scripts_test_only.js';
56
+ import { FN021015_PKG_scripts_trust_dev_cert } from './rules/FN021015_PKG_scripts_trust_dev_cert.js';
57
+ import { FN021016_PKG_scripts_untrust_dev_cert } from './rules/FN021016_PKG_scripts_untrust_dev_cert.js';
54
58
  import { FN023003_GITIGNORE_libdts } from './rules/FN023003_GITIGNORE_libdts.js';
55
59
  import { FN023004_GITIGNORE_libcommonjs } from './rules/FN023004_GITIGNORE_libcommonjs.js';
56
60
  import { FN023005_GITIGNORE_libesm } from './rules/FN023005_GITIGNORE_libesm.js';
57
61
  import { FN023006_GITIGNORE_jestoutput } from './rules/FN023006_GITIGNORE_jestoutput.js';
62
+ import { FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name } from './rules/FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name.js';
63
+ import { FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount } from './rules/FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount.js';
64
+ import { FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name } from './rules/FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name.js';
65
+ import { FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount } from './rules/FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount.js';
58
66
  import { FN026001_CFG_SASS_schema } from './rules/FN026001_CFG_SASS_schema.js';
59
67
  import { FN026002_CFG_SASS_extends } from './rules/FN026002_CFG_SASS_extends.js';
60
68
  export default [
61
- new FN001001_DEP_microsoft_sp_core_library('1.22.0-beta.1'),
62
- new FN001002_DEP_microsoft_sp_lodash_subset('1.22.0-beta.1'),
63
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.22.0-beta.1'),
64
- new FN001004_DEP_microsoft_sp_webpart_base('1.22.0-beta.1'),
65
- new FN001011_DEP_microsoft_sp_dialog('1.22.0-beta.1'),
66
- new FN001012_DEP_microsoft_sp_application_base('1.22.0-beta.1'),
67
- new FN001014_DEP_microsoft_sp_listview_extensibility('1.22.0-beta.1'),
68
- new FN001021_DEP_microsoft_sp_property_pane('1.22.0-beta.1'),
69
- new FN001023_DEP_microsoft_sp_component_base('1.22.0-beta.1'),
70
- new FN001024_DEP_microsoft_sp_diagnostics('1.22.0-beta.1'),
71
- new FN001025_DEP_microsoft_sp_dynamic_data('1.22.0-beta.1'),
72
- new FN001026_DEP_microsoft_sp_extension_base('1.22.0-beta.1'),
73
- new FN001027_DEP_microsoft_sp_http('1.22.0-beta.1'),
74
- new FN001028_DEP_microsoft_sp_list_subscription('1.22.0-beta.1'),
75
- new FN001029_DEP_microsoft_sp_loader('1.22.0-beta.1'),
76
- new FN001030_DEP_microsoft_sp_module_interfaces('1.22.0-beta.1'),
77
- new FN001031_DEP_microsoft_sp_odata_types('1.22.0-beta.1'),
78
- new FN001032_DEP_microsoft_sp_page_context('1.22.0-beta.1'),
79
- new FN001013_DEP_microsoft_decorators('1.22.0-beta.1'),
80
- new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.22.0-beta.1'),
81
- new FN002001_DEVDEP_microsoft_sp_build_web('1.22.0-beta.1', false),
82
- new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.22.0-beta.1'),
69
+ new FN001001_DEP_microsoft_sp_core_library('1.22.0-rc.0'),
70
+ new FN001002_DEP_microsoft_sp_lodash_subset('1.22.0-rc.0'),
71
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.22.0-rc.0'),
72
+ new FN001004_DEP_microsoft_sp_webpart_base('1.22.0-rc.0'),
73
+ new FN001011_DEP_microsoft_sp_dialog('1.22.0-rc.0'),
74
+ new FN001012_DEP_microsoft_sp_application_base('1.22.0-rc.0'),
75
+ new FN001014_DEP_microsoft_sp_listview_extensibility('1.22.0-rc.0'),
76
+ new FN001021_DEP_microsoft_sp_property_pane('1.22.0-rc.0'),
77
+ new FN001023_DEP_microsoft_sp_component_base('1.22.0-rc.0'),
78
+ new FN001024_DEP_microsoft_sp_diagnostics('1.22.0-rc.0'),
79
+ new FN001025_DEP_microsoft_sp_dynamic_data('1.22.0-rc.0'),
80
+ new FN001026_DEP_microsoft_sp_extension_base('1.22.0-rc.0'),
81
+ new FN001027_DEP_microsoft_sp_http('1.22.0-rc.0'),
82
+ new FN001028_DEP_microsoft_sp_list_subscription('1.22.0-rc.0'),
83
+ new FN001029_DEP_microsoft_sp_loader('1.22.0-rc.0'),
84
+ new FN001030_DEP_microsoft_sp_module_interfaces('1.22.0-rc.0'),
85
+ new FN001031_DEP_microsoft_sp_odata_types('1.22.0-rc.0'),
86
+ new FN001032_DEP_microsoft_sp_page_context('1.22.0-rc.0'),
87
+ new FN001013_DEP_microsoft_decorators('1.22.0-rc.0'),
88
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.22.0-rc.0'),
89
+ new FN002001_DEVDEP_microsoft_sp_build_web('1.22.0-rc.0', false),
90
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.22.0-rc.0'),
83
91
  new FN002004_DEVDEP_gulp('4.0.2', false),
84
92
  new FN002007_DEVDEP_ajv('6.12.6', false),
85
- new FN002021_DEVDEP_rushstack_eslint_config('4.3.0'),
86
- new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.22.0-beta.1'),
87
- new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.22.0-beta.1'),
93
+ new FN002021_DEVDEP_rushstack_eslint_config('4.5.2'),
94
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.22.0-rc.0'),
95
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.22.0-rc.0'),
96
+ new FN002026_DEVDEP_typescript('~5.8.0'),
88
97
  new FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3('0.1.0', false),
89
- new FN002030_DEVDEP_microsoft_spfx_web_build_rig('1.22.0-beta.1'),
90
- new FN002031_DEVDEP_rushstack_heft('0.73.6'),
91
- new FN002032_DEVDEP_typescript_eslint_parser('8.26.1'),
92
- new FN002033_DEVDEP_jest_junit('12.3.0'),
93
- new FN010001_YORC_version('1.22.0-beta.1'),
94
- new FN010011_YORC_useGulp(true),
98
+ new FN002030_DEVDEP_microsoft_spfx_web_build_rig('1.22.0-rc.0'),
99
+ new FN002031_DEVDEP_rushstack_heft('1.1.2'),
100
+ new FN002032_DEVDEP_typescript_eslint_parser('8.46.2'),
101
+ new FN002033_DEVDEP_css_loader('7.1.2'),
102
+ new FN002034_DEVDEP_microsoft_spfx_heft_plugins('1.22.0-rc.0'),
103
+ new FN002035_DEVDEP_types_heft_jest('1.0.2'),
104
+ new FN010001_YORC_version('1.22.0-rc.0'),
105
+ new FN010011_YORC_useGulp(false),
95
106
  new FN015005_FILE_src_index_ts(false),
96
107
  new FN015010_FILE_gulpfile_js(false),
97
108
  new FN015011_FILE_tsconfig_json(true, `{
98
- "extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json",
99
- "compilerOptions": {
100
- "skipLibCheck": true
101
- }
102
- }
103
- `),
104
- new FN015012_FILE_config_heft_json(true, `{
105
- "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
106
-
107
- "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/heft.json",
108
-
109
- "phasesByName": {
110
- "build": {
111
- "tasksByName": {
112
- // copies the localization js files to the lib folder
113
- "copy-strings": {
114
- "taskPlugin": {
115
- "pluginPackage": "@rushstack/heft",
116
- "pluginName": "copy-files-plugin",
117
- "options": {
118
- "copyOperations": [
119
- {
120
- "sourcePath": "./src",
121
- "destinationFolders": ["./lib", "./lib-commonjs"],
122
- "fileExtensions": [".js"]
123
- }
124
- ]
125
- }
126
- }
127
- }
128
- }
129
- },
130
- "eject-webpack": {
131
- "tasksByName": {
132
- "eject-webpack": {
133
- "taskPlugin": {
134
- "pluginPackage": "@rushstack/heft",
135
- "pluginName": "run-script-plugin",
136
- "options": {
137
- "scriptPath": "node_modules/@microsoft/spfx-heft-plugins/lib-commonjs/plugins/ejectWebpackPlugin/EjectWebpackPlugin.js"
138
- }
139
- }
140
- }
141
- }
142
- }
143
- }
144
- }
145
- `),
146
- new FN015013_FILE_config_jest_config_json(true, `{
147
- "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json",
148
-
149
- "roots": ["<rootDir>/lib"],
150
-
151
- "testMatch": ["<rootDir>/lib/**/*.test.js"],
152
-
153
- "collectCoverageFrom": [
154
- "lib/**/*.js",
155
- "!lib/**/*.d.ts",
156
- "!lib/**/*.test.js",
157
- "!lib/**/test/**",
158
- "!lib/**/__tests__/**",
159
- "!lib/**/__fixtures__/**",
160
- "!lib/**/__mocks__/**"
161
- ],
162
-
163
- "transformIgnorePatterns": ["[\\/]lib[\\/](.*)\\.js$"],
164
-
165
- "testEnvironment": "jest-environment-jsdom",
166
- "testEnvironmentOptions": {
167
- "customExportConditions": ["require", "node", "umd"]
168
- },
169
-
170
- "moduleFileExtensions": ["cjs", "js", "json", "node", "css"],
171
-
172
- // Enable code coverage for Jest
173
- "collectCoverage": true,
174
- "coverageDirectory": "<rootDir>/jest-output/coverage",
175
- "coverageReporters": [
176
- [
177
- "cobertura",
178
- {
179
- "file": "cobertura/cobertura-coverage.xml"
180
- }
181
- ],
182
- "html",
183
- "json-summary"
184
- ],
185
-
186
- // Use v8 coverage provider to avoid Babel
187
- "coverageProvider": "v8",
188
-
189
- // Enable junit reporting for Jest
190
- "reporters": [
191
- "default",
192
- [
193
- "jest-junit",
194
- {
195
- "outputDirectory": "<rootDir>/jest-output",
196
- "outputName": "JUnit.xml", // QTest expects this casing.
197
- "classNameTemplate": "{classname} > ",
198
- "titleTemplate": "{title} ({filepath})"
199
- }
200
- ]
201
- ]
109
+ "extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json"
202
110
  }
203
111
  `),
204
112
  new FN015014_FILE_config_rig_json(true, `{
@@ -221,7 +129,7 @@ export default [
221
129
  `),
222
130
  new FN020001_RES_types_react('17.0.45'),
223
131
  new FN021001_PKG_main(false),
224
- new FN021004_PKG_scripts_build('heft test --clean'),
132
+ new FN021004_PKG_scripts_build('heft build --clean'),
225
133
  new FN021005_PKG_scripts_test('heft test'),
226
134
  new FN021006_PKG_scripts_clean('heft clean'),
227
135
  new FN021007_PKG_scripts_deploy('heft dev-deploy'),
@@ -230,12 +138,19 @@ export default [
230
138
  new FN021010_PKG_scripts_package_solution('heft package-solution'),
231
139
  new FN021011_PKG_scripts_deploy_azure_storage('heft deploy-azure-storage'),
232
140
  new FN021012_PKG_scripts_eject_webpack('heft eject-webpack'),
233
- new FN021013_PKG_overrides_rushstack_heft('0.73.6'),
141
+ new FN021013_PKG_overrides_rushstack_heft('1.1.2'),
142
+ new FN021014_PKG_scripts_test_only('heft run --only test --'),
143
+ new FN021015_PKG_scripts_trust_dev_cert('heft trust-dev-cert'),
144
+ new FN021016_PKG_scripts_untrust_dev_cert('heft untrust-dev-cert'),
234
145
  new FN023003_GITIGNORE_libdts(),
235
146
  new FN023004_GITIGNORE_libcommonjs(),
236
147
  new FN023005_GITIGNORE_libesm(),
237
148
  new FN023006_GITIGNORE_jestoutput(),
149
+ new FN025002_ESLINTRCJS_rushstack_import_requires_chunk_name(),
150
+ new FN025003_ESLINTRCJS_rushstack_pair_react_dom_render_unmount(),
151
+ new FN025004_ESLINTRCJS_microsoft_spfx_import_requires_chunk_name(),
152
+ new FN025005_ESLINTRCJS_microsoft_spfx_pair_react_dom_render_unmount(),
238
153
  new FN026001_CFG_SASS_schema('https://developer.microsoft.com/json-schemas/heft/v0/heft-sass-plugin.schema.json'),
239
154
  new FN026002_CFG_SASS_extends('@microsoft/spfx-web-build-rig/profiles/default/config/sass.json')
240
155
  ];
241
- //# sourceMappingURL=upgrade-1.22.0-beta.1.js.map
156
+ //# sourceMappingURL=upgrade-1.22.0-rc.0.js.map
@@ -85,7 +85,7 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
85
85
  '1.20.0',
86
86
  '1.21.0',
87
87
  '1.21.1',
88
- '1.22.0-beta.1'
88
+ '1.22.0-rc.0'
89
89
  ];
90
90
  }
91
91
  async commandAction(logger, args) {
@@ -621,15 +621,15 @@ class SpfxDoctorCommand extends BaseProjectCommand {
621
621
  fix: 'npm i -g yo@5'
622
622
  }
623
623
  },
624
- '1.22.0-beta.1': {
624
+ '1.22.0-rc.0': {
625
625
  node: {
626
626
  range: '>=22.14.0 < 23.0.0',
627
627
  fix: 'Install Node.js >=22.14.0 < 23.0.0'
628
628
  },
629
629
  sp: SharePointVersion.SPO,
630
630
  yo: {
631
- range: '^4 || ^5',
632
- fix: 'npm i -g yo@5'
631
+ range: '^4 || ^5 || ^6',
632
+ fix: 'npm i -g yo@6'
633
633
  }
634
634
  }
635
635
  };
@@ -29,6 +29,7 @@ class SpoApplicationCustomizerAddCommand extends SpoCommand {
29
29
  const requestBody = {
30
30
  Title: args.options.title,
31
31
  Name: args.options.title,
32
+ Description: args.options.description,
32
33
  Location: 'ClientSideExtension.ApplicationCustomizer',
33
34
  ClientSideComponentId: args.options.clientSideComponentId
34
35
  };
@@ -54,6 +55,8 @@ _a = SpoApplicationCustomizerAddCommand, _SpoApplicationCustomizerAddCommand_ins
54
55
  option: '-u, --webUrl <webUrl>'
55
56
  }, {
56
57
  option: '-i, --clientSideComponentId <clientSideComponentId>'
58
+ }, {
59
+ option: '--description [description]'
57
60
  }, {
58
61
  option: '--clientSideComponentProperties [clientSideComponentProperties]'
59
62
  }, {
@@ -62,6 +65,7 @@ _a = SpoApplicationCustomizerAddCommand, _SpoApplicationCustomizerAddCommand_ins
62
65
  }, _SpoApplicationCustomizerAddCommand_initTelemetry = function _SpoApplicationCustomizerAddCommand_initTelemetry() {
63
66
  this.telemetry.push((args) => {
64
67
  Object.assign(this.telemetryProperties, {
68
+ description: typeof args.options.description !== 'undefined',
65
69
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
66
70
  scope: typeof args.options.scope !== 'undefined'
67
71
  });
@@ -37,7 +37,7 @@ class SpoApplicationCustomizerSetCommand extends SpoCommand {
37
37
  }
38
38
  }
39
39
  async updateAppCustomizer(logger, options, appCustomizer) {
40
- const { clientSideComponentProperties, webUrl, newTitle } = options;
40
+ const { clientSideComponentProperties, webUrl, newTitle, description } = options;
41
41
  if (this.verbose) {
42
42
  await logger.logToStderr(`Updating application customizer with ID '${appCustomizer.Id}' on the site '${webUrl}'...`);
43
43
  }
@@ -45,6 +45,9 @@ class SpoApplicationCustomizerSetCommand extends SpoCommand {
45
45
  if (newTitle) {
46
46
  requestBody.Title = newTitle;
47
47
  }
48
+ if (description !== undefined) {
49
+ requestBody.Description = description;
50
+ }
48
51
  if (clientSideComponentProperties !== undefined) {
49
52
  requestBody.ClientSideComponentProperties = clientSideComponentProperties;
50
53
  }
@@ -99,6 +102,8 @@ _SpoApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoApplicationCu
99
102
  option: '-c, --clientSideComponentId [clientSideComponentId]'
100
103
  }, {
101
104
  option: '--newTitle [newTitle]'
105
+ }, {
106
+ option: '--description [description]'
102
107
  }, {
103
108
  option: '-p, --clientSideComponentProperties [clientSideComponentProperties]'
104
109
  }, {
@@ -111,6 +116,7 @@ _SpoApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoApplicationCu
111
116
  id: typeof args.options.id !== 'undefined',
112
117
  clientSideComponentId: typeof args.options.clientSideComponentId !== 'undefined',
113
118
  newTitle: typeof args.options.newTitle !== 'undefined',
119
+ description: typeof args.options.description !== 'undefined',
114
120
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
115
121
  scope: typeof args.options.scope !== 'undefined'
116
122
  });
@@ -126,7 +132,7 @@ _SpoApplicationCustomizerSetCommand_instances = new WeakSet(), _SpoApplicationCu
126
132
  if (args.options.scope && this.allowedScopes.indexOf(args.options.scope) === -1) {
127
133
  return `'${args.options.scope}' is not a valid application customizer scope. Allowed values are: ${this.allowedScopes.join(',')}`;
128
134
  }
129
- if (!args.options.newTitle && !args.options.clientSideComponentProperties) {
135
+ if (!args.options.newTitle && args.options.description === undefined && !args.options.clientSideComponentProperties) {
130
136
  return `Please specify an option to be updated`;
131
137
  }
132
138
  return validation.isValidSharePointUrl(args.options.webUrl);
@@ -34,6 +34,7 @@ class SpoCommandSetAddCommand extends SpoCommand {
34
34
  try {
35
35
  const requestBody = {
36
36
  Title: args.options.title,
37
+ Description: args.options.description,
37
38
  Location: location,
38
39
  ClientSideComponentId: args.options.clientSideComponentId,
39
40
  RegistrationId: listType,
@@ -81,6 +82,7 @@ class SpoCommandSetAddCommand extends SpoCommand {
81
82
  _a = SpoCommandSetAddCommand, _SpoCommandSetAddCommand_instances = new WeakSet(), _SpoCommandSetAddCommand_initTelemetry = function _SpoCommandSetAddCommand_initTelemetry() {
82
83
  this.telemetry.push((args) => {
83
84
  Object.assign(this.telemetryProperties, {
85
+ description: typeof args.options.description !== 'undefined',
84
86
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
85
87
  scope: typeof args.options.scope !== 'undefined',
86
88
  location: typeof args.options.location !== 'undefined'
@@ -95,6 +97,8 @@ _a = SpoCommandSetAddCommand, _SpoCommandSetAddCommand_instances = new WeakSet()
95
97
  option: '-l, --listType <listType>', autocomplete: _a.listTypes
96
98
  }, {
97
99
  option: '-i, --clientSideComponentId <clientSideComponentId>'
100
+ }, {
101
+ option: '--description [description]'
98
102
  }, {
99
103
  option: '--clientSideComponentProperties [clientSideComponentProperties]'
100
104
  }, {
@@ -39,6 +39,9 @@ class SpoCommandSetSetCommand extends SpoCommand {
39
39
  if (args.options.newTitle) {
40
40
  requestBody.Title = args.options.newTitle;
41
41
  }
42
+ if (args.options.description !== undefined) {
43
+ requestBody.Description = args.options.description;
44
+ }
42
45
  if (args.options.location) {
43
46
  requestBody.Location = location;
44
47
  }
@@ -118,6 +121,8 @@ _a = SpoCommandSetSetCommand, _SpoCommandSetSetCommand_instances = new WeakSet()
118
121
  id: typeof args.options.id !== 'undefined',
119
122
  clientSideComponentId: typeof args.options.clientSideComponentId !== 'undefined',
120
123
  newClientSideComponentId: typeof args.options.newClientSideComponentId !== 'undefined',
124
+ newTitle: typeof args.options.newTitle !== 'undefined',
125
+ description: typeof args.options.description !== 'undefined',
121
126
  listType: typeof args.options.listType !== 'undefined',
122
127
  clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
123
128
  scope: typeof args.options.scope !== 'undefined',
@@ -137,6 +142,8 @@ _a = SpoCommandSetSetCommand, _SpoCommandSetSetCommand_instances = new WeakSet()
137
142
  option: '--newClientSideComponentId [newClientSideComponentId]'
138
143
  }, {
139
144
  option: '--newTitle [newTitle]'
145
+ }, {
146
+ option: '--description [description]'
140
147
  }, {
141
148
  option: '-l, --listType [listType]', autocomplete: _a.listTypes
142
149
  }, {
@@ -166,7 +173,7 @@ _a = SpoCommandSetSetCommand, _SpoCommandSetSetCommand_instances = new WeakSet()
166
173
  if (args.options.location && _a.locations.indexOf(args.options.location) < 0) {
167
174
  return `${args.options.location} is not a valid location. Allowed values are ${_a.locations.join(', ')}`;
168
175
  }
169
- if (!args.options.newTitle && !args.options.listType && !args.options.clientSideComponentProperties && !args.options.location && !args.options.newClientSideComponentId) {
176
+ if (!args.options.newTitle && args.options.description === undefined && !args.options.listType && !args.options.clientSideComponentProperties && !args.options.location && !args.options.newClientSideComponentId) {
170
177
  return `Please specify option to be updated`;
171
178
  }
172
179
  return validation.isValidSharePointUrl(args.options.webUrl);
@@ -0,0 +1,69 @@
1
+ import commands from '../../commands.js';
2
+ import SpoCommand from '../../../base/SpoCommand.js';
3
+ import { globalOptionsZod } from '../../../../Command.js';
4
+ import { z } from 'zod';
5
+ import { zod } from '../../../../utils/zod.js';
6
+ import { validation } from '../../../../utils/validation.js';
7
+ import request from '../../../../request.js';
8
+ export const options = globalOptionsZod
9
+ .extend({
10
+ siteUrl: zod.alias('u', z.string()
11
+ .refine(url => validation.isValidSharePointUrl(url) === true, url => ({
12
+ message: `'${url}' is not a valid SharePoint Online site URL.`
13
+ })))
14
+ })
15
+ .strict();
16
+ class SpoSiteVersionpolicyGetCommand extends SpoCommand {
17
+ get name() {
18
+ return commands.SITE_VERSIONPOLICY_GET;
19
+ }
20
+ get description() {
21
+ return 'Retrieves the version policy settings of a specific site';
22
+ }
23
+ get schema() {
24
+ return options;
25
+ }
26
+ async commandAction(logger, args) {
27
+ if (this.verbose) {
28
+ await logger.logToStderr(`Retrieving version policy settings for site '${args.options.siteUrl}'...`);
29
+ }
30
+ try {
31
+ const requestOptions = {
32
+ url: `${args.options.siteUrl}/_api/site/VersionPolicyForNewLibrariesTemplate?$expand=VersionPolicies`,
33
+ headers: {
34
+ accept: 'application/json;odata=nometadata'
35
+ },
36
+ responseType: 'json'
37
+ };
38
+ const response = await request.get(requestOptions);
39
+ let defaultTrimMode = 'number';
40
+ if (response.MajorVersionLimit === -1) {
41
+ defaultTrimMode = 'inheritTenant';
42
+ }
43
+ else if (response.VersionPolicies) {
44
+ switch (response.VersionPolicies.DefaultTrimMode) {
45
+ case 1:
46
+ defaultTrimMode = 'age';
47
+ break;
48
+ case 2:
49
+ defaultTrimMode = 'automatic';
50
+ break;
51
+ case 0:
52
+ default:
53
+ defaultTrimMode = 'number';
54
+ }
55
+ }
56
+ const output = {
57
+ defaultTrimMode: defaultTrimMode,
58
+ defaultExpireAfterDays: response.VersionPolicies?.DefaultExpireAfterDays ?? null,
59
+ majorVersionLimit: response.MajorVersionLimit
60
+ };
61
+ await logger.log(output);
62
+ }
63
+ catch (err) {
64
+ this.handleRejectedODataJsonPromise(err);
65
+ }
66
+ }
67
+ }
68
+ export default new SpoSiteVersionpolicyGetCommand();
69
+ //# sourceMappingURL=site-versionpolicy-get.js.map
@@ -285,6 +285,7 @@ export default {
285
285
  SITE_RENAME: `${prefix} site rename`,
286
286
  SITE_SET: `${prefix} site set`,
287
287
  SITE_SHARINGPERMISSION_SET: `${prefix} site sharingpermission set`,
288
+ SITE_VERSIONPOLICY_GET: `${prefix} site versionpolicy get`,
288
289
  SITE_CHROME_SET: `${prefix} site chrome set`,
289
290
  SITE_UNARCHIVE: `${prefix} site unarchive`,
290
291
  SITEDESIGN_ADD: `${prefix} sitedesign add`,
@@ -8,8 +8,7 @@ import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from "../../../base/GraphCommand.js";
10
10
  import commands from '../../commands.js';
11
- import { cli } from '../../../../cli/cli.js';
12
- import { formatting } from '../../../../utils/formatting.js';
11
+ import { teams } from '../../../../utils/teams.js';
13
12
  class TeamsChannelAddCommand extends GraphCommand {
14
13
  get name() {
15
14
  return commands.CHANNEL_ADD;
@@ -25,30 +24,21 @@ class TeamsChannelAddCommand extends GraphCommand {
25
24
  __classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initValidators).call(this);
26
25
  __classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initOptionSets).call(this);
27
26
  }
27
+ async commandAction(logger, args) {
28
+ try {
29
+ const teamId = await this.getTeamId(args);
30
+ const res = await this.createChannel(args, teamId);
31
+ await logger.log(res);
32
+ }
33
+ catch (err) {
34
+ this.handleRejectedODataJsonPromise(err);
35
+ }
36
+ }
28
37
  async getTeamId(args) {
29
38
  if (args.options.teamId) {
30
39
  return args.options.teamId;
31
40
  }
32
- const teamRequestOptions = {
33
- url: `${this.resource}/v1.0/me/joinedTeams`,
34
- headers: {
35
- accept: 'application/json;odata.metadata=none'
36
- },
37
- responseType: 'json'
38
- };
39
- const response = await request.get(teamRequestOptions);
40
- const matchingTeams = response.value
41
- .filter(team => team.displayName === args.options.teamName)
42
- .map(team => team.id);
43
- if (matchingTeams.length < 1) {
44
- throw `The specified team does not exist in the Microsoft Teams`;
45
- }
46
- if (matchingTeams.length > 1) {
47
- const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
48
- const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Teams teams with name ${args.options.teamName} found.`, resultAsKeyValuePair);
49
- return result.id;
50
- }
51
- return matchingTeams[0];
41
+ return await teams.getTeamIdByDisplayName(args.options.teamName);
52
42
  }
53
43
  async createChannel(args, teamId) {
54
44
  const requestOptions = {
@@ -68,23 +58,13 @@ class TeamsChannelAddCommand extends GraphCommand {
68
58
  requestOptions.data.members = [
69
59
  {
70
60
  '@odata.type': '#microsoft.graph.aadUserConversationMember',
71
- 'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${args.options.owner}')`,
61
+ 'user@odata.bind': `${this.resource}/v1.0/users('${args.options.owner}')`,
72
62
  roles: ['owner']
73
63
  }
74
64
  ];
75
65
  }
76
66
  return request.post(requestOptions);
77
67
  }
78
- async commandAction(logger, args) {
79
- try {
80
- const teamId = await this.getTeamId(args);
81
- const res = await this.createChannel(args, teamId);
82
- await logger.log(res);
83
- }
84
- catch (err) {
85
- this.handleRejectedODataJsonPromise(err);
86
- }
87
- }
88
68
  }
89
69
  _TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initTelemetry = function _TeamsChannelAddCommand_initTelemetry() {
90
70
  this.telemetry.push((args) => {
@@ -24,6 +24,25 @@ m365 entra groupsettingtemplate get [options]
24
24
 
25
25
  <Global />
26
26
 
27
+ ## Permissions
28
+
29
+ <Tabs>
30
+ <TabItem value="Delegated">
31
+
32
+ | Resource | Permissions |
33
+ |------------------|------------------------|
34
+ | Microsoft Graph | GroupSettings.Read.All |
35
+
36
+ </TabItem>
37
+ <TabItem value="Application">
38
+
39
+ | Resource | Permissions |
40
+ |------------------|------------------------|
41
+ | Microsoft Graph | GroupSettings.Read.All |
42
+
43
+ </TabItem>
44
+ </Tabs>
45
+
27
46
  ## Examples
28
47
 
29
48
  Get information about the group setting template with id _62375ab9-6b52-47ed-826b-58e47e0e304b_
@@ -97,4 +116,4 @@ m365 entra groupsettingtemplate get --displayName Group.Unified
97
116
  ```
98
117
 
99
118
  </TabItem>
100
- </Tabs>
119
+ </Tabs>
@@ -16,6 +16,27 @@ m365 entra groupsettingtemplate list [options]
16
16
 
17
17
  <Global />
18
18
 
19
+ ## Permissions
20
+
21
+ ## Permissions
22
+
23
+ <Tabs>
24
+ <TabItem value="Delegated">
25
+
26
+ | Resource | Permissions |
27
+ |------------------|------------------------|
28
+ | Microsoft Graph | GroupSettings.Read.All |
29
+
30
+ </TabItem>
31
+ <TabItem value="Application">
32
+
33
+ | Resource | Permissions |
34
+ |------------------|------------------------|
35
+ | Microsoft Graph | GroupSettings.Read.All |
36
+
37
+ </TabItem>
38
+ </Tabs>
39
+
19
40
  ## Examples
20
41
 
21
42
  List all group setting templates in the tenant
@@ -83,4 +104,4 @@ m365 entra groupsettingtemplate list
83
104
  ```
84
105
 
85
106
  </TabItem>
86
- </Tabs>
107
+ </Tabs>
@@ -22,6 +22,9 @@ m365 spo applicationcustomizer add [options]
22
22
  `-i, --clientSideComponentId <clientSideComponentId>`
23
23
  : Client-side component ID of the application customizer (GUID).
24
24
 
25
+ `--description [description]`
26
+ : Description of the application customizer.
27
+
25
28
  `--clientSideComponentProperties [clientSideComponentProperties]`
26
29
  : JSON string with application customizer properties.
27
30