@pnp/cli-microsoft365 5.3.0 → 5.4.0-beta.3879fc9

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 (78) hide show
  1. package/.devcontainer/Dockerfile +1 -1
  2. package/dist/m365/planner/commands/bucket/bucket-get.js +1 -1
  3. package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
  4. package/dist/m365/planner/commands/bucket/bucket-set.js +1 -1
  5. package/dist/m365/planner/commands/task/task-get.js +22 -6
  6. package/dist/m365/planner/commands/task/task-remove.js +201 -0
  7. package/dist/m365/planner/commands.js +2 -1
  8. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002009_DEVDEP_microsoft_sp_tslint_rules.js +2 -2
  9. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9.js +2 -2
  10. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5.js +17 -0
  11. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js +14 -0
  12. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js +14 -0
  13. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js +14 -0
  14. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002024_DEVDEP_eslint.js +14 -0
  15. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002025_DEVDEP_eslint_plugin_react_hooks.js +18 -0
  16. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +14 -0
  17. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.15.0-beta.6.js → upgrade-1.15.0-rc.0.js} +49 -25
  18. package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
  19. package/dist/m365/spo/commands/contenttype/contenttype-add.js +1 -1
  20. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +1 -1
  21. package/dist/m365/spo/commands/contenttype/contenttype-get.js +1 -1
  22. package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +3 -3
  23. package/dist/m365/spo/commands/field/field-add.js +1 -1
  24. package/dist/m365/spo/commands/field/field-get.js +5 -5
  25. package/dist/m365/spo/commands/field/field-list.js +3 -3
  26. package/dist/m365/spo/commands/field/field-remove.js +5 -5
  27. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +1 -1
  28. package/dist/m365/spo/commands/list/list-contenttype-add.js +3 -3
  29. package/dist/m365/spo/commands/list/list-contenttype-default-set.js +2 -2
  30. package/dist/m365/spo/commands/list/list-contenttype-list.js +3 -3
  31. package/dist/m365/spo/commands/list/list-contenttype-remove.js +3 -3
  32. package/dist/m365/spo/commands/list/list-get.js +2 -2
  33. package/dist/m365/spo/commands/list/list-label-get.js +3 -3
  34. package/dist/m365/spo/commands/list/list-label-set.js +2 -2
  35. package/dist/m365/spo/commands/list/list-remove.js +2 -2
  36. package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -2
  37. package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -2
  38. package/dist/m365/spo/commands/list/list-sitescript-get.js +3 -3
  39. package/dist/m365/spo/commands/list/list-view-add.js +6 -3
  40. package/dist/m365/spo/commands/list/list-view-field-add.js +2 -2
  41. package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -2
  42. package/dist/m365/spo/commands/list/list-view-field-set.js +2 -2
  43. package/dist/m365/spo/commands/list/list-view-get.js +4 -4
  44. package/dist/m365/spo/commands/list/list-view-list.js +3 -3
  45. package/dist/m365/spo/commands/list/list-view-remove.js +3 -3
  46. package/dist/m365/spo/commands/list/list-view-set.js +3 -3
  47. package/dist/m365/spo/commands/list/list-webhook-add.js +3 -3
  48. package/dist/m365/spo/commands/list/list-webhook-get.js +3 -3
  49. package/dist/m365/spo/commands/list/list-webhook-list.js +5 -5
  50. package/dist/m365/spo/commands/list/list-webhook-remove.js +4 -4
  51. package/dist/m365/spo/commands/list/list-webhook-set.js +3 -3
  52. package/dist/m365/spo/commands/listitem/listitem-add.js +2 -2
  53. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +2 -2
  54. package/dist/m365/spo/commands/listitem/listitem-get.js +2 -2
  55. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +2 -2
  56. package/dist/m365/spo/commands/listitem/listitem-list.js +2 -2
  57. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +2 -2
  58. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +2 -2
  59. package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -2
  60. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -2
  61. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -2
  62. package/dist/m365/spo/commands/listitem/listitem-set.js +2 -2
  63. package/dist/utils/validation.js +12 -2
  64. package/docs/docs/cmd/planner/bucket/bucket-get.md +1 -1
  65. package/docs/docs/cmd/planner/bucket/bucket-remove.md +2 -2
  66. package/docs/docs/cmd/planner/bucket/bucket-set.md +5 -5
  67. package/docs/docs/cmd/planner/plan/plan-details-get.md +2 -2
  68. package/docs/docs/cmd/planner/plan/plan-get.md +4 -4
  69. package/docs/docs/cmd/planner/task/task-get.md +4 -9
  70. package/docs/docs/cmd/planner/task/task-list.md +2 -2
  71. package/docs/docs/cmd/planner/task/task-remove.md +78 -0
  72. package/docs/docs/cmd/planner/task/task-set.md +2 -2
  73. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  74. package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
  75. package/docs/docs/cmd/spo/list/list-view-add.md +13 -4
  76. package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +2 -2
  77. package/npm-shrinkwrap.json +257 -1104
  78. package/package.json +25 -21
@@ -27,7 +27,7 @@ RUN apt-get update && apt-get install -y \
27
27
  && apt-get install nodejs -y \
28
28
  && rm -rf /var/lib/apt/lists/*
29
29
 
30
- RUN pip3 install mkdocs-material==7.1.7 pymdown-extensions==9.0
30
+ RUN pip3 install mkdocs-material==7.1.7 pymdown-extensions==9.0 pygments==2.11
31
31
 
32
32
  RUN useradd \
33
33
  --user-group \
@@ -125,7 +125,7 @@ class PlannerBucketGetCommand extends GraphCommand_1.default {
125
125
  option: '-i, --id [id]'
126
126
  },
127
127
  {
128
- option: '--name [name]'
128
+ option: '-n, --name [name]'
129
129
  },
130
130
  {
131
131
  option: '--planId [planId]'
@@ -136,10 +136,10 @@ class PlannerBucketRemoveCommand extends GraphCommand_1.default {
136
136
  options() {
137
137
  const options = [
138
138
  {
139
- option: '--id [id]'
139
+ option: '-i, --id [id]'
140
140
  },
141
141
  {
142
- option: '--name [name]'
142
+ option: '-n, --name [name]'
143
143
  },
144
144
  {
145
145
  option: '--planId [planId]'
@@ -127,7 +127,7 @@ class PlannerBucketSetCommand extends GraphCommand_1.default {
127
127
  option: '-i, --id [id]'
128
128
  },
129
129
  {
130
- option: '--name [name]'
130
+ option: '-n, --name [name]'
131
131
  },
132
132
  {
133
133
  option: '--planId [planId]'
@@ -1,18 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../../../../utils");
3
+ const Auth_1 = require("../../../../Auth");
4
4
  const request_1 = require("../../../../request");
5
- const utils_2 = require("../../../../utils");
5
+ const utils_1 = require("../../../../utils");
6
6
  const planner_1 = require("../../../../utils/planner");
7
7
  const GraphCommand_1 = require("../../../base/GraphCommand");
8
8
  const commands_1 = require("../../commands");
9
- const Auth_1 = require("../../../../Auth");
10
9
  class PlannerTaskGetCommand extends GraphCommand_1.default {
11
10
  get name() {
12
11
  return commands_1.default.TASK_GET;
13
12
  }
14
13
  get description() {
15
- return 'Retrieve the the specified planner task';
14
+ return 'Retrieve the specified planner task';
15
+ }
16
+ getTelemetryProperties(args) {
17
+ const telemetryProps = super.getTelemetryProperties(args);
18
+ telemetryProps.id = typeof args.options.id !== 'undefined';
19
+ telemetryProps.title = typeof args.options.title !== 'undefined';
20
+ telemetryProps.bucketId = typeof args.options.bucketId !== 'undefined';
21
+ telemetryProps.bucketName = typeof args.options.bucketName !== 'undefined';
22
+ telemetryProps.planId = typeof args.options.planId !== 'undefined';
23
+ telemetryProps.planName = typeof args.options.planName !== 'undefined';
24
+ telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
25
+ telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
26
+ return telemetryProps;
16
27
  }
17
28
  commandAction(logger, args, cb) {
18
29
  if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
@@ -23,7 +34,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
23
34
  .getTaskId(args.options)
24
35
  .then(taskId => {
25
36
  const requestOptions = {
26
- url: `${this.resource}/beta/planner/tasks/${encodeURIComponent(taskId)}`,
37
+ url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(taskId)}`,
27
38
  headers: {
28
39
  accept: 'application/json;odata.metadata=none'
29
40
  },
@@ -125,6 +136,11 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
125
136
  return Promise.resolve(groups[0].id);
126
137
  });
127
138
  }
139
+ optionSets() {
140
+ return [
141
+ ['id', 'title']
142
+ ];
143
+ }
128
144
  options() {
129
145
  const options = [
130
146
  { option: '-i, --id [id]' },
@@ -158,7 +174,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
158
174
  if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
159
175
  return 'Specify either ownerGroupId or ownerGroupName when using planName but not both';
160
176
  }
161
- if (args.options.ownerGroupId && !utils_2.validation.isValidGuid(args.options.ownerGroupId)) {
177
+ if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
162
178
  return `${args.options.ownerGroupId} is not a valid GUID`;
163
179
  }
164
180
  return true;
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const os = require("os");
4
+ const cli_1 = require("../../../../cli");
5
+ const request_1 = require("../../../../request");
6
+ const utils_1 = require("../../../../utils");
7
+ const planner_1 = require("../../../../utils/planner");
8
+ const GraphCommand_1 = require("../../../base/GraphCommand");
9
+ const commands_1 = require("../../commands");
10
+ class PlannerTaskRemoveCommand extends GraphCommand_1.default {
11
+ get name() {
12
+ return commands_1.default.TASK_REMOVE;
13
+ }
14
+ get description() {
15
+ return 'Removes the Microsoft Planner task from a plan';
16
+ }
17
+ commandAction(logger, args, cb) {
18
+ const removeTask = () => {
19
+ this
20
+ .getTask(args.options)
21
+ .then(task => {
22
+ const requestOptions = {
23
+ url: `${this.resource}/v1.0/planner/tasks/${task.id}`,
24
+ headers: {
25
+ accept: 'application/json;odata.metadata=none',
26
+ 'if-match': task['@odata.etag']
27
+ },
28
+ responseType: 'json'
29
+ };
30
+ return request_1.default.delete(requestOptions);
31
+ })
32
+ .then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
33
+ };
34
+ if (args.options.confirm) {
35
+ removeTask();
36
+ }
37
+ else {
38
+ cli_1.Cli.prompt({
39
+ type: 'confirm',
40
+ name: 'continue',
41
+ default: false,
42
+ message: `Are you sure you want to remove the task ${args.options.id || args.options.title}?`
43
+ }, (result) => {
44
+ if (!result.continue) {
45
+ cb();
46
+ }
47
+ else {
48
+ removeTask();
49
+ }
50
+ });
51
+ }
52
+ }
53
+ getTask(options) {
54
+ const { id, title } = options;
55
+ if (id) {
56
+ const requestOptions = {
57
+ url: `${this.resource}/v1.0/planner/tasks/${id}`,
58
+ headers: {
59
+ accept: 'application/json'
60
+ },
61
+ responseType: 'json'
62
+ };
63
+ return request_1.default.get(requestOptions);
64
+ }
65
+ return this
66
+ .getBucketId(options)
67
+ .then(bucketId => {
68
+ // $filter is not working on the buckets/{bucketId}/tasks endpoint, hence it is not being used.
69
+ return utils_1.odata.getAllItems(`${this.resource}/v1.0/planner/buckets/${bucketId}/tasks?$select=title,id`, 'minimal');
70
+ })
71
+ .then(tasks => {
72
+ const filteredtasks = tasks.filter(b => title.toLocaleLowerCase() === b.title.toLocaleLowerCase());
73
+ if (filteredtasks.length === 0) {
74
+ return Promise.reject(`The specified task ${title} does not exist`);
75
+ }
76
+ if (filteredtasks.length > 1) {
77
+ return Promise.reject(`Multiple tasks with title ${title} found: Please disambiguate: ${os.EOL}${filteredtasks.map(f => `- ${f.id}`).join(os.EOL)}`);
78
+ }
79
+ return Promise.resolve(filteredtasks[0]);
80
+ });
81
+ }
82
+ getBucketId(options) {
83
+ const { bucketId, bucketName } = options;
84
+ if (bucketId) {
85
+ return Promise.resolve(bucketId);
86
+ }
87
+ return this
88
+ .getPlanId(options)
89
+ .then(planId => {
90
+ const requestOptions = {
91
+ url: `${this.resource}/v1.0/planner/plans/${planId}/buckets?$select=id,name`,
92
+ headers: {
93
+ accept: 'application/json;odata.metadata=none'
94
+ },
95
+ responseType: 'json'
96
+ };
97
+ return request_1.default.get(requestOptions);
98
+ })
99
+ .then((buckets) => {
100
+ const filteredBuckets = buckets.value.filter(b => bucketName.toLocaleLowerCase() === b.name.toLocaleLowerCase());
101
+ if (filteredBuckets.length === 0) {
102
+ return Promise.reject(`The specified bucket ${bucketName} does not exist`);
103
+ }
104
+ if (filteredBuckets.length > 1) {
105
+ return Promise.reject(`Multiple buckets with name ${bucketName} found: Please disambiguate:${os.EOL}${filteredBuckets.map(f => `- ${f.id}`).join(os.EOL)}`);
106
+ }
107
+ return Promise.resolve(filteredBuckets[0].id);
108
+ });
109
+ }
110
+ getPlanId(options) {
111
+ const { planId, planTitle } = options;
112
+ if (planId) {
113
+ return Promise.resolve(planId);
114
+ }
115
+ return this
116
+ .getGroupId(options)
117
+ .then(groupId => planner_1.planner.getPlanByName(planTitle, groupId))
118
+ .then(plan => plan.id);
119
+ }
120
+ getGroupId(options) {
121
+ const { ownerGroupId, ownerGroupName } = options;
122
+ if (ownerGroupId) {
123
+ return Promise.resolve(ownerGroupId);
124
+ }
125
+ const requestOptions = {
126
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(ownerGroupName)}'`,
127
+ headers: {
128
+ accept: 'application/json;odata.metadata=none'
129
+ },
130
+ responseType: 'json'
131
+ };
132
+ return request_1.default
133
+ .get(requestOptions)
134
+ .then(response => {
135
+ if (response.value.length === 0) {
136
+ return Promise.reject(`The specified owner group ${ownerGroupName} does not exist`);
137
+ }
138
+ if (response.value.length > 1) {
139
+ return Promise.reject(`Multiple owner groups with name ${ownerGroupName} found: ${response.value.map(x => x.id)}`);
140
+ }
141
+ return Promise.resolve(response.value[0].id);
142
+ });
143
+ }
144
+ options() {
145
+ const options = [
146
+ { option: '-i, --id [id]' },
147
+ { option: '-t, --title [title]' },
148
+ { option: '--bucketId [bucketId]' },
149
+ { option: '--bucketName [bucketName]' },
150
+ { option: '--planId [planId]' },
151
+ { option: '--planTitle [planTitle]' },
152
+ { option: '--ownerGroupId [ownerGroupId]' },
153
+ { option: '--ownerGroupName [ownerGroupName]' },
154
+ { option: '--confirm' }
155
+ ];
156
+ const parentOptions = super.options();
157
+ return options.concat(parentOptions);
158
+ }
159
+ optionSets() {
160
+ return [
161
+ ['id', 'title']
162
+ ];
163
+ }
164
+ validate(args) {
165
+ if (args.options.id) {
166
+ if (args.options.bucketId || args.options.bucketName || args.options.planId || args.options.planTitle || args.options.ownerGroupId || args.options.ownerGroupName) {
167
+ return 'Don\'t specify bucketId,bucketName, planId, planTitle, ownerGroupId or ownerGroupName when using id';
168
+ }
169
+ }
170
+ if (args.options.title) {
171
+ if (!args.options.bucketId && !args.options.bucketName) {
172
+ return 'Specify either bucketId or bucketName when using title';
173
+ }
174
+ if (args.options.bucketId && args.options.bucketName) {
175
+ return 'Specify either bucketId or bucketName when using title but not both';
176
+ }
177
+ if (args.options.bucketName) {
178
+ if (!args.options.planId && !args.options.planTitle) {
179
+ return 'Specify either planId or planTitle when using bucketName';
180
+ }
181
+ if (args.options.planId && args.options.planTitle) {
182
+ return 'Specify either planId or planTitle when using bucketName but not both';
183
+ }
184
+ }
185
+ if (args.options.planTitle) {
186
+ if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
187
+ return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
188
+ }
189
+ if (args.options.ownerGroupId && args.options.ownerGroupName) {
190
+ return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
191
+ }
192
+ }
193
+ if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
194
+ return `${args.options.ownerGroupId} is not a valid GUID`;
195
+ }
196
+ }
197
+ return true;
198
+ }
199
+ }
200
+ module.exports = new PlannerTaskRemoveCommand();
201
+ //# sourceMappingURL=task-remove.js.map
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const prefix = 'planner';
4
4
  exports.default = {
5
5
  BUCKET_ADD: `${prefix} bucket add`,
6
+ BUCKET_GET: `${prefix} bucket get`,
6
7
  BUCKET_LIST: `${prefix} bucket list`,
7
8
  BUCKET_SET: `${prefix} bucket set`,
8
9
  BUCKET_REMOVE: `${prefix} bucket remove`,
9
- BUCKET_GET: `${prefix} bucket get`,
10
10
  PLAN_ADD: `${prefix} plan add`,
11
11
  PLAN_DETAILS_GET: `${prefix} plan details get`,
12
12
  PLAN_GET: `${prefix} plan get`,
@@ -17,6 +17,7 @@ exports.default = {
17
17
  TASK_LIST: `${prefix} task list`,
18
18
  TASK_REFERENCE_ADD: `${prefix} task reference add`,
19
19
  TASK_REFERENCE_LIST: `${prefix} task reference list`,
20
+ TASK_REMOVE: `${prefix} task remove`,
20
21
  TASK_SET: `${prefix} task set`
21
22
  };
22
23
  //# sourceMappingURL=commands.js.map
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FN002009_DEVDEP_microsoft_sp_tslint_rules = void 0;
4
4
  const DependencyRule_1 = require("./DependencyRule");
5
5
  class FN002009_DEVDEP_microsoft_sp_tslint_rules extends DependencyRule_1.DependencyRule {
6
- constructor(packageVersion) {
7
- super('@microsoft/sp-tslint-rules', packageVersion, true);
6
+ constructor(packageVersion, add = true) {
7
+ super('@microsoft/sp-tslint-rules', packageVersion, true, false, add);
8
8
  }
9
9
  get id() {
10
10
  return 'FN002009';
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9 = void 0;
4
4
  const DependencyRule_1 = require("./DependencyRule");
5
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);
6
+ constructor(packageVersion, add = true) {
7
+ super('@microsoft/rush-stack-compiler-3.9', packageVersion, true, false, add);
8
8
  }
9
9
  get id() {
10
10
  return 'FN002018';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5 = void 0;
4
+ const DependencyRule_1 = require("./DependencyRule");
5
+ class FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5 extends DependencyRule_1.DependencyRule {
6
+ constructor(packageVersion) {
7
+ super('@microsoft/rush-stack-compiler-4.5', packageVersion, true);
8
+ }
9
+ get id() {
10
+ return 'FN002020';
11
+ }
12
+ get supersedes() {
13
+ return ['FN002010', 'FN002011', 'FN002012', 'FN002017', 'FN002018'];
14
+ }
15
+ }
16
+ exports.FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5 = FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5;
17
+ //# sourceMappingURL=FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5.js.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002021_DEVDEP_rushstack_eslint_config = void 0;
4
+ const DependencyRule_1 = require("./DependencyRule");
5
+ class FN002021_DEVDEP_rushstack_eslint_config extends DependencyRule_1.DependencyRule {
6
+ constructor(packageVersion) {
7
+ super('@rushstack/eslint-config', packageVersion, true);
8
+ }
9
+ get id() {
10
+ return 'FN002021';
11
+ }
12
+ }
13
+ exports.FN002021_DEVDEP_rushstack_eslint_config = FN002021_DEVDEP_rushstack_eslint_config;
14
+ //# sourceMappingURL=FN002021_DEVDEP_rushstack_eslint_config.js.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002022_DEVDEP_microsoft_eslint_plugin_spfx = void 0;
4
+ const DependencyRule_1 = require("./DependencyRule");
5
+ class FN002022_DEVDEP_microsoft_eslint_plugin_spfx extends DependencyRule_1.DependencyRule {
6
+ constructor(packageVersion) {
7
+ super('@microsoft/eslint-plugin-spfx', packageVersion, true);
8
+ }
9
+ get id() {
10
+ return 'FN002022';
11
+ }
12
+ }
13
+ exports.FN002022_DEVDEP_microsoft_eslint_plugin_spfx = FN002022_DEVDEP_microsoft_eslint_plugin_spfx;
14
+ //# sourceMappingURL=FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002023_DEVDEP_microsoft_eslint_config_spfx = void 0;
4
+ const DependencyRule_1 = require("./DependencyRule");
5
+ class FN002023_DEVDEP_microsoft_eslint_config_spfx extends DependencyRule_1.DependencyRule {
6
+ constructor(packageVersion) {
7
+ super('@microsoft/eslint-config-spfx', packageVersion, true);
8
+ }
9
+ get id() {
10
+ return 'FN002023';
11
+ }
12
+ }
13
+ exports.FN002023_DEVDEP_microsoft_eslint_config_spfx = FN002023_DEVDEP_microsoft_eslint_config_spfx;
14
+ //# sourceMappingURL=FN002023_DEVDEP_microsoft_eslint_config_spfx.js.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002024_DEVDEP_eslint = void 0;
4
+ const DependencyRule_1 = require("./DependencyRule");
5
+ class FN002024_DEVDEP_eslint extends DependencyRule_1.DependencyRule {
6
+ constructor(packageVersion) {
7
+ super('eslint', packageVersion, true);
8
+ }
9
+ get id() {
10
+ return 'FN002024';
11
+ }
12
+ }
13
+ exports.FN002024_DEVDEP_eslint = FN002024_DEVDEP_eslint;
14
+ //# sourceMappingURL=FN002024_DEVDEP_eslint.js.map
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN002025_DEVDEP_eslint_plugin_react_hooks = void 0;
4
+ const utils_1 = require("../../../../../../utils");
5
+ const DependencyRule_1 = require("./DependencyRule");
6
+ class FN002025_DEVDEP_eslint_plugin_react_hooks extends DependencyRule_1.DependencyRule {
7
+ constructor(packageVersion) {
8
+ super('eslint-plugin-react-hooks', packageVersion, true, true);
9
+ }
10
+ get id() {
11
+ return 'FN002025';
12
+ }
13
+ customCondition(project) {
14
+ return utils_1.spfx.isReactProject(project);
15
+ }
16
+ }
17
+ exports.FN002025_DEVDEP_eslint_plugin_react_hooks = FN002025_DEVDEP_eslint_plugin_react_hooks;
18
+ //# sourceMappingURL=FN002025_DEVDEP_eslint_plugin_react_hooks.js.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FN015008_FILE_eslintrc_js = void 0;
4
+ const FileAddRemoveRule_1 = require("./FileAddRemoveRule");
5
+ class FN015008_FILE_eslintrc_js extends FileAddRemoveRule_1.FileAddRemoveRule {
6
+ constructor(add, contents) {
7
+ super('./.eslintrc.js', add, contents);
8
+ }
9
+ get id() {
10
+ return 'FN015008';
11
+ }
12
+ }
13
+ exports.FN015008_FILE_eslintrc_js = FN015008_FILE_eslintrc_js;
14
+ //# sourceMappingURL=FN015008_FILE_eslintrc_js.js.map
@@ -26,38 +26,62 @@ const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN0020
26
26
  const FN002007_DEVDEP_ajv_1 = require("./rules/FN002007_DEVDEP_ajv");
27
27
  const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
28
28
  const FN002013_DEVDEP_types_webpack_env_1 = require("./rules/FN002013_DEVDEP_types_webpack_env");
29
+ const FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1 = require("./rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9");
30
+ const FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5_1 = require("./rules/FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5");
31
+ const FN002021_DEVDEP_rushstack_eslint_config_1 = require("./rules/FN002021_DEVDEP_rushstack_eslint_config");
32
+ const FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1 = require("./rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx");
33
+ const FN002023_DEVDEP_microsoft_eslint_config_spfx_1 = require("./rules/FN002023_DEVDEP_microsoft_eslint_config_spfx");
34
+ const FN002024_DEVDEP_eslint_1 = require("./rules/FN002024_DEVDEP_eslint");
35
+ const FN002025_DEVDEP_eslint_plugin_react_hooks_1 = require("./rules/FN002025_DEVDEP_eslint_plugin_react_hooks");
29
36
  const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
30
37
  const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
38
+ const FN012017_TSC_extends_1 = require("./rules/FN012017_TSC_extends");
39
+ const FN015003_FILE_tslint_json_1 = require("./rules/FN015003_FILE_tslint_json");
40
+ const FN015008_FILE_eslintrc_js_1 = require("./rules/FN015008_FILE_eslintrc_js");
31
41
  const FN023002_GITIGNORE_heft_1 = require("./rules/FN023002_GITIGNORE_heft");
32
42
  module.exports = [
33
- new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.15.0-beta.6'),
34
- new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.15.0-beta.6'),
35
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.15.0-beta.6'),
36
- new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.15.0-beta.6'),
37
- new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.15.0-beta.6'),
38
- new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.15.0-beta.6'),
39
- new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.15.0-beta.6'),
40
- new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.15.0-beta.6'),
41
- new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.15.0-beta.6'),
43
+ new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.15.0-rc.0'),
44
+ new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.15.0-rc.0'),
45
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.15.0-rc.0'),
46
+ new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.15.0-rc.0'),
47
+ new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.15.0-rc.0'),
48
+ new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.15.0-rc.0'),
49
+ new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.15.0-rc.0'),
50
+ new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.15.0-rc.0'),
51
+ new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.15.0-rc.0'),
42
52
  new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.183.1'),
43
- new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.15.0-beta.6'),
44
- new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.15.0-beta.6'),
45
- new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.15.0-beta.6'),
46
- new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.15.0-beta.6'),
47
- new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.15.0-beta.6'),
48
- new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.15.0-beta.6'),
49
- new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.15.0-beta.6'),
50
- new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.15.0-beta.6'),
51
- new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.15.0-beta.6'),
52
- new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.15.0-beta.6'),
53
+ new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.15.0-rc.0'),
54
+ new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.15.0-rc.0'),
55
+ new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.15.0-rc.0'),
56
+ new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.15.0-rc.0'),
57
+ new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.15.0-rc.0'),
58
+ new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.15.0-rc.0'),
59
+ new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.15.0-rc.0'),
60
+ new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.15.0-rc.0'),
61
+ new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.15.0-rc.0'),
62
+ new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.15.0-rc.0'),
53
63
  new FN001033_DEP_tslib_1.FN001033_DEP_tslib('2.3.1'),
54
- new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.0-beta.6'),
55
- new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.0-beta.6'),
64
+ new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.0-rc.0'),
65
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.0-rc.0'),
56
66
  new FN002007_DEVDEP_ajv_1.FN002007_DEVDEP_ajv('6.12.5'),
57
- new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.15.0-beta.6'),
67
+ new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('', false),
58
68
  new FN002013_DEVDEP_types_webpack_env_1.FN002013_DEVDEP_types_webpack_env('1.15.2'),
59
- new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.15.0-beta.6'),
60
- new FN010001_YORC_version_1.FN010001_YORC_version('1.15.0-beta.6'),
69
+ new FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9('', false),
70
+ new FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5_1.FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5('0.2.0'),
71
+ new FN002021_DEVDEP_rushstack_eslint_config_1.FN002021_DEVDEP_rushstack_eslint_config('2.5.1'),
72
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1.FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.15.0-rc.0'),
73
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx_1.FN002023_DEVDEP_microsoft_eslint_config_spfx('1.15.0-rc.0'),
74
+ new FN002024_DEVDEP_eslint_1.FN002024_DEVDEP_eslint('8.7.0'),
75
+ new FN002025_DEVDEP_eslint_plugin_react_hooks_1.FN002025_DEVDEP_eslint_plugin_react_hooks('4.3.0'),
76
+ new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.15.0-rc.0'),
77
+ new FN010001_YORC_version_1.FN010001_YORC_version('1.15.0-rc.0'),
78
+ new FN012017_TSC_extends_1.FN012017_TSC_extends('./node_modules/@microsoft/rush-stack-compiler-4.5/includes/tsconfig-web.json'),
79
+ new FN015003_FILE_tslint_json_1.FN015003_FILE_tslint_json(false, ''),
80
+ new FN015008_FILE_eslintrc_js_1.FN015008_FILE_eslintrc_js(true, `require('@rushstack/eslint-config/patch/modern-module-resolution');
81
+ module.exports = {
82
+ extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
83
+ parserOptions: { tsconfigRootDir: __dirname }
84
+ };`),
61
85
  new FN023002_GITIGNORE_heft_1.FN023002_GITIGNORE_heft()
62
86
  ];
63
- //# sourceMappingURL=upgrade-1.15.0-beta.6.js.map
87
+ //# sourceMappingURL=upgrade-1.15.0-rc.0.js.map
@@ -47,7 +47,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
47
47
  '1.13.0',
48
48
  '1.13.1',
49
49
  '1.14.0',
50
- '1.15.0-beta.6'
50
+ '1.15.0-rc.0'
51
51
  ];
52
52
  }
53
53
  get name() {
@@ -116,7 +116,7 @@ class SpoContentTypeAddCommand extends SpoCommand_1.default {
116
116
  logger.logToStderr(`Retrieving list id...`);
117
117
  }
118
118
  const requestOptions = {
119
- url: `${webUrl}/_api/web/lists/getByTitle('${encodeURIComponent(listTitle)}')?$select=Id`,
119
+ url: `${webUrl}/_api/web/lists/getByTitle('${utils_1.formatting.encodeQueryParameter(listTitle)}')?$select=Id`,
120
120
  headers: {
121
121
  accept: 'application/json;odata=nometadata'
122
122
  },
@@ -70,7 +70,7 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand_1.default {
70
70
  }
71
71
  // Request for the ListId
72
72
  const requestOptions = {
73
- url: `${args.options.webUrl}/_api/lists/GetByTitle('${encodeURIComponent(args.options.listTitle)}')?$select=Id`,
73
+ url: `${args.options.webUrl}/_api/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')?$select=Id`,
74
74
  headers: {
75
75
  accept: 'application/json;odata=nometadata'
76
76
  },
@@ -18,7 +18,7 @@ class SpoContentTypeGetCommand extends SpoCommand_1.default {
18
18
  };
19
19
  }
20
20
  commandAction(logger, args, cb) {
21
- let requestUrl = `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${encodeURIComponent(args.options.listTitle)}')/` : '')}contenttypes`;
21
+ let requestUrl = `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/` : '')}contenttypes`;
22
22
  if (args.options.id) {
23
23
  requestUrl += `('${encodeURIComponent(args.options.id)}')`;
24
24
  }
@@ -26,14 +26,14 @@ class SpoEventreceiverGetCommand extends SpoCommand_1.default {
26
26
  let listUrl = '';
27
27
  let filter = '?$filter=';
28
28
  if (args.options.listId) {
29
- listUrl = `lists(guid'${encodeURIComponent(args.options.listId)}')/`;
29
+ listUrl = `lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
30
30
  }
31
31
  else if (args.options.listTitle) {
32
- listUrl = `lists/getByTitle('${encodeURIComponent(args.options.listTitle)}')/`;
32
+ listUrl = `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
33
33
  }
34
34
  else if (args.options.listUrl) {
35
35
  const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
36
- listUrl = `GetList('${encodeURIComponent(listServerRelativeUrl)}')/`;
36
+ listUrl = `GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
37
37
  }
38
38
  if (!args.options.scope || args.options.scope === 'web') {
39
39
  requestUrl += `web/${listUrl}eventreceivers`;
@@ -16,7 +16,7 @@ class SpoFieldAddCommand extends SpoCommand_1.default {
16
16
  .getRequestDigest(args.options.webUrl)
17
17
  .then((res) => {
18
18
  const requestOptions = {
19
- url: `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${encodeURIComponent(args.options.listTitle)}')/` : '')}fields/CreateFieldAsXml`,
19
+ url: `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/` : '')}fields/CreateFieldAsXml`,
20
20
  headers: {
21
21
  'X-RequestDigest': res.FormDigestValue,
22
22
  accept: 'application/json;odata=nometadata'