@pnp/cli-microsoft365 11.1.0-beta.317d8bb → 11.1.0-beta.734344f

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 (100) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +10 -7
  4. package/dist/Command.js +2 -2
  5. package/dist/auth/msalCachePlugin.js +6 -2
  6. package/dist/autocomplete.js +6 -2
  7. package/dist/chili/chili.js +2 -1
  8. package/dist/cli/cli.js +4 -2
  9. package/dist/config.js +0 -1
  10. package/dist/m365/adaptivecard/commands/adaptivecard-send.js +2 -2
  11. package/dist/m365/app/commands/permission/permission-list.js +4 -2
  12. package/dist/m365/booking/commands/business/business-list.js +5 -0
  13. package/dist/m365/commands/setup.js +6 -3
  14. package/dist/m365/commands/status.js +5 -1
  15. package/dist/m365/connection/commands/connection-list.js +5 -1
  16. package/dist/m365/entra/commands/app/app-role-add.js +1 -1
  17. package/dist/m365/entra/commands/group/group-add.js +1 -1
  18. package/dist/m365/entra/commands/group/group-set.js +1 -1
  19. package/dist/m365/entra/commands/m365group/m365group-add.js +0 -1
  20. package/dist/m365/file/commands/convert/convert-pdf.js +1 -6
  21. package/dist/m365/flow/commands/environment/environment-list.js +5 -0
  22. package/dist/m365/flow/commands/flow-export.js +8 -5
  23. package/dist/m365/flow/commands/run/run-get.js +3 -3
  24. package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +1 -1
  25. package/dist/m365/onedrive/commands/onedrive-list.js +5 -0
  26. package/dist/m365/outlook/commands/roomlist/roomlist-list.js +5 -0
  27. package/dist/m365/pa/commands/app/app-export.js +1 -1
  28. package/dist/m365/pa/commands/app/app-get.js +1 -1
  29. package/dist/m365/pa/commands/environment/environment-list.js +5 -0
  30. package/dist/m365/planner/commands/tenant/tenant-settings-list.js +5 -0
  31. package/dist/m365/pp/commands/environment/environment-list.js +10 -23
  32. package/dist/m365/pp/commands/solution/solution-publisher-get.js +1 -1
  33. package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +5 -0
  34. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +5 -0
  35. package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +5 -0
  36. package/dist/m365/spfx/commands/package/package-generate.js +3 -1
  37. package/dist/m365/spfx/commands/project/base-project-command.js +13 -5
  38. package/dist/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.js +1 -1
  39. package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +6 -4
  40. package/dist/m365/spfx/commands/project/project-model/ScssFile.js +3 -1
  41. package/dist/m365/spfx/commands/project/project-model/TsFile.js +6 -2
  42. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
  43. package/dist/m365/spfx/commands/spfx-doctor.js +5 -5
  44. package/dist/m365/spo/commands/file/file-add.js +4 -2
  45. package/dist/m365/spo/commands/file/file-rename.js +3 -4
  46. package/dist/m365/spo/commands/hubsite/hubsite-list.js +1 -1
  47. package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +1 -1
  48. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +9 -5
  49. package/dist/m365/spo/commands/page/clientsidepages.js +12 -12
  50. package/dist/m365/spo/commands/page/page-add.js +4 -2
  51. package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +1 -0
  52. package/dist/m365/spo/commands/page/page-set.js +4 -2
  53. package/dist/m365/spo/commands/page/page-text-add.js +1 -0
  54. package/dist/m365/spo/commands/propertybag/propertybag-base.js +34 -54
  55. package/dist/m365/spo/commands/theme/theme-apply.js +1 -1
  56. package/dist/m365/spo/commands/web/web-reindex.js +17 -27
  57. package/dist/m365/teams/commands/tab/tab-add.js +9 -3
  58. package/dist/m365/viva/commands/connections/connections-app-create.js +1 -1
  59. package/dist/m365/viva/commands/engage/engage-community-user-add.js +1 -1
  60. package/dist/m365/viva/commands/engage/engage-community-user-remove.js +1 -1
  61. package/dist/telemetry.js +3 -1
  62. package/dist/utils/accessToken.js +4 -0
  63. package/dist/utils/cache.js +3 -2
  64. package/dist/utils/customAppScope.js +1 -1
  65. package/dist/utils/directoryExtension.js +1 -1
  66. package/dist/utils/entraAdministrativeUnit.js +1 -1
  67. package/dist/utils/entraApp.js +2 -2
  68. package/dist/utils/entraDevice.js +1 -1
  69. package/dist/utils/entraServicePrincipal.js +2 -2
  70. package/dist/utils/formatting.js +1 -1
  71. package/dist/utils/md.js +2 -2
  72. package/dist/utils/odata.js +2 -0
  73. package/dist/utils/planner.js +1 -1
  74. package/dist/utils/powerPlatform.js +2 -2
  75. package/dist/utils/roleDefinition.js +2 -2
  76. package/dist/utils/spo.js +10 -11
  77. package/dist/utils/urlUtil.js +1 -1
  78. package/dist/utils/validation.js +1 -1
  79. package/dist/utils/vivaEngage.js +3 -3
  80. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +14 -0
  81. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +15 -0
  82. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +14 -0
  83. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-remove.mdx +14 -0
  84. package/docs/docs/cmd/entra/groupsetting/groupsetting-add.mdx +19 -0
  85. package/docs/docs/cmd/entra/groupsetting/groupsetting-get.mdx +19 -0
  86. package/docs/docs/cmd/entra/groupsetting/groupsetting-list.mdx +19 -0
  87. package/docs/docs/cmd/entra/groupsetting/groupsetting-remove.mdx +21 -0
  88. package/docs/docs/cmd/entra/groupsetting/groupsetting-set.mdx +21 -0
  89. package/docs/docs/cmd/entra/m365group/m365group-add.mdx +19 -0
  90. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +19 -0
  91. package/docs/docs/cmd/entra/m365group/m365group-list.mdx +19 -0
  92. package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +21 -0
  93. package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +21 -0
  94. package/docs/docs/cmd/entra/m365group/m365group-set.mdx +21 -0
  95. package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +19 -0
  96. package/eslint-rules/lib/rules/correct-command-class-name.js +18 -2
  97. package/eslint.config.mjs +270 -0
  98. package/npm-shrinkwrap.json +1117 -2277
  99. package/package.json +22 -21
  100. package/.eslintrc.cjs +0 -289
