@pnp/cli-microsoft365 7.0.0-beta.5fdb9e3 → 7.0.0-beta.607e42d

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 (129) hide show
  1. package/.eslintrc.cjs +0 -2
  2. package/dist/GlobalOptions.js +1 -7
  3. package/dist/m365/aad/commands/app/app-add.js +8 -8
  4. package/dist/m365/aad/commands/app/app-role-add.js +5 -5
  5. package/dist/m365/aad/commands/app/app-set.js +5 -5
  6. package/dist/m365/aad/commands/group/group-get.js +4 -4
  7. package/dist/m365/aad/commands/group/group-list.js +1 -23
  8. package/dist/m365/aad/commands/policy/policy-list.js +5 -5
  9. package/dist/m365/cli/commands/cli-issue.js +5 -5
  10. package/dist/m365/cli/commands/config/config-get.js +5 -5
  11. package/dist/m365/cli/commands/config/config-reset.js +5 -5
  12. package/dist/m365/cli/commands/config/config-set.js +5 -5
  13. package/dist/m365/commands/login.js +5 -5
  14. package/dist/m365/commands/request.js +1 -1
  15. package/dist/m365/flow/commands/owner/owner-ensure.js +5 -5
  16. package/dist/m365/pa/commands/app/app-export.js +7 -7
  17. package/dist/m365/pa/commands/app/app-owner-set.js +5 -5
  18. package/dist/m365/pa/commands/app/app-permission-ensure.js +5 -5
  19. package/dist/m365/pa/commands.js +1 -4
  20. package/dist/m365/planner/commands/task/task-add.js +17 -11
  21. package/dist/m365/planner/commands/task/task-get.js +35 -25
  22. package/dist/m365/planner/commands/task/task-list.js +26 -19
  23. package/dist/m365/planner/commands/task/task-remove.js +39 -34
  24. package/dist/m365/planner/commands/task/task-set.js +35 -23
  25. package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +14 -14
  26. package/dist/m365/spfx/commands/package/package-generate.js +15 -15
  27. package/dist/m365/spfx/commands/project/DeployWorkflow.js +55 -0
  28. package/dist/m365/spfx/commands/project/project-doctor.js +8 -8
  29. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +157 -0
  30. package/dist/m365/spfx/commands/project/project-github-workflow-model.js +2 -0
  31. package/dist/m365/spfx/commands/project/project-upgrade.js +13 -13
  32. package/dist/m365/spfx/commands.js +1 -0
  33. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +5 -5
  34. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +5 -5
  35. package/dist/m365/spo/commands/commandset/commandset-add.js +11 -11
  36. package/dist/m365/spo/commands/commandset/commandset-get.js +8 -8
  37. package/dist/m365/spo/commands/commandset/commandset-list.js +5 -5
  38. package/dist/m365/spo/commands/commandset/commandset-remove.js +5 -5
  39. package/dist/m365/spo/commands/commandset/commandset-set.js +11 -11
  40. package/dist/m365/spo/commands/file/file-get.js +9 -6
  41. package/dist/m365/spo/commands/file/file-sharinglink-add.js +8 -8
  42. package/dist/m365/spo/commands/file/file-sharinglink-list.js +5 -5
  43. package/dist/m365/spo/commands/list/list-add.js +4 -4
  44. package/dist/m365/spo/commands/list/list-set.js +4 -4
  45. package/dist/m365/spo/commands/listitem/listitem-add.js +1 -0
  46. package/dist/m365/spo/commands/listitem/listitem-set.js +3 -2
  47. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +8 -8
  48. package/dist/m365/spo/commands/page/clientsidepages.js +1 -81
  49. package/dist/m365/spo/commands/page/page-get.js +1 -0
  50. package/dist/m365/spo/commands/page/page-list.js +4 -3
  51. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +30 -32
  52. package/dist/m365/spo/commands/site/site-add.js +114 -161
  53. package/dist/m365/spo/commands/site/site-apppermission-add.js +15 -18
  54. package/dist/m365/spo/commands/site/site-apppermission-remove.js +34 -38
  55. package/dist/m365/spo/commands/site/site-apppermission-set.js +11 -14
  56. package/dist/m365/spo/commands/site/site-ensure.js +13 -66
  57. package/dist/m365/spo/commands/site/site-list.js +9 -17
  58. package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +6 -6
  59. package/dist/m365/spo/commands/site/site-remove.js +166 -210
  60. package/dist/m365/spo/commands/site/site-set.js +121 -153
  61. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +3 -2
  62. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -8
  63. package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +3 -2
  64. package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +8 -8
  65. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -4
  66. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +3 -3
  67. package/dist/m365/spo/commands/web/web-set.js +5 -5
  68. package/dist/m365/teams/commands/app/app-list.js +5 -5
  69. package/dist/m365/teams/commands/chat/chat-member-add.js +5 -5
  70. package/dist/m365/teams/commands/funsettings/funsettings-set.js +4 -4
  71. package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +4 -4
  72. package/dist/m365/teams/commands/membersettings/membersettings-set.js +4 -4
  73. package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +5 -5
  74. package/dist/m365/teams/commands/team/team-set.js +3 -3
  75. package/dist/m365/todo/commands/task/task-add.js +6 -6
  76. package/dist/m365/yammer/commands/message/message-list.js +5 -5
  77. package/dist/m365/yammer/commands/yammer-search.js +5 -5
  78. package/dist/utils/aadGroup.js +18 -0
  79. package/dist/utils/fsUtil.js +5 -0
  80. package/dist/utils/spo.js +582 -0
  81. package/dist/utils/validation.js +0 -3
  82. package/docs/docs/cmd/aad/group/group-get.mdx +5 -5
  83. package/docs/docs/cmd/aad/group/group-list.mdx +0 -11
  84. package/docs/docs/cmd/pa/app/app-export.mdx +5 -5
  85. package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
  86. package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
  87. package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
  88. package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
  89. package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
  90. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
  91. package/docs/docs/cmd/spo/listitem/listitem-add.mdx +2 -5
  92. package/docs/docs/cmd/spo/listitem/listitem-set.mdx +2 -5
  93. package/docs/docs/cmd/spo/page/page-get.mdx +0 -1
  94. package/docs/docs/cmd/spo/page/page-list.mdx +0 -1
  95. package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
  96. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +2 -4
  97. package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +2 -4
  98. package/npm-shrinkwrap.json +239 -1416
  99. package/package.json +6 -12
  100. package/dist/m365/pa/cds-project-mutator.js +0 -91
  101. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/generated/ManifestTypes.d.ts +0 -11
  102. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_ControlManifest.Input.xml +0 -31
  103. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +0 -51
  104. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/generated/ManifestTypes.d.ts +0 -12
  105. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_ControlManifest.Input.xml +0 -37
  106. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +0 -48
  107. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/index.ts +0 -0
  108. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_ControlManifest.Input.xml +0 -31
  109. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_index.tsx +0 -58
  110. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_ControlManifest.Input.xml +0 -37
  111. package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_index.tsx +0 -55
  112. package/dist/m365/pa/commands/pcf/pcf-init/assets/package.json +0 -19
  113. package/dist/m365/pa/commands/pcf/pcf-init/assets/pcfconfig.json +0 -3
  114. package/dist/m365/pa/commands/pcf/pcf-init/assets/template_.gitignore +0 -14
  115. package/dist/m365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj +0 -45
  116. package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +0 -2
  117. package/dist/m365/pa/commands/pcf/pcf-init.js +0 -120
  118. package/dist/m365/pa/commands/solution/solution-init/assets/Other/Customizations.xml +0 -18
  119. package/dist/m365/pa/commands/solution/solution-init/assets/Other/Relationships.xml +0 -2
  120. package/dist/m365/pa/commands/solution/solution-init/assets/Other/template_Solution.xml +0 -94
  121. package/dist/m365/pa/commands/solution/solution-init/assets/template_.gitignore +0 -2
  122. package/dist/m365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj +0 -44
  123. package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +0 -2
  124. package/dist/m365/pa/commands/solution/solution-init.js +0 -126
  125. package/dist/m365/pa/commands/solution/solution-reference-add.js +0 -88
  126. package/dist/m365/pa/template-instantiator.js +0 -57
  127. package/docs/docs/cmd/pa/pcf/pcf-init.mdx +0 -56
  128. package/docs/docs/cmd/pa/solution/solution-init.mdx +0 -46
  129. package/docs/docs/cmd/pa/solution/solution-reference-add.mdx +0 -42
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoCommandSetGetCommand_instances, _SpoCommandSetGetCommand_initTelemetry, _SpoCommandSetGetCommand_initOptions, _SpoCommandSetGetCommand_initValidators, _SpoCommandSetGetCommand_initOptionSets;
6
+ var _SpoCommandSetGetCommand_instances, _a, _SpoCommandSetGetCommand_initTelemetry, _SpoCommandSetGetCommand_initOptions, _SpoCommandSetGetCommand_initValidators, _SpoCommandSetGetCommand_initOptionSets;
7
7
  import os from 'os';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { spo } from '../../../../utils/spo.js';
@@ -35,7 +35,7 @@ class SpoCommandSetGetCommand extends SpoCommand {
35
35
  if (commandSet === undefined) {
36
36
  throw `Command set with id ${args.options.id} can't be found.`;
37
37
  }
38
- else if (!SpoCommandSetGetCommand.allowedCommandSetLocations.some(allowedLocation => allowedLocation === commandSet.Location)) {
38
+ else if (!_a.allowedCommandSetLocations.some(allowedLocation => allowedLocation === commandSet.Location)) {
39
39
  throw `Custom action with id ${args.options.id} is not a command set.`;
40
40
  }
41
41
  await logger.log(commandSet);
@@ -67,10 +67,10 @@ class SpoCommandSetGetCommand extends SpoCommand {
67
67
  }
68
68
  }
69
69
  getBaseFilter() {
70
- return `startswith(Location,'${SpoCommandSetGetCommand.baseLocation}') and`;
70
+ return `startswith(Location,'${_a.baseLocation}') and`;
71
71
  }
72
72
  }
73
- _SpoCommandSetGetCommand_instances = new WeakSet(), _SpoCommandSetGetCommand_initTelemetry = function _SpoCommandSetGetCommand_initTelemetry() {
73
+ _a = SpoCommandSetGetCommand, _SpoCommandSetGetCommand_instances = new WeakSet(), _SpoCommandSetGetCommand_initTelemetry = function _SpoCommandSetGetCommand_initTelemetry() {
74
74
  this.telemetry.push((args) => {
75
75
  Object.assign(this.telemetryProperties, {
76
76
  title: typeof args.options.title !== 'undefined',
@@ -90,7 +90,7 @@ _SpoCommandSetGetCommand_instances = new WeakSet(), _SpoCommandSetGetCommand_ini
90
90
  option: '-c, --clientSideComponentId [clientSideComponentId]'
91
91
  }, {
92
92
  option: '-s, --scope [scope]',
93
- autocomplete: SpoCommandSetGetCommand.scopes
93
+ autocomplete: _a.scopes
94
94
  });
95
95
  }, _SpoCommandSetGetCommand_initValidators = function _SpoCommandSetGetCommand_initValidators() {
96
96
  this.validators.push(async (args) => {
@@ -100,8 +100,8 @@ _SpoCommandSetGetCommand_instances = new WeakSet(), _SpoCommandSetGetCommand_ini
100
100
  if (args.options.clientSideComponentId && !validation.isValidGuid(args.options.clientSideComponentId)) {
101
101
  return `${args.options.clientSideComponentId} is not a valid GUID.`;
102
102
  }
103
- if (args.options.scope && SpoCommandSetGetCommand.scopes.indexOf(args.options.scope) < 0) {
104
- return `${args.options.scope} is not a valid scope. Valid scopes are ${SpoCommandSetGetCommand.scopes.join(', ')}`;
103
+ if (args.options.scope && _a.scopes.indexOf(args.options.scope) < 0) {
104
+ return `${args.options.scope} is not a valid scope. Valid scopes are ${_a.scopes.join(', ')}`;
105
105
  }
106
106
  return validation.isValidSharePointUrl(args.options.webUrl);
107
107
  });
@@ -110,6 +110,6 @@ _SpoCommandSetGetCommand_instances = new WeakSet(), _SpoCommandSetGetCommand_ini
110
110
  };
111
111
  SpoCommandSetGetCommand.scopes = ['All', 'Site', 'Web'];
112
112
  SpoCommandSetGetCommand.baseLocation = 'ClientSideExtension.ListViewCommandSet';
113
- SpoCommandSetGetCommand.allowedCommandSetLocations = [SpoCommandSetGetCommand.baseLocation, `${SpoCommandSetGetCommand.baseLocation}.CommandBar`, `${SpoCommandSetGetCommand.baseLocation}.ContextMenu`];
113
+ SpoCommandSetGetCommand.allowedCommandSetLocations = [_a.baseLocation, `${_a.baseLocation}.CommandBar`, `${_a.baseLocation}.ContextMenu`];
114
114
  export default new SpoCommandSetGetCommand();
115
115
  //# sourceMappingURL=commandset-get.js.map
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoCommandSetListCommand_instances, _SpoCommandSetListCommand_initTelemetry, _SpoCommandSetListCommand_initOptions, _SpoCommandSetListCommand_initValidators;
6
+ var _SpoCommandSetListCommand_instances, _a, _SpoCommandSetListCommand_initTelemetry, _SpoCommandSetListCommand_initOptions, _SpoCommandSetListCommand_initValidators;
7
7
  import { spo } from '../../../../utils/spo.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import SpoCommand from '../../../base/SpoCommand.js';
@@ -38,7 +38,7 @@ class SpoCommandSetListCommand extends SpoCommand {
38
38
  }
39
39
  }
40
40
  }
41
- _SpoCommandSetListCommand_instances = new WeakSet(), _SpoCommandSetListCommand_initTelemetry = function _SpoCommandSetListCommand_initTelemetry() {
41
+ _a = SpoCommandSetListCommand, _SpoCommandSetListCommand_instances = new WeakSet(), _SpoCommandSetListCommand_initTelemetry = function _SpoCommandSetListCommand_initTelemetry() {
42
42
  this.telemetry.push((args) => {
43
43
  Object.assign(this.telemetryProperties, {
44
44
  scope: args.options.scope || 'All'
@@ -49,12 +49,12 @@ _SpoCommandSetListCommand_instances = new WeakSet(), _SpoCommandSetListCommand_i
49
49
  option: '-u, --webUrl <webUrl>'
50
50
  }, {
51
51
  option: '-s, --scope [scope]',
52
- autocomplete: SpoCommandSetListCommand.scopes
52
+ autocomplete: _a.scopes
53
53
  });
54
54
  }, _SpoCommandSetListCommand_initValidators = function _SpoCommandSetListCommand_initValidators() {
55
55
  this.validators.push(async (args) => {
56
- if (args.options.scope && SpoCommandSetListCommand.scopes.indexOf(args.options.scope) < 0) {
57
- return `${args.options.scope} is not a valid scope. Valid scopes are ${SpoCommandSetListCommand.scopes.join(', ')}`;
56
+ if (args.options.scope && _a.scopes.indexOf(args.options.scope) < 0) {
57
+ return `${args.options.scope} is not a valid scope. Valid scopes are ${_a.scopes.join(', ')}`;
58
58
  }
59
59
  return validation.isValidSharePointUrl(args.options.webUrl);
60
60
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoCommandSetRemoveCommand_instances, _SpoCommandSetRemoveCommand_initTelemetry, _SpoCommandSetRemoveCommand_initOptions, _SpoCommandSetRemoveCommand_initValidators, _SpoCommandSetRemoveCommand_initOptionSets;
6
+ var _SpoCommandSetRemoveCommand_instances, _a, _SpoCommandSetRemoveCommand_initTelemetry, _SpoCommandSetRemoveCommand_initOptions, _SpoCommandSetRemoveCommand_initValidators, _SpoCommandSetRemoveCommand_initOptionSets;
7
7
  import commands from '../../commands.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import SpoCommand from '../../../base/SpoCommand.js';
@@ -87,7 +87,7 @@ class SpoCommandSetRemoveCommand extends SpoCommand {
87
87
  }
88
88
  }
89
89
  }
90
- _SpoCommandSetRemoveCommand_instances = new WeakSet(), _SpoCommandSetRemoveCommand_initTelemetry = function _SpoCommandSetRemoveCommand_initTelemetry() {
90
+ _a = SpoCommandSetRemoveCommand, _SpoCommandSetRemoveCommand_instances = new WeakSet(), _SpoCommandSetRemoveCommand_initTelemetry = function _SpoCommandSetRemoveCommand_initTelemetry() {
91
91
  this.telemetry.push((args) => {
92
92
  Object.assign(this.telemetryProperties, {
93
93
  title: typeof args.options.title !== 'undefined',
@@ -107,7 +107,7 @@ _SpoCommandSetRemoveCommand_instances = new WeakSet(), _SpoCommandSetRemoveComma
107
107
  }, {
108
108
  option: '-c, --clientSideComponentId [clientSideComponentId]'
109
109
  }, {
110
- option: '-s, --scope [scope]', autocomplete: SpoCommandSetRemoveCommand.scopes
110
+ option: '-s, --scope [scope]', autocomplete: _a.scopes
111
111
  }, {
112
112
  option: '-f, --force'
113
113
  });
@@ -119,8 +119,8 @@ _SpoCommandSetRemoveCommand_instances = new WeakSet(), _SpoCommandSetRemoveComma
119
119
  if (args.options.clientSideComponentId && !validation.isValidGuid(args.options.clientSideComponentId)) {
120
120
  return `${args.options.clientSideComponentId} is not a valid GUID`;
121
121
  }
122
- if (args.options.scope && SpoCommandSetRemoveCommand.scopes.indexOf(args.options.scope) < 0) {
123
- return `${args.options.scope} is not a valid scope. Allowed values are ${SpoCommandSetRemoveCommand.scopes.join(', ')}`;
122
+ if (args.options.scope && _a.scopes.indexOf(args.options.scope) < 0) {
123
+ return `${args.options.scope} is not a valid scope. Allowed values are ${_a.scopes.join(', ')}`;
124
124
  }
125
125
  return validation.isValidSharePointUrl(args.options.webUrl);
126
126
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoCommandSetSetCommand_instances, _SpoCommandSetSetCommand_initTelemetry, _SpoCommandSetSetCommand_initOptions, _SpoCommandSetSetCommand_initValidators, _SpoCommandSetSetCommand_initOptionSets;
6
+ var _SpoCommandSetSetCommand_instances, _a, _SpoCommandSetSetCommand_initTelemetry, _SpoCommandSetSetCommand_initOptions, _SpoCommandSetSetCommand_initValidators, _SpoCommandSetSetCommand_initOptionSets;
7
7
  import commands from '../../commands.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import SpoCommand from '../../../base/SpoCommand.js';
@@ -109,7 +109,7 @@ class SpoCommandSetSetCommand extends SpoCommand {
109
109
  }
110
110
  }
111
111
  }
112
- _SpoCommandSetSetCommand_instances = new WeakSet(), _SpoCommandSetSetCommand_initTelemetry = function _SpoCommandSetSetCommand_initTelemetry() {
112
+ _a = SpoCommandSetSetCommand, _SpoCommandSetSetCommand_instances = new WeakSet(), _SpoCommandSetSetCommand_initTelemetry = function _SpoCommandSetSetCommand_initTelemetry() {
113
113
  this.telemetry.push((args) => {
114
114
  Object.assign(this.telemetryProperties, {
115
115
  title: typeof args.options.title !== 'undefined',
@@ -136,13 +136,13 @@ _SpoCommandSetSetCommand_instances = new WeakSet(), _SpoCommandSetSetCommand_ini
136
136
  }, {
137
137
  option: '--newTitle [newTitle]'
138
138
  }, {
139
- option: '-l, --listType [listType]', autocomplete: SpoCommandSetSetCommand.listTypes
139
+ option: '-l, --listType [listType]', autocomplete: _a.listTypes
140
140
  }, {
141
141
  option: '--clientSideComponentProperties [clientSideComponentProperties]'
142
142
  }, {
143
- option: '-s, --scope [scope]', autocomplete: SpoCommandSetSetCommand.scopes
143
+ option: '-s, --scope [scope]', autocomplete: _a.scopes
144
144
  }, {
145
- option: '--location [location]', autocomplete: SpoCommandSetSetCommand.locations
145
+ option: '--location [location]', autocomplete: _a.locations
146
146
  });
147
147
  }, _SpoCommandSetSetCommand_initValidators = function _SpoCommandSetSetCommand_initValidators() {
148
148
  this.validators.push(async (args) => {
@@ -155,14 +155,14 @@ _SpoCommandSetSetCommand_instances = new WeakSet(), _SpoCommandSetSetCommand_ini
155
155
  if (args.options.newClientSideComponentId && !validation.isValidGuid(args.options.newClientSideComponentId)) {
156
156
  return `${args.options.newClientSideComponentId} is not a valid GUID`;
157
157
  }
158
- if (args.options.listType && SpoCommandSetSetCommand.listTypes.indexOf(args.options.listType) < 0) {
159
- return `${args.options.listType} is not a valid list type. Allowed values are ${SpoCommandSetSetCommand.listTypes.join(', ')}`;
158
+ if (args.options.listType && _a.listTypes.indexOf(args.options.listType) < 0) {
159
+ return `${args.options.listType} is not a valid list type. Allowed values are ${_a.listTypes.join(', ')}`;
160
160
  }
161
- if (args.options.scope && SpoCommandSetSetCommand.scopes.indexOf(args.options.scope) < 0) {
162
- return `${args.options.scope} is not a valid scope. Allowed values are ${SpoCommandSetSetCommand.scopes.join(', ')}`;
161
+ if (args.options.scope && _a.scopes.indexOf(args.options.scope) < 0) {
162
+ return `${args.options.scope} is not a valid scope. Allowed values are ${_a.scopes.join(', ')}`;
163
163
  }
164
- if (args.options.location && SpoCommandSetSetCommand.locations.indexOf(args.options.location) < 0) {
165
- return `${args.options.location} is not a valid location. Allowed values are ${SpoCommandSetSetCommand.locations.join(', ')}`;
164
+ if (args.options.location && _a.locations.indexOf(args.options.location) < 0) {
165
+ return `${args.options.location} is not a valid location. Allowed values are ${_a.locations.join(', ')}`;
166
166
  }
167
167
  if (!args.options.newTitle && !args.options.listType && !args.options.clientSideComponentProperties && !args.options.location && !args.options.newClientSideComponentId) {
168
168
  return `Please specify option to be updated`;
@@ -103,6 +103,9 @@ class SpoFileGetCommand extends SpoCommand {
103
103
  fileProperties.ListItemAllFields.RoleAssignments = response.value;
104
104
  }
105
105
  }
106
+ if (args.options.asListItem) {
107
+ delete fileProperties.ListItemAllFields.ID;
108
+ }
106
109
  await logger.log(args.options.asListItem ? fileProperties.ListItemAllFields : fileProperties);
107
110
  }
108
111
  }
@@ -115,12 +118,12 @@ class SpoFileGetCommand extends SpoCommand {
115
118
  _SpoFileGetCommand_instances = new WeakSet(), _SpoFileGetCommand_initTelemetry = function _SpoFileGetCommand_initTelemetry() {
116
119
  this.telemetry.push((args) => {
117
120
  Object.assign(this.telemetryProperties, {
118
- id: (!(!args.options.id)).toString(),
119
- url: (!(!args.options.url)).toString(),
120
- asString: args.options.asString || false,
121
- asListItem: args.options.asListItem || false,
122
- asFile: args.options.asFile || false,
123
- path: (!(!args.options.path)).toString(),
121
+ id: typeof args.options.id !== 'undefined',
122
+ url: typeof args.options.url !== 'undefined',
123
+ asString: !!args.options.asString,
124
+ asListItem: !!args.options.asListItem,
125
+ asFile: !!args.options.asFile,
126
+ path: typeof args.options.path !== 'undefined',
124
127
  withPermissions: !!args.options.withPermissions
125
128
  });
126
129
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoFileSharingLinkAddCommand_instances, _SpoFileSharingLinkAddCommand_initTelemetry, _SpoFileSharingLinkAddCommand_initOptions, _SpoFileSharingLinkAddCommand_initValidators, _SpoFileSharingLinkAddCommand_initOptionSets;
6
+ var _SpoFileSharingLinkAddCommand_instances, _a, _SpoFileSharingLinkAddCommand_initTelemetry, _SpoFileSharingLinkAddCommand_initOptions, _SpoFileSharingLinkAddCommand_initValidators, _SpoFileSharingLinkAddCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
8
  import { spo } from '../../../../utils/spo.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -50,7 +50,7 @@ class SpoFileSharingLinkAddCommand extends SpoCommand {
50
50
  }
51
51
  }
52
52
  }
53
- _SpoFileSharingLinkAddCommand_instances = new WeakSet(), _SpoFileSharingLinkAddCommand_initTelemetry = function _SpoFileSharingLinkAddCommand_initTelemetry() {
53
+ _a = SpoFileSharingLinkAddCommand, _SpoFileSharingLinkAddCommand_instances = new WeakSet(), _SpoFileSharingLinkAddCommand_initTelemetry = function _SpoFileSharingLinkAddCommand_initTelemetry() {
54
54
  this.telemetry.push((args) => {
55
55
  Object.assign(this.telemetryProperties, {
56
56
  fileId: typeof args.options.fileId !== 'undefined',
@@ -68,12 +68,12 @@ _SpoFileSharingLinkAddCommand_instances = new WeakSet(), _SpoFileSharingLinkAddC
68
68
  option: '--fileUrl [fileUrl]'
69
69
  }, {
70
70
  option: '--type <type>',
71
- autocomplete: SpoFileSharingLinkAddCommand.types
71
+ autocomplete: _a.types
72
72
  }, {
73
73
  option: '--expirationDateTime [expirationDateTime]'
74
74
  }, {
75
75
  option: '--scope [scope]',
76
- autocomplete: SpoFileSharingLinkAddCommand.scopes
76
+ autocomplete: _a.scopes
77
77
  });
78
78
  }, _SpoFileSharingLinkAddCommand_initValidators = function _SpoFileSharingLinkAddCommand_initValidators() {
79
79
  this.validators.push(async (args) => {
@@ -84,12 +84,12 @@ _SpoFileSharingLinkAddCommand_instances = new WeakSet(), _SpoFileSharingLinkAddC
84
84
  if (args.options.fileId && !validation.isValidGuid(args.options.fileId)) {
85
85
  return `${args.options.fileId} is not a valid GUID`;
86
86
  }
87
- if (SpoFileSharingLinkAddCommand.types.indexOf(args.options.type) < 0) {
88
- return `'${args.options.type}' is not a valid type. Allowed types are ${SpoFileSharingLinkAddCommand.types.join(', ')}`;
87
+ if (_a.types.indexOf(args.options.type) < 0) {
88
+ return `'${args.options.type}' is not a valid type. Allowed types are ${_a.types.join(', ')}`;
89
89
  }
90
90
  if (args.options.scope &&
91
- SpoFileSharingLinkAddCommand.scopes.indexOf(args.options.scope) < 0) {
92
- return `'${args.options.scope}' is not a valid scope. Allowed scopes are ${SpoFileSharingLinkAddCommand.scopes.join(', ')}`;
91
+ _a.scopes.indexOf(args.options.scope) < 0) {
92
+ return `'${args.options.scope}' is not a valid scope. Allowed scopes are ${_a.scopes.join(', ')}`;
93
93
  }
94
94
  if (args.options.scope && args.options.scope !== 'anonymous' && args.options.expirationDateTime) {
95
95
  return `Option expirationDateTime can only be used for links with scope 'anonymous'.`;
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoFileSharingLinkListCommand_instances, _SpoFileSharingLinkListCommand_initTelemetry, _SpoFileSharingLinkListCommand_initOptions, _SpoFileSharingLinkListCommand_initValidators, _SpoFileSharingLinkListCommand_initOptionSets;
6
+ var _SpoFileSharingLinkListCommand_instances, _a, _SpoFileSharingLinkListCommand_initTelemetry, _SpoFileSharingLinkListCommand_initOptions, _SpoFileSharingLinkListCommand_initValidators, _SpoFileSharingLinkListCommand_initOptionSets;
7
7
  import { Cli } from '../../../../cli/Cli.js';
8
8
  import { odata } from '../../../../utils/odata.js';
9
9
  import { spo } from '../../../../utils/spo.js';
@@ -59,7 +59,7 @@ class SpoFileSharingLinkListCommand extends SpoCommand {
59
59
  }
60
60
  }
61
61
  }
62
- _SpoFileSharingLinkListCommand_instances = new WeakSet(), _SpoFileSharingLinkListCommand_initTelemetry = function _SpoFileSharingLinkListCommand_initTelemetry() {
62
+ _a = SpoFileSharingLinkListCommand, _SpoFileSharingLinkListCommand_instances = new WeakSet(), _SpoFileSharingLinkListCommand_initTelemetry = function _SpoFileSharingLinkListCommand_initTelemetry() {
63
63
  this.telemetry.push((args) => {
64
64
  Object.assign(this.telemetryProperties, {
65
65
  fileId: typeof args.options.fileId !== 'undefined',
@@ -76,7 +76,7 @@ _SpoFileSharingLinkListCommand_instances = new WeakSet(), _SpoFileSharingLinkLis
76
76
  option: '--fileUrl [fileUrl]'
77
77
  }, {
78
78
  option: '-s, --scope [scope]',
79
- autocomplete: SpoFileSharingLinkListCommand.allowedScopes
79
+ autocomplete: _a.allowedScopes
80
80
  });
81
81
  }, _SpoFileSharingLinkListCommand_initValidators = function _SpoFileSharingLinkListCommand_initValidators() {
82
82
  this.validators.push(async (args) => {
@@ -87,8 +87,8 @@ _SpoFileSharingLinkListCommand_instances = new WeakSet(), _SpoFileSharingLinkLis
87
87
  if (args.options.fileId && !validation.isValidGuid(args.options.fileId)) {
88
88
  return `${args.options.fileId} is not a valid GUID`;
89
89
  }
90
- if (args.options.scope && SpoFileSharingLinkListCommand.allowedScopes.indexOf(args.options.scope) === -1) {
91
- return `'${args.options.scope}' is not a valid scope. Allowed values are: ${SpoFileSharingLinkListCommand.allowedScopes.join(',')}`;
90
+ if (args.options.scope && _a.allowedScopes.indexOf(args.options.scope) === -1) {
91
+ return `'${args.options.scope}' is not a valid scope. Allowed values are: ${_a.allowedScopes.join(',')}`;
92
92
  }
93
93
  return true;
94
94
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoListAddCommand_instances, _SpoListAddCommand_initTelemetry, _SpoListAddCommand_initOptions, _SpoListAddCommand_initValidators, _SpoListAddCommand_initTypes;
6
+ var _SpoListAddCommand_instances, _a, _SpoListAddCommand_initTelemetry, _SpoListAddCommand_initOptions, _SpoListAddCommand_initValidators, _SpoListAddCommand_initTypes;
7
7
  import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import SpoCommand from '../../../base/SpoCommand.js';
@@ -275,7 +275,7 @@ class SpoListAddCommand extends SpoCommand {
275
275
  return requestBody;
276
276
  }
277
277
  }
278
- _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry = function _SpoListAddCommand_initTelemetry() {
278
+ _a = SpoListAddCommand, _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry = function _SpoListAddCommand_initTelemetry() {
279
279
  this.telemetry.push((args) => {
280
280
  const telemetryProps = {};
281
281
  // add properties with identifiable data
@@ -298,7 +298,7 @@ _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry =
298
298
  }
299
299
  });
300
300
  // add boolean values
301
- SpoListAddCommand.booleanOptions.forEach(o => {
301
+ _a.booleanOptions.forEach(o => {
302
302
  const value = args.options[o];
303
303
  if (value !== undefined) {
304
304
  telemetryProps[o] = value.toString();
@@ -561,7 +561,7 @@ _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry =
561
561
  });
562
562
  }, _SpoListAddCommand_initTypes = function _SpoListAddCommand_initTypes() {
563
563
  this.types.string.push('title', 'baseTemplate', 'webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
564
- this.types.boolean.push(...SpoListAddCommand.booleanOptions);
564
+ this.types.boolean.push(..._a.booleanOptions);
565
565
  };
566
566
  SpoListAddCommand.booleanOptions = [
567
567
  'allowDeletion',
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoListSetCommand_instances, _SpoListSetCommand_initTelemetry, _SpoListSetCommand_initOptions, _SpoListSetCommand_initValidators, _SpoListSetCommand_initTypes, _SpoListSetCommand_initOptionSets;
6
+ var _SpoListSetCommand_instances, _a, _SpoListSetCommand_initTelemetry, _SpoListSetCommand_initOptions, _SpoListSetCommand_initValidators, _SpoListSetCommand_initTypes, _SpoListSetCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { urlUtil } from '../../../../utils/urlUtil.js';
@@ -277,7 +277,7 @@ class SpoListSetCommand extends SpoCommand {
277
277
  return requestBody;
278
278
  }
279
279
  }
280
- _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry = function _SpoListSetCommand_initTelemetry() {
280
+ _a = SpoListSetCommand, _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry = function _SpoListSetCommand_initTelemetry() {
281
281
  this.telemetry.push((args) => {
282
282
  const telemetryProps = {};
283
283
  // add properties with identifiable data
@@ -303,7 +303,7 @@ _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry =
303
303
  }
304
304
  });
305
305
  // add boolean values
306
- SpoListSetCommand.booleanOptions.forEach(o => {
306
+ _a.booleanOptions.forEach(o => {
307
307
  const value = args.options[o];
308
308
  if (value !== undefined) {
309
309
  telemetryProps[o] = value;
@@ -565,7 +565,7 @@ _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry =
565
565
  });
566
566
  }, _SpoListSetCommand_initTypes = function _SpoListSetCommand_initTypes() {
567
567
  this.types.string.push('webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
568
- this.types.boolean.push(...SpoListSetCommand.booleanOptions);
568
+ this.types.boolean.push(..._a.booleanOptions);
569
569
  }, _SpoListSetCommand_initOptionSets = function _SpoListSetCommand_initOptionSets() {
570
570
  this.optionSets.push({ options: ['id', 'title', 'url'] });
571
571
  };
@@ -148,6 +148,7 @@ class SpoListItemAddCommand extends SpoCommand {
148
148
  responseType: 'json'
149
149
  };
150
150
  const item = await request.get(requestOptions);
151
+ delete item.ID;
151
152
  await logger.log(item);
152
153
  }
153
154
  catch (err) {
@@ -188,8 +188,9 @@ class SpoListItemSetCommand extends SpoCommand {
188
188
  },
189
189
  responseType: 'json'
190
190
  };
191
- const itemsResponse = await request.get(requestOptionsItems);
192
- await logger.log(itemsResponse);
191
+ const item = await request.get(requestOptionsItems);
192
+ delete item.ID;
193
+ await logger.log(item);
193
194
  }
194
195
  catch (err) {
195
196
  this.handleRejectedODataJsonPromise(err);
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoOrgAssetsLibraryAddCommand_instances, _SpoOrgAssetsLibraryAddCommand_initTelemetry, _SpoOrgAssetsLibraryAddCommand_initOptions, _SpoOrgAssetsLibraryAddCommand_initValidators;
6
+ var _SpoOrgAssetsLibraryAddCommand_instances, _a, _SpoOrgAssetsLibraryAddCommand_initTelemetry, _SpoOrgAssetsLibraryAddCommand_initOptions, _SpoOrgAssetsLibraryAddCommand_initValidators;
7
7
  import config from '../../../../config.js';
8
8
  import request from '../../../../request.js';
9
9
  import { spo } from '../../../../utils/spo.js';
@@ -68,7 +68,7 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand {
68
68
  }
69
69
  }
70
70
  }
71
- _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAddCommand_initTelemetry = function _SpoOrgAssetsLibraryAddCommand_initTelemetry() {
71
+ _a = SpoOrgAssetsLibraryAddCommand, _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAddCommand_initTelemetry = function _SpoOrgAssetsLibraryAddCommand_initTelemetry() {
72
72
  this.telemetry.push((args) => {
73
73
  Object.assign(this.telemetryProperties, {
74
74
  cdnType: args.options.cdnType || 'Private',
@@ -83,10 +83,10 @@ _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAd
83
83
  option: '--thumbnailUrl [thumbnailUrl]'
84
84
  }, {
85
85
  option: '--cdnType [cdnType]',
86
- autocomplete: SpoOrgAssetsLibraryAddCommand.cdnTypes
86
+ autocomplete: _a.cdnTypes
87
87
  }, {
88
88
  option: '--orgAssetType [orgAssetType]',
89
- autocomplete: SpoOrgAssetsLibraryAddCommand.orgAssetTypes
89
+ autocomplete: _a.orgAssetTypes
90
90
  });
91
91
  }, _SpoOrgAssetsLibraryAddCommand_initValidators = function _SpoOrgAssetsLibraryAddCommand_initValidators() {
92
92
  this.validators.push(async (args) => {
@@ -94,11 +94,11 @@ _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAd
94
94
  if (typeof args.options.thumbnailUrl !== 'undefined' && isValidThumbnailUrl !== true) {
95
95
  return isValidThumbnailUrl;
96
96
  }
97
- if (args.options.cdnType && SpoOrgAssetsLibraryAddCommand.cdnTypes.indexOf(args.options.cdnType) < 0) {
98
- return `${args.options.cdnType} is not a valid value for cdnType. Valid values are ${SpoOrgAssetsLibraryAddCommand.cdnTypes.join(', ')}`;
97
+ if (args.options.cdnType && _a.cdnTypes.indexOf(args.options.cdnType) < 0) {
98
+ return `${args.options.cdnType} is not a valid value for cdnType. Valid values are ${_a.cdnTypes.join(', ')}`;
99
99
  }
100
- if (args.options.orgAssetType && SpoOrgAssetsLibraryAddCommand.orgAssetTypes.indexOf(args.options.orgAssetType) < 0) {
101
- return `${args.options.orgAssetType} is not a valid value for orgAssetType. Valid values are ${SpoOrgAssetsLibraryAddCommand.orgAssetTypes.join(', ')}`;
100
+ if (args.options.orgAssetType && _a.orgAssetTypes.indexOf(args.options.orgAssetType) < 0) {
101
+ return `${args.options.orgAssetType} is not a valid value for orgAssetType. Valid values are ${_a.orgAssetTypes.join(', ')}`;
102
102
  }
103
103
  return validation.isValidSharePointUrl(args.options.libraryUrl);
104
104
  });
@@ -204,7 +204,6 @@ function reindex(collection) {
204
204
  export class ClientSidePage {
205
205
  constructor() {
206
206
  this.sections = [];
207
- this.commentsDisabled = false;
208
207
  }
209
208
  /**
210
209
  * Converts a json object to an escaped string appropriate for use in attributes when storing client-side controls
@@ -243,49 +242,6 @@ export class ClientSidePage {
243
242
  };
244
243
  return JSON.parse(unespace(escapedString));
245
244
  }
246
- /**
247
- * Add a section to this page
248
- */
249
- addSection(sectionTemplate, order) {
250
- var sectionOrder = typeof order !== 'undefined' ? order : getNextOrder(this.sections);
251
- var section = new CanvasSection(this, sectionOrder);
252
- if (sectionTemplate) {
253
- switch (CanvasSectionTemplate[sectionTemplate].toString()) {
254
- case CanvasSectionTemplate.OneColumnFullWidth.toString():
255
- section.addColumn(0);
256
- break;
257
- case CanvasSectionTemplate.TwoColumn.toString():
258
- section.addColumn(6);
259
- section.addColumn(6);
260
- break;
261
- case CanvasSectionTemplate.ThreeColumn.toString():
262
- section.addColumn(4);
263
- section.addColumn(4);
264
- section.addColumn(4);
265
- break;
266
- case CanvasSectionTemplate.TwoColumnLeft.toString():
267
- section.addColumn(8);
268
- section.addColumn(4);
269
- break;
270
- case CanvasSectionTemplate.TwoColumnRight.toString():
271
- section.addColumn(4);
272
- section.addColumn(8);
273
- break;
274
- case CanvasSectionTemplate.OneColumn.toString():
275
- default:
276
- section.addColumn(12);
277
- break;
278
- }
279
- }
280
- if (typeof order !== undefined) {
281
- // Insert the sections at the specified order.
282
- this.sections.splice(sectionOrder - 1, 0, section);
283
- }
284
- else {
285
- this.sections.push(section);
286
- }
287
- return section;
288
- }
289
245
  /**
290
246
  * Converts this page's content to html markup
291
247
  */
@@ -341,14 +297,6 @@ export class ClientSidePage {
341
297
  reindex(page.sections);
342
298
  return page;
343
299
  }
344
- /**
345
- * Finds a control by the specified instance id
346
- *
347
- * @param id Instance id of the control to find
348
- */
349
- findControlById(id) {
350
- return this.findControl((c) => c.id === id);
351
- }
352
300
  /**
353
301
  * Finds a control within this page's control tree using the supplied predicate
354
302
  *
@@ -441,7 +389,6 @@ export class CanvasSection {
441
389
  this.page = page;
442
390
  this.order = order;
443
391
  this.columns = columns;
444
- this._memId = getGUID();
445
392
  }
446
393
  /**
447
394
  * Default column (this.columns[0]) for this section
@@ -460,15 +407,6 @@ export class CanvasSection {
460
407
  this.columns.push(column);
461
408
  return column;
462
409
  }
463
- /**
464
- * Adds a control to the default column for this section
465
- *
466
- * @param control Control to add to the default column
467
- */
468
- addControl(control) {
469
- this.defaultColumn.addControl(control);
470
- return this;
471
- }
472
410
  toHtml() {
473
411
  const html = [];
474
412
  for (let i = 0; i < this.columns.length; i++) {
@@ -476,15 +414,8 @@ export class CanvasSection {
476
414
  }
477
415
  return html.join("");
478
416
  }
479
- /**
480
- * Removes this section and all contained columns and controls from the collection
481
- */
482
- remove() {
483
- this.page.sections = this.page.sections.filter(section => section._memId !== this._memId);
484
- reindex(this.page.sections);
485
- }
486
417
  }
487
- export class CanvasControl {
418
+ class CanvasControl {
488
419
  constructor(controlType, dataVersion, column = undefined, order = 1, id = getGUID(), controlData = null, dynamicDataPaths = null, dynamicDataValues = null) {
489
420
  this.controlType = controlType;
490
421
  this.dataVersion = dataVersion;
@@ -534,9 +465,6 @@ export class CanvasColumn extends CanvasControl {
534
465
  }
535
466
  return this;
536
467
  }
537
- getControl(index) {
538
- return this.controls[index];
539
- }
540
468
  toHtml() {
541
469
  const html = [];
542
470
  if (this.controls.length < 1) {
@@ -662,11 +590,6 @@ export class ClientSideWebpart extends ClientSidePart {
662
590
  this.dynamicDataPaths = dynamicDataPaths;
663
591
  this.dynamicDataValues = dynamicDataValues;
664
592
  }
665
- static fromComponentDef(definition) {
666
- const part = new ClientSideWebpart("");
667
- part.import(definition);
668
- return part;
669
- }
670
593
  import(component) {
671
594
  this.webPartId = component.Id.replace(/^\{|\}$/g, "").toLowerCase();
672
595
  const manifest = JSON.parse(component.Manifest);
@@ -679,9 +602,6 @@ export class ClientSideWebpart extends ClientSidePart {
679
602
  this.propertieJson = extend(this.propertieJson, properties);
680
603
  return this;
681
604
  }
682
- getProperties() {
683
- return this.propertieJson;
684
- }
685
605
  toHtml(index) {
686
606
  // set our order to the value passed in
687
607
  this.order = index;
@@ -72,6 +72,7 @@ class SpoPageGetCommand extends SpoCommand {
72
72
  pageItemData.numSections = sections.length;
73
73
  }
74
74
  }
75
+ delete pageItemData.ListItemAllFields.ID;
75
76
  await logger.log(pageItemData);
76
77
  }
77
78
  catch (err) {
@@ -34,9 +34,9 @@ class SpoPageListCommand extends SpoCommand {
34
34
  if (pagesList && pagesList.length > 0) {
35
35
  pages = pagesList;
36
36
  }
37
- const res = await odata.getAllItems(`${args.options.webUrl}/_api/web/lists/SitePages/rootfolder/files?$expand=ListItemAllFields/ClientSideApplicationId&$orderby=Name`);
38
- if (res && res.length > 0) {
39
- const clientSidePages = res.filter(p => p.ListItemAllFields.ClientSideApplicationId === 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec');
37
+ const files = await odata.getAllItems(`${args.options.webUrl}/_api/web/lists/SitePages/rootfolder/files?$expand=ListItemAllFields/ClientSideApplicationId&$orderby=Name`);
38
+ if (files?.length > 0) {
39
+ const clientSidePages = files.filter(f => f.ListItemAllFields.ClientSideApplicationId === 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec');
40
40
  pages = pages.map(p => {
41
41
  const clientSidePage = clientSidePages.find(cp => cp && cp.ListItemAllFields && cp.ListItemAllFields.Id === p.Id);
42
42
  if (clientSidePage) {
@@ -47,6 +47,7 @@ class SpoPageListCommand extends SpoCommand {
47
47
  }
48
48
  return p;
49
49
  });
50
+ pages.filter(p => p.ListItemAllFields).forEach(page => delete page.ListItemAllFields.ID);
50
51
  await logger.log(pages);
51
52
  }
52
53
  }