@pnp/cli-microsoft365 4.1.0-beta.8f25ee2 → 4.2.0-beta.148750f

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 (27) hide show
  1. package/README.md +6 -5
  2. package/dist/cli/Cli.js +1 -1
  3. package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +5 -8
  4. package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +6 -3
  5. package/dist/m365/aad/commands/oauth2grant/oauth2grant-set.js +3 -3
  6. package/dist/m365/aad/commands/sp/sp-get.js +44 -21
  7. package/dist/m365/pa/commands/connector/connector-export.js +2 -2
  8. package/dist/m365/spfx/commands/project/project-upgrade/Utils.js +1 -1
  9. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7.js +2 -2
  10. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9.js +17 -0
  11. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015007_FILE_config_copy_assets_json.js +17 -0
  12. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.13.0-beta.20.js → upgrade-1.13.0.js} +43 -25
  13. package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
  14. package/dist/m365/spo/commands/contenttype/contenttype-add.js +21 -1
  15. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +90 -0
  16. package/dist/m365/spo/commands.js +1 -0
  17. package/dist/m365/teams/commands/report/report-pstncalls.js +1 -1
  18. package/dist/m365/teams/commands/user/user-app-list.js +8 -6
  19. package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.md +2 -1
  20. package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.md +3 -2
  21. package/docs/docs/cmd/aad/sp/sp-get.md +2 -1
  22. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  23. package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +39 -0
  24. package/docs/docs/cmd/teams/report/report-pstncalls.md +4 -3
  25. package/npm-shrinkwrap.json +485 -481
  26. package/package.json +19 -20
  27. package/dist/m365/teams/UserTeamsApp.js +0 -3
package/README.md CHANGED
@@ -82,6 +82,7 @@
82
82
  - Supported authentication methods
83
83
  - Azure Managed Identity
84
84
  - Certificate
85
+ - Client Secret
85
86
  - Device Code
86
87
  - Username and Password
87
88
  - Manage your SharePoint Framework projects
@@ -156,22 +157,22 @@ Get command information and example usage using the global `--help` option.
156
157
  m365 spo site get --help
157
158
  ```
158
159
 
159
- Execute a command and output response as text.
160
+ Execute a command and output response as JSON.
160
161
 
161
162
  ```sh
162
163
  m365 spo site get --url https://contoso.sharepoint.com
163
164
  ```
164
165
 
165
- Execute a command and output response as JSON using the global `--output` option.
166
+ Filter responses and return custom objects using [JMESPath](https://jmespath.org/) queries using the global `--query` option.
166
167
 
167
168
  ```sh
168
- m365 spo site get --url https://contoso.sharepoint.com --output json
169
+ m365 spo site list --query '[?Template==`GROUP#0`].{Title:Title, Url:Url}'
169
170
  ```
170
171
 
171
- Filter responses and return custom objects using [JMESPath](https://jmespath.org/) queries using the global `--query` option.
172
+ Execute a command and output response as text using the global `--output` option.
172
173
 
173
174
  ```sh