@@ -27,6 +27,25 @@ m365 entra m365group get [options]
27
27
 
28
28
  <Global />
29
29
 
30
+ ## Permissions
31
+
32
+ <Tabs>
33
+ <TabItem value="Delegated">
34
+
35
+ | Resource | Permissions |
36
+ |-----------------|----------------|
37
+ | Microsoft Graph | Group.Read.All |
38
+
39
+ </TabItem>
40
+ <TabItem value="Application">
41
+
42
+ | Resource | Permissions |
43
+ |-----------------|----------------|
44
+ | Microsoft Graph | Group.Read.All |
45
+
46
+ </TabItem>
47
+ </Tabs>
48
+
30
49
  ## Examples
31
50
 
32
51
  Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_.
@@ -30,6 +30,25 @@ m365 entra m365group list [options]
30
30
 
31
31
  <Global />
32
32
 
33
+ ## Permissions
34
+
35
+ <Tabs>
36
+ <TabItem value="Delegated">
37
+
38
+ | Resource | Permissions |
39
+ |-----------------|----------------|
40
+ | Microsoft Graph | Group.Read.All |
41
+
42
+ </TabItem>
43
+ <TabItem value="Application">
44
+
45
+ | Resource | Permissions |
46
+ |-----------------|----------------|
47
+ | Microsoft Graph | Group.Read.All |
48
+
49
+ </TabItem>
50
+ </Tabs>
51
+
33
52
  ## Remarks
34
53
 
35
54
  Using the `--withSiteUrl` option, you can retrieve the URL of the site associated with the particular Microsoft 365 Group. If you however retrieve too many groups and will try to get their site URLs, you will most likely get an error as the command will get throttled, issuing too many requests, too frequently. If you get an error, consider narrowing down the result set using the `--displayName` and `--mailNickname` filters.
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group remove
4
6
 
@@ -28,6 +30,25 @@ m365 entra m365group remove [options]
28
30
 
29
31
  <Global />
30
32
 
33
+ ## Permissions
34
+
35
+ <Tabs>
36
+ <TabItem value="Delegated">
37
+
38
+ | Resource | Permissions |
39
+ |-----------------|---------------------|
40
+ | Microsoft Graph | Group.ReadWrite.All |
41
+
42
+ </TabItem>
43
+ <TabItem value="Application">
44
+
45
+ | Resource | Permissions |
46
+ |-----------------|---------------------|
47
+ | Microsoft Graph | Group.ReadWrite.All |
48
+
49
+ </TabItem>
50
+ </Tabs>
51
+
31
52
  ## Remarks
32
53
 
33
54
  If the specified _id_ doesn't refer to an existing group, you will get a `Resource does not exist` error. Additionally, if you do not have access to the group or the associated group-connected site, you will get an `Access denied` error.
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group renew
4
6
 
@@ -22,6 +24,25 @@ m365 entra m365group renew [options]
22
24
 
23
25
  <Global />
24
26
 
27
+ ## Permissions
28
+
29
+ <Tabs>
30
+ <TabItem value="Delegated">
31
+
32
+ | Resource | Permissions |
33
+ |-----------------|---------------------|
34
+ | Microsoft Graph | Group.ReadWrite.All |
35
+
36
+ </TabItem>
37
+ <TabItem value="Application">
38
+
39
+ | Resource | Permissions |
40
+ |-----------------|---------------------|
41
+ | Microsoft Graph | Group.ReadWrite.All |
42
+
43
+ </TabItem>
44
+ </Tabs>
45
+
25
46
  ## Remarks
26
47
 
27
48
  If the specified _id_ doesn't refer to an existing group, you will get a `The remote server returned an error: (404) Not Found.` error.
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group set
4
6
 
@@ -58,6 +60,25 @@ m365 entra m365group set [options]
58
60
 
59
61
  <Global />
60
62
 
63
+ ## Permissions
64
+
65
+ <Tabs>
66
+ <TabItem value="Delegated">
67
+
68
+ | Resource | Permissions |
69
+ |-----------------|---------------------|
70
+ | Microsoft Graph | Group.ReadWrite.All |
71
+
72
+ </TabItem>
73
+ <TabItem value="Application">
74
+
75
+ | Resource | Permissions |
76
+ |-----------------|---------------------|
77
+ | Microsoft Graph | Group.ReadWrite.All |
78
+
79
+ </TabItem>
80
+ </Tabs>
81
+
61
82
  ## Remarks
62
83
 
63
84
  When updating group's owners and members, the command will remove existing owners/members from the group, and the specified users will be added.
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # entra m365group teamify
4
6
 
@@ -25,6 +27,23 @@ m365 entra m365group teamify [options]
25
27
 
26
28
  <Global />
27
29
 
30
+ <Tabs>
31
+ <TabItem value="Delegated">
32
+
33
+ | Resource | Permissions |
34
+ |-----------------|---------------------|
35
+ | Microsoft Graph | Group.ReadWrite.All |
36
+
37
+ </TabItem>
38
+ <TabItem value="Application">
39
+
40
+ | Resource | Permissions |
41
+ |-----------------|---------------------|
42
+ | Microsoft Graph | Group.ReadWrite.All |
43
+
44
+ </TabItem>
45
+ </Tabs>
46
+
28
47
  ## Examples
29
48
 
30
49
  Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified id.
@@ -42,7 +42,7 @@ function capitalizeWord(word, capitalized) {
42
42
  return word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase();
43
43
  }
44
44
 
45
- function breakWords(longWord, dictionary) {
45
+ function breakWords(longWord, dictionary) {
46
46
  const words = [];
47
47
  for (let i = 0; i < dictionary.length; i++) {
48
48
  if (longWord.indexOf(dictionary[i]) === 0) {
@@ -72,7 +72,23 @@ module.exports = {
72
72
  fixable: 'code',
73
73
  messages: {
74
74
  invalidName: "'{{ actualClassName }}' is not a valid command class name. Expected '{{ expectedClassName }}'"
75
- }
75
+ },
76
+ schema: [
77
+ {
78
+ type: 'array',
79
+ items: { type: 'string' },
80
+ uniqueItems: true,
81
+ title: 'dictionary',
82
+ description: 'List of known word parts used to break long command names into words.'
83
+ },
84
+ {
85
+ type: 'array',
86
+ items: { type: 'string' },
87
+ uniqueItems: true,
88
+ title: 'capitalized',
89
+ description: 'List of known word parts that should be capitalized.'
90
+ }
91
+ ]
76
92
  },
77
93
  create: context => {
78
94
  return {
@@ -0,0 +1,270 @@
1
+ import globals from 'globals';
2
+ import js from '@eslint/js';
3
+ import parser from '@typescript-eslint/parser';
4
+ import tsPlugin from '@typescript-eslint/eslint-plugin';
5
+ import mocha from 'eslint-plugin-mocha';
6
+ import stylistic from '@stylistic/eslint-plugin';
7
+ import cliM365 from './eslint-rules/lib/index.js';
8
+
9
+ // List of words used in command names used for word breaking
10
+ // Sorted alphabetically for easy maintenance
11
+ const dictionary = [
12
+ 'access',
13
+ 'activation',
14
+ 'activations',
15
+ 'adaptive',
16
+ 'administrative',
17
+ 'ai',
18
+ 'app',
19
+ 'application',
20
+ 'apply',
21
+ 'approve',
22
+ 'assessment',
23
+ 'assets',
24
+ 'assignment',
25
+ 'audit',
26
+ 'azure',
27
+ 'bin',
28
+ 'builder',
29
+ 'call',
30
+ 'card',
31
+ 'catalog',
32
+ 'checklist',
33
+ 'client',
34
+ 'comm',
35
+ 'command',
36
+ 'community',
37
+ 'container',
38
+ 'content',
39
+ 'conversation',
40
+ 'custom',
41
+ 'customizer',
42
+ 'dataverse',
43
+ 'default',
44
+ 'definition',
45
+ 'dev',
46
+ 'details',
47
+ 'directory',
48
+ 'eligibility',
49
+ 'enterprise',
50
+ 'entra',
51
+ 'event',
52
+ 'eventreceiver',
53
+ 'external',
54
+ 'externalize',
55
+ 'folder',
56
+ 'fun',
57
+ 'group',
58
+ 'groupify',
59
+ 'groupmembership',
60
+ 'guest',
61
+ 'health',
62
+ 'hide',
63
+ 'historical',
64
+ 'home',
65
+ 'hub',
66
+ 'in',
67
+ 'info',
68
+ 'inheritance',
69
+ 'init',
70
+ 'install',
71
+ 'installed',
72
+ 'is',
73
+ 'issue',
74
+ 'item',
75
+ 'label',
76
+ 'list',
77
+ 'link',
78
+ 'log',
79
+ 'login',
80
+ 'logout',
81
+ 'mailbox',
82
+ 'management',
83
+ 'member',
84
+ 'membership',
85
+ 'messaging',
86
+ 'model',
87
+ 'multitenant',
88
+ 'm365',
89
+ 'news',
90
+ 'oauth2',
91
+ 'office365',
92
+ 'one',
93
+ 'open',
94
+ 'ops',
95
+ 'org',
96
+ 'organization',
97
+ 'owner',
98
+ 'permission',
99
+ 'pim',
100
+ 'place',
101
+ 'policy',
102
+ 'profile',
103
+ 'pronouns',
104
+ 'property',
105
+ 'record',
106
+ 'records',
107
+ 'recycle',
108
+ 'registration',
109
+ 'request',
110
+ 'resolver',
111
+ 'retention',
112
+ 'revoke',
113
+ 'role',
114
+ 'room',
115
+ 'schema',
116
+ 'search',
117
+ 'sensitivity',
118
+ 'service',
119
+ 'session',
120
+ 'set',
121
+ 'setting',
122
+ 'settings',
123
+ 'setup',
124
+ 'sharing',
125
+ 'side',
126
+ 'site',
127
+ 'status',
128
+ 'storage',
129
+ 'table',
130
+ 'teams',
131
+ 'threat',
132
+ 'to',
133
+ 'todo',
134
+ 'token',
135
+ 'type',
136
+ 'unit',
137
+ 'url',
138
+ 'user',
139
+ 'value',
140
+ 'web',
141
+ 'webhook'
142
+ ];
143
+
144
+ // List of words that should be capitalized in a specific way
145
+ const capitalized = [
146
+ 'OAuth2'
147
+ ];
148
+
149
+ // Sort dictionary to put the longest words first
150
+ const sortedDictionary = dictionary.sort((a, b) => b.length - a.length);
151
+
152
+ export default [
153
+ // Ignored files
154
+ {
155
+ ignores: [
156
+ "**/package-generate/assets/**",
157
+ "**/test-projects/**",
158
+ "clientsidepages.ts",
159
+ "**/*.d.ts",
160
+ "**/*.js",
161
+ "**/*.cjs"
162
+ ]
163
+ },
164
+ // JS recommendations
165
+ js.configs.recommended,
166
+ {
167
+ plugins: { '@typescript-eslint': tsPlugin },
168
+ rules: tsPlugin.configs.recommended.rules
169
+ },
170
+ {
171
+ languageOptions: {
172
+ ecmaVersion: 2015,
173
+ sourceType: 'module',
174
+ parser: parser,
175
+ parserOptions: {
176
+ ecmaVersion: 2015,
177
+ sourceType: 'module',
178
+ project: './tsconfig.json'
179
+ },
180
+ globals: {
181
+ ...globals.node,
182
+ ...globals.commonjs,
183
+ ...globals.es2021,
184
+ ...globals.mocha,
185
+ NodeJS: 'readonly'
186
+ }
187
+ },
188
+ plugins: {
189
+ '@typescript-eslint': tsPlugin,
190
+ 'cli-microsoft365': cliM365,
191
+ '@stylistic': stylistic,
192
+ mocha
193
+ },
194
+ rules: {
195
+ 'cli-microsoft365/correct-command-class-name': ['error', sortedDictionary, capitalized],
196
+ 'cli-microsoft365/correct-command-name': 'error',
197
+ 'cli-microsoft365/no-by-server-relative-url-usage': 'error',
198
+ '@stylistic/indent': ['error', 2],
199
+ '@stylistic/semi': ['error'],
200
+ '@stylistic/comma-dangle': ['error', 'never'],
201
+ '@stylistic/brace-style': [
202
+ 'error',
203
+ 'stroustrup',
204
+ { allowSingleLine: true }
205
+ ],
206
+ '@typescript-eslint/no-explicit-any': 'off',
207
+ '@typescript-eslint/no-var-requires': 'off',
208
+ '@typescript-eslint/no-inferrable-types': 'off',
209
+ '@typescript-eslint/no-non-null-assertion': 'off',
210
+ '@typescript-eslint/explicit-module-boundary-types': [
211
+ 'error',
212
+ { allowArgumentsExplicitlyTypedAsAny: true }
213
+ ],
214
+ '@typescript-eslint/no-unused-vars': [
215
+ 'error',
216
+ { argsIgnorePattern: '^_' }
217
+ ],
218
+ camelcase: ['error', {
219
+ allow: [
220
+ 'child_process',
221
+ 'error_description',
222
+ '_Child_Items_',
223
+ '_Object_Type_',
224
+ 'FN\\d+',
225
+ 'OData__.*',
226
+ 'vti_.*',
227
+ 'Query.*',
228
+ 'app_displayname',
229
+ 'access_token',
230
+ 'expires_on',
231
+ 'extension_*'
232
+ ]
233
+ }],
234
+ curly: ['error', 'all'],
235
+ eqeqeq: ['error', 'always'],
236
+ '@typescript-eslint/naming-convention': [
237
+ 'error',
238
+ {
239
+ selector: ['method'],
240
+ format: ['camelCase']
241
+ }
242
+ ],
243
+ '@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
244
+ 'mocha/no-identical-title': 'error',
245
+ '@typescript-eslint/no-floating-promises': 'error',
246
+ '@typescript-eslint/no-empty-function': 'error'
247
+ }
248
+ },
249
+ {
250
+ files: ['**/*.spec.ts'],
251
+ rules: {
252
+ 'no-console': 'error',
253
+ '@typescript-eslint/no-empty-function': 'off',
254
+ 'cli-microsoft365/correct-command-class-name': 'off',
255
+ 'cli-microsoft365/correct-command-name': 'off'
256
+ }
257
+ },
258
+ {
259
+ files: ['**/viva/commands/engage/**'],
260
+ rules: {
261
+ camelcase: 'off'
262
+ }
263
+ },
264
+ {
265
+ files: ['**/*.mjs'],
266
+ rules: {
267
+ '@typescript-eslint/explicit-function-return-type': 'off'
268
+ }
269
+ }
270
+ ];