174
- m365 spo site list --output json --query '[?Template==`GROUP#0`].{Title:Title, Url:Url}'
175
+ m365 spo site get --url https://contoso.sharepoint.com --output text
175
176
  ```
176
177
 
177
178
  > For more examples and usage, refer to the [command](https://pnp.github.io/cli-microsoft365/cmd/login/) and [sample scripts](https://pnp.github.io/cli-microsoft365/sample-scripts/) documentation.
package/dist/cli/Cli.js CHANGED
@@ -369,7 +369,7 @@ class Cli {
369
369
  // know this in order to decide if we should use default command's
370
370
  // properties or custom ones from JMESPath
371
371
  const originalObject = Array.isArray(logStatement) ? Cli.getFirstNonUndefinedArrayItem(logStatement) : logStatement;
372
- const originalProperties = originalObject ? Object.getOwnPropertyNames(originalObject) : [];
372
+ const originalProperties = originalObject && typeof originalObject !== 'string' ? Object.getOwnPropertyNames(originalObject) : [];
373
373
  if (options.query &&
374
374
  !options.help) {
375
375
  const jmespath = require('jmespath');
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const request_1 = require("../../../../request");
4
4
  const Utils_1 = require("../../../../Utils");
5
- const AadCommand_1 = require("../../../base/AadCommand");
5
+ const GraphCommand_1 = require("../../../base/GraphCommand");
6
6
  const commands_1 = require("../../commands");
7
- class AadOAuth2GrantAddCommand extends AadCommand_1.default {
7
+ class AadOAuth2GrantAddCommand extends GraphCommand_1.default {
8
8
  get name() {
9
9
  return commands_1.default.OAUTH2GRANT_ADD;
10
10
  }
@@ -16,20 +16,17 @@ class AadOAuth2GrantAddCommand extends AadCommand_1.default {
16
16
  logger.logToStderr(`Granting the service principal specified permissions...`);
17
17
  }
18
18
  const requestOptions = {
19
- url: `${this.resource}/myorganization/oauth2PermissionGrants?api-version=1.6`,
19
+ url: `${this.resource}/v1.0/oauth2PermissionGrants`,
20
20
  headers: {
21
- 'content-type': 'application/json'
21
+ 'content-type': 'application/json;odata.metadata=none'
22
22
  },
23
23
  responseType: 'json',
24
24
  data: {
25
- "odata.type": "Microsoft.DirectoryServices.OAuth2PermissionGrant",
26
25
  "clientId": args.options.clientId,
27
26
  "consentType": "AllPrincipals",
28
27
  "principalId": null,
29
28
  "resourceId": args.options.resourceId,
30
- "scope": args.options.scope,
31
- "startTime": "0001-01-01T00:00:00",
32
- "expiryTime": "9000-01-01T00:00:00"
29
+ "scope": args.options.scope
33
30
  }
34
31
  };
35
32
  request_1.default
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const request_1 = require("../../../../request");
4
- const AadCommand_1 = require("../../../base/AadCommand");
4
+ const GraphCommand_1 = require("../../../base/GraphCommand");
5
5
  const commands_1 = require("../../commands");
6
- class AadOAuth2GrantRemoveCommand extends AadCommand_1.default {
6
+ class AadOAuth2GrantRemoveCommand extends GraphCommand_1.default {
7
7
  get name() {
8
8
  return commands_1.default.OAUTH2GRANT_REMOVE;
9
9
  }
@@ -15,7 +15,10 @@ class AadOAuth2GrantRemoveCommand extends AadCommand_1.default {
15
15
  logger.logToStderr(`Removing OAuth2 permissions...`);
16
16
  }
17
17
  const requestOptions = {
18
- url: `${this.resource}/myorganization/oauth2PermissionGrants/${encodeURIComponent(args.options.grantId)}?api-version=1.6`,
18
+ url: `${this.resource}/v1.0/oauth2PermissionGrants/${encodeURIComponent(args.options.grantId)}`,
19
+ headers: {
20
+ 'accept': 'application/json;odata.metadata=none'
21
+ },
19
22
  responseType: 'json'
20
23
  };
21
24
  request_1.default
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const request_1 = require("../../../../request");
4
- const AadCommand_1 = require("../../../base/AadCommand");
4
+ const GraphCommand_1 = require("../../../base/GraphCommand");
5
5
  const commands_1 = require("../../commands");
6
- class AadOAuth2GrantSetCommand extends AadCommand_1.default {
6
+ class AadOAuth2GrantSetCommand extends GraphCommand_1.default {
7
7
  get name() {
8
8
  return commands_1.default.OAUTH2GRANT_SET;
9
9
  }
@@ -15,7 +15,7 @@ class AadOAuth2GrantSetCommand extends AadCommand_1.default {
15
15
  logger.logToStderr(`Updating OAuth2 permissions...`);
16
16
  }
17
17
  const requestOptions = {
18
- url: `${this.resource}/myorganization/oauth2PermissionGrants/${encodeURIComponent(args.options.grantId)}?api-version=1.6`,
18
+ url: `${this.resource}/v1.0/oauth2PermissionGrants/${encodeURIComponent(args.options.grantId)}`,
19
19
  headers: {
20
20
  'content-type': 'application/json'
21
21
  },
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const request_1 = require("../../../../request");
4
4
  const Utils_1 = require("../../../../Utils");
5
- const AadCommand_1 = require("../../../base/AadCommand");
5
+ const GraphCommand_1 = require("../../../base/GraphCommand");
6
6
  const commands_1 = require("../../commands");
7
- class AadSpGetCommand extends AadCommand_1.default {
7
+ class AadSpGetCommand extends GraphCommand_1.default {
8
8
  get name() {
9
9
  return commands_1.default.SP_GET;
10
10
  }
@@ -18,35 +18,58 @@ class AadSpGetCommand extends AadCommand_1.default {
18
18
  telemetryProps.objectId = (!(!args.options.objectId)).toString();
19
19
  return telemetryProps;
20
20
  }
21
- commandAction(logger, args, cb) {
22
- if (this.verbose) {
23
- logger.logToStderr(`Retrieving service principal information...`);
21
+ getSpId(args) {
22
+ if (args.options.objectId) {
23
+ return Promise.resolve(args.options.objectId);
24
24
  }
25
25
  let spMatchQuery = '';
26
- if (args.options.appId) {
27
- spMatchQuery = `appId eq '${encodeURIComponent(args.options.appId)}'`;
28
- }
29
- else if (args.options.objectId) {
30
- spMatchQuery = `objectId eq '${encodeURIComponent(args.options.objectId)}'`;
31
- }
32
- else {
26
+ if (args.options.displayName) {
33
27
  spMatchQuery = `displayName eq '${encodeURIComponent(args.options.displayName)}'`;
34
28
  }
35
- const requestOptions = {
36
- url: `${this.resource}/myorganization/servicePrincipals?api-version=1.6&$filter=${spMatchQuery}`,
29
+ else if (args.options.appId) {
30
+ spMatchQuery = `appId eq '${encodeURIComponent(args.options.appId)}'`;
31
+ }
32
+ const idRequestOptions = {
33
+ url: `${this.resource}/v1.0/servicePrincipals?$filter=${spMatchQuery}`,
37
34
  headers: {
38
- accept: 'application/json;odata=nometadata'
35
+ accept: 'application/json;odata.metadata=none'
39
36
  },
40
37
  responseType: 'json'
41
38
  };
42
- request_1.default
43
- .get(requestOptions)
44
- .then((res) => {
45
- if (res.value && res.value.length > 0) {
46
- logger.log(res.value[0]);
39
+ return request_1.default
40
+ .get(idRequestOptions)
41
+ .then(response => {
42
+ const spItem = response.value[0];
43
+ if (!spItem) {
44
+ return Promise.reject(`The specified Azure AD app does not exist`);
45
+ }
46
+ if (response.value.length > 1) {
47
+ return Promise.reject(`Multiple Azure AD apps with name ${args.options.displayName} found: ${response.value.map(x => x.id)}`);
47
48
  }
49
+ return Promise.resolve(spItem.id);
50
+ });
51
+ }
52
+ commandAction(logger, args, cb) {
53
+ if (this.verbose) {
54
+ logger.logToStderr(`Retrieving service principal information...`);
55
+ }
56
+ this
57
+ .getSpId(args)
58
+ .then((id) => {
59
+ const requestOptions = {
60
+ url: `${this.resource}/v1.0/servicePrincipals/${id}`,
61
+ headers: {
62
+ accept: 'application/json;odata.metadata=none',
63
+ 'content-type': 'application/json;odata.metadata=none'
64
+ },
65
+ responseType: 'json'
66
+ };
67
+ return request_1.default.get(requestOptions);
68
+ })
69
+ .then((res) => {
70
+ logger.log(res);
48
71
  cb();
49
- }, (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
72
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
50
73
  }
51
74
  options() {
52
75
  const options = [
@@ -80,7 +80,7 @@ class PaConnectorExportCommand extends AzmgmtCommand_1.default {
80
80
  .get({
81
81
  url: connector.properties.apiDefinitions.originalSwaggerUrl,
82
82
  headers: {
83
- 'x-anonymous': true
83
+ 'x-anonymous': 'true'
84
84
  }
85
85
  });
86
86
  }
@@ -111,7 +111,7 @@ class PaConnectorExportCommand extends AzmgmtCommand_1.default {
111
111
  url: connector.properties.iconUri,
112
112
  responseType: 'arraybuffer',
113
113
  headers: {
114
- 'x-anonymous': true
114
+ 'x-anonymous': 'true'
115
115
  }
116
116
  });
117
117
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Utils = void 0;
4
4
  const fs = require("fs");
5
5
  const path = require("path");
6
- const stripJsonComments = require('strip-json-comments');
6
+ const stripJsonComments = require("strip-json-comments");
7
7
  class Utils {
8
8
  static removeSingleLineComments(s) {
9
9
  return stripJsonComments(s);
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7 = void 0;
4
4
  const DependencyRule_1 = require("./DependencyRule");
5
5
  class FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7 extends DependencyRule_1.DependencyRule {
6
- constructor(packageVersion) {
7
- super('@microsoft/rush-stack-compiler-3.7', packageVersion, true);
6
+ constructor(packageVersion, add = true) {
7
+ super('@microsoft/rush-stack-compiler-3.7', packageVersion, true, false, add);
8
8
  }
9
9
  get id() {
10
10
  return 'FN002017';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9 = void 0;
4
+ const DependencyRule_1 = require("./DependencyRule");
5
+ class FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9 extends DependencyRule_1.DependencyRule {
6
+ constructor(packageVersion) {
7
+ super('@microsoft/rush-stack-compiler-3.9', packageVersion, true);
8
+ }
9
+ get id() {
10
+ return 'FN002018';
11
+ }
12
+ get supersedes() {
13
+ return ['FN002010', 'FN002011', 'FN002012', 'FN002017'];
14
+ }
15
+ }
16
+ exports.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9 = FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9;
17
+ //# sourceMappingURL=FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9.js.map
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN015007_FILE_config_copy_assets_json = void 0;
4
+ const FileAddRemoveRule_1 = require("./FileAddRemoveRule");
5
+ class FN015007_FILE_config_copy_assets_json extends FileAddRemoveRule_1.FileAddRemoveRule {
6
+ constructor(add) {
7
+ super('./config/copy-assets.json', add);
8
+ }
9
+ get id() {
10
+ return 'FN015007';
11
+ }
12
+ get supersedes() {
13
+ return ['FN004001', 'FN004002'];
14
+ }
15
+ }
16
+ exports.FN015007_FILE_config_copy_assets_json = FN015007_FILE_config_copy_assets_json;
17
+ //# sourceMappingURL=FN015007_FILE_config_copy_assets_json.js.map
@@ -4,11 +4,14 @@ const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_m
4
4
  const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
5
5
  const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
6
6
  const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
7
+ const FN001008_DEP_react_1 = require("./rules/FN001008_DEP_react");
8
+ const FN001009_DEP_react_dom_1 = require("./rules/FN001009_DEP_react_dom");
7
9
  const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
8
10
  const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
9
11
  const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
10
12
  const FN001014_DEP_microsoft_sp_listview_extensibility_1 = require("./rules/FN001014_DEP_microsoft_sp_listview_extensibility");
11
13
  const FN001021_DEP_microsoft_sp_property_pane_1 = require("./rules/FN001021_DEP_microsoft_sp_property_pane");
14
+ const FN001022_DEP_office_ui_fabric_react_1 = require("./rules/FN001022_DEP_office_ui_fabric_react");
12
15
  const FN001023_DEP_microsoft_sp_component_base_1 = require("./rules/FN001023_DEP_microsoft_sp_component_base");
13
16
  const FN001024_DEP_microsoft_sp_diagnostics_1 = require("./rules/FN001024_DEP_microsoft_sp_diagnostics");
14
17
  const FN001025_DEP_microsoft_sp_dynamic_data_1 = require("./rules/FN001025_DEP_microsoft_sp_dynamic_data");
@@ -23,41 +26,56 @@ const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDE
23
26
  const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
24
27
  const FN002003_DEVDEP_microsoft_sp_webpart_workbench_1 = require("./rules/FN002003_DEVDEP_microsoft_sp_webpart_workbench");
25
28
  const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
29
+ const FN002015_DEVDEP_types_react_1 = require("./rules/FN002015_DEVDEP_types_react");
30
+ const FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1 = require("./rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7");
31
+ const FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1 = require("./rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9");
26
32
  const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
27
33
  const FN007002_CFG_S_initialPage_1 = require("./rules/FN007002_CFG_S_initialPage");
28
34
  const FN007003_CFG_S_api_1 = require("./rules/FN007003_CFG_S_api");
35
+ const FN008002_CFG_TSL_removeRule_1 = require("./rules/FN008002_CFG_TSL_removeRule");
29
36
  const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
37
+ const FN012017_TSC_extends_1 = require("./rules/FN012017_TSC_extends");
30
38
  const FN014007_CODE_launch_localWorkbench_1 = require("./rules/FN014007_CODE_launch_localWorkbench");
39
+ const FN015007_FILE_config_copy_assets_json_1 = require("./rules/FN015007_FILE_config_copy_assets_json");
31
40
  const FN024001_NPMIGNORE_file_1 = require("./rules/FN024001_NPMIGNORE_file");
32
41
  module.exports = [
33
- new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.13.0-beta.20'),
34
- new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.13.0-beta.20'),
35
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.13.0-beta.20'),
36
- new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.13.0-beta.20'),
37
- new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.13.0-beta.20'),
38
- new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.13.0-beta.20'),
39
- new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.13.0-beta.20'),
40
- new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.13.0-beta.20'),
41
- new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.13.0-beta.20'),
42
- new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.13.0-beta.20'),
43
- new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.13.0-beta.20'),
44
- new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.13.0-beta.20'),
45
- new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.13.0-beta.20'),
46
- new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.13.0-beta.20'),
47
- new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.13.0-beta.20'),
48
- new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.13.0-beta.20'),
49
- new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.13.0-beta.20'),
50
- new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.13.0-beta.20'),
51
- new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.13.0-beta.20'),
52
- new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.13.0-beta.20'),
53
- new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.13.0-beta.20'),
42
+ new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.13.0'),
43
+ new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.13.0'),
44
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.13.0'),
45
+ new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.13.0'),
46
+ new FN001008_DEP_react_1.FN001008_DEP_react('16.13.1'),
47
+ new FN001009_DEP_react_dom_1.FN001009_DEP_react_dom('16.13.1'),
48
+ new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.13.0'),
49
+ new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.13.0'),
50
+ new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.13.0'),
51
+ new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.13.0'),
52
+ new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.13.0'),
53
+ new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.174.1'),
54
+ new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.13.0'),
55
+ new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.13.0'),
56
+ new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.13.0'),
57
+ new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.13.0'),
58
+ new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.13.0'),
59
+ new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.13.0'),
60
+ new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.13.0'),
61
+ new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.13.0'),
62
+ new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.13.0'),
63
+ new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.13.0'),
64
+ new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.13.0'),
65
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.13.0'),
54
66
  new FN002003_DEVDEP_microsoft_sp_webpart_workbench_1.FN002003_DEVDEP_microsoft_sp_webpart_workbench('', false),
55
- new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.13.0-beta.20'),
56
- new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.13.0-beta.20'),
67
+ new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.13.0'),
68
+ new FN002015_DEVDEP_types_react_1.FN002015_DEVDEP_types_react('16.9.51'),
69
+ new FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1.FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7('', false),
70
+ new FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9('0.4.47'),
71
+ new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.13.0'),
57
72
  new FN007002_CFG_S_initialPage_1.FN007002_CFG_S_initialPage('https://enter-your-SharePoint-site/_layouts/workbench.aspx'),
58
73
  new FN007003_CFG_S_api_1.FN007003_CFG_S_api(),
59
- new FN010001_YORC_version_1.FN010001_YORC_version('1.13.0-beta.20'),
74
+ new FN008002_CFG_TSL_removeRule_1.FN008002_CFG_TSL_removeRule('no-use-before-declare'),
75
+ new FN010001_YORC_version_1.FN010001_YORC_version('1.13.0'),
76
+ new FN012017_TSC_extends_1.FN012017_TSC_extends('./node_modules/@microsoft/rush-stack-compiler-3.9/includes/tsconfig-web.json'),
60
77
  new FN014007_CODE_launch_localWorkbench_1.FN014007_CODE_launch_localWorkbench(),
78
+ new FN015007_FILE_config_copy_assets_json_1.FN015007_FILE_config_copy_assets_json(false),
61
79
  new FN024001_NPMIGNORE_file_1.FN024001_NPMIGNORE_file()
62
80
  ];
63
- //# sourceMappingURL=upgrade-1.13.0-beta.20.js.map
81
+ //# sourceMappingURL=upgrade-1.13.0.js.map
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const fs = require("fs");
4
4
  const os = require("os");
5
5
  const path = require("path");
6
- // uncomment to support upgrading to preview releases
7
- const semver_1 = require("semver");
8
6
  const Command_1 = require("../../../../Command");
9
7
  const commands_1 = require("../../commands");
10
8
  const base_project_command_1 = require("./base-project-command");
@@ -43,7 +41,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
43
41
  '1.11.0',
44
42
  '1.12.0',
45
43
  '1.12.1',
46
- '1.13.0-beta.20'
44
+ '1.13.0'
47
45
  ];
48
46
  }
49
47
  get name() {
@@ -56,9 +54,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
56
54
  const telemetryProps = super.getTelemetryProperties(args);
57
55
  telemetryProps.toVersion = args.options.toVersion || this.supportedVersions[this.supportedVersions.length - 1];
58
56
  // uncomment to support upgrading to preview releases
59
- if ((0, semver_1.prerelease)(telemetryProps.toVersion) && !args.options.preview) {
60
- telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
61
- }
57
+ // if (prerelease(telemetryProps.toVersion) && !args.options.preview) {
58
+ // telemetryProps.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
59
+ // }
62
60
  telemetryProps.packageManager = args.options.packageManager || 'npm';
63
61
  telemetryProps.shell = args.options.shell || 'bash';
64
62
  telemetryProps.preview = args.options.preview;
@@ -72,15 +70,15 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
72
70
  }
73
71
  this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
74
72
  // uncomment to support upgrading to preview releases
75
- if (!args.options.toVersion &&
76
- !args.options.preview &&
77
- (0, semver_1.prerelease)(this.toVersion)) {
78
- // no version and no preview specified while the current version to
79
- // upgrade to is a prerelease so let's grab the first non-preview version
80
- // since we're supporting only one preview version, it's sufficient for
81
- // us to take second to last version
82
- this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
83
- }
73
+ // if (!args.options.toVersion &&
74
+ // !args.options.preview &&
75
+ // prerelease(this.toVersion)) {
76
+ // // no version and no preview specified while the current version to
77
+ // // upgrade to is a prerelease so let's grab the first non-preview version
78
+ // // since we're supporting only one preview version, it's sufficient for
79
+ // // us to take second to last version
80
+ // this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
81
+ // }
84
82
  this.packageManager = args.options.packageManager || 'npm';
85
83
  this.shell = args.options.shell || 'bash';
86
84
  if (this.supportedVersions.indexOf(this.toVersion) < 0) {
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_1 = require("../../../../cli");
3
4
  const Command_1 = require("../../../../Command");
4
5
  const config_1 = require("../../../../config");
5
6
  const request_1 = require("../../../../request");
6
7
  const Utils_1 = require("../../../../Utils");
7
8
  const SpoCommand_1 = require("../../../base/SpoCommand");
8
9
  const commands_1 = require("../../commands");
10
+ const SpoContentTypeGetCommand = require("./contenttype-get");
9
11
  class SpoContentTypeAddCommand extends SpoCommand_1.default {
10
12
  get name() {
11
13
  return commands_1.default.CONTENTTYPE_ADD;
@@ -52,7 +54,25 @@ class SpoContentTypeAddCommand extends SpoCommand_1.default {
52
54
  cb(new Command_1.CommandError(response.ErrorInfo.ErrorMessage));
53
55
  return;
54
56
  }
55
- cb();
57
+ const options = {
58
+ webUrl: args.options.webUrl,
59
+ listTitle: args.options.listTitle,
60
+ id: args.options.id,
61
+ output: 'json',
62
+ debug: this.debug,
63
+ verbose: this.verbose
64
+ };
65
+ cli_1.Cli.executeCommandWithOutput(SpoContentTypeGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) })
66
+ .then((res) => {
67
+ if (this.debug) {
68
+ logger.logToStderr(res.stderr);
69
+ }
70
+ logger.log(JSON.parse(res.stdout));
71
+ cb();
72
+ }, (err) => {
73
+ cb(err.error);
74
+ });
75
+ return;
56
76
  }, (err) => this.handleRejectedPromise(err, logger, cb));
57
77
  }
58
78
  getParentInfo(listTitle, webUrl, logger) {
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const Utils_1 = require("../../../../Utils");
5
+ const SpoCommand_1 = require("../../../base/SpoCommand");
6
+ const commands_1 = require("../../commands");
7
+ class SpoListItemAttachmentListCommand extends SpoCommand_1.default {
8
+ get name() {
9
+ return commands_1.default.LISTITEM_ATTACHMENT_LIST;
10
+ }
11
+ get description() {
12
+ return 'Gets the attachments associated to a list item';
13
+ }
14
+ getTelemetryProperties(args) {
15
+ const telemetryProps = super.getTelemetryProperties(args);
16
+ telemetryProps.listId = typeof args.options.listId !== 'undefined';
17
+ telemetryProps.listTitle = typeof args.options.listTitle !== 'undefined';
18
+ return telemetryProps;
19
+ }
20
+ defaultProperties() {
21
+ return ['FileName', 'ServerRelativeUrl'];
22
+ }
23
+ commandAction(logger, args, cb) {
24
+ const listIdArgument = args.options.listId || '';
25
+ const listTitleArgument = args.options.listTitle || '';
26
+ const listRestUrl = (args.options.listId ?
27
+ `${args.options.webUrl}/_api/web/lists(guid'${encodeURIComponent(listIdArgument)}')`
28
+ : `${args.options.webUrl}/_api/web/lists/getByTitle('${encodeURIComponent(listTitleArgument)}')`);
29
+ const requestOptions = {
30
+ url: `${listRestUrl}/items(${args.options.itemId})?$select=AttachmentFiles&$expand=AttachmentFiles`,
31
+ method: 'GET',
32
+ headers: {
33
+ 'accept': 'application/json;odata=nometadata'
34
+ },
35
+ responseType: 'json'
36
+ };
37
+ request_1.default
38
+ .get(requestOptions)
39
+ .then((attachmentFiles) => {
40
+ if (attachmentFiles.AttachmentFiles && attachmentFiles.AttachmentFiles.length > 0) {
41
+ logger.log(attachmentFiles.AttachmentFiles);
42
+ }
43
+ else {
44
+ if (this.verbose) {
45
+ logger.logToStderr('No attachments found');
46
+ }
47
+ }
48
+ cb();
49
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
50
+ }
51
+ options() {
52
+ const options = [
53
+ {
54
+ option: '-u, --webUrl <webUrl>'
55
+ },
56
+ {
57
+ option: '--itemId <itemId>'
58
+ },
59
+ {
60
+ option: '--listId [listId]'
61
+ },
62
+ {
63
+ option: '--listTitle [listTitle]'
64
+ }
65
+ ];
66
+ const parentOptions = super.options();
67
+ return options.concat(parentOptions);
68
+ }
69
+ validate(args) {
70
+ const isValidSharePointUrl = SpoCommand_1.default.isValidSharePointUrl(args.options.webUrl);
71
+ if (isValidSharePointUrl !== true) {
72
+ return isValidSharePointUrl;
73
+ }
74
+ if (!args.options.listId && !args.options.listTitle) {
75
+ return `Specify listId or listTitle`;
76
+ }
77
+ if (args.options.listId && args.options.listTitle) {
78
+ return `Specify listId or listTitle but not both`;
79
+ }
80
+ if (args.options.listId && !Utils_1.default.isValidGuid(args.options.listId)) {
81
+ return `${args.options.listId} in option listId is not a valid GUID`;
82
+ }
83
+ if (isNaN(parseInt(args.options.itemId))) {
84
+ return `${args.options.itemId} is not a number`;
85
+ }
86
+ return true;
87
+ }
88
+ }
89
+ module.exports = new SpoListItemAttachmentListCommand();
90
+ //# sourceMappingURL=listitem-attachment-list.js.map
@@ -107,6 +107,7 @@ exports.default = {
107
107
  LIST_WEBHOOK_REMOVE: `${prefix} list webhook remove`,
108
108
  LIST_WEBHOOK_SET: `${prefix} list webhook set`,
109
109
  LISTITEM_ADD: `${prefix} listitem add`,
110
+ LISTITEM_ATTACHMENT_LIST: `${prefix} listitem attachment list`,
110
111
  LISTITEM_GET: `${prefix} listitem get`,
111
112
  LISTITEM_ISRECORD: `${prefix} listitem isrecord`,
112
113
  LISTITEM_LIST: `${prefix} listitem list`,
@@ -22,7 +22,7 @@ class TeamsReportPstncallsCommand extends GraphCommand_1.default {
22
22
  commandAction(logger, args, cb) {
23
23
  const toDateTimeParameter = encodeURIComponent(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
24
24
  const requestOptions = {
25
- url: `${this.resource}/beta/communications/callRecords/getPstnCalls(fromDateTime=${encodeURIComponent(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
25
+ url: `${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${encodeURIComponent(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
26
26
  headers: {
27
27
  accept: 'application/json;odata.metadata=none'
28
28
  },