@pnp/cli-microsoft365 10.10.0-beta.eb74779 → 10.11.0-beta.24af61c

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 (125) hide show
  1. package/.eslintrc.cjs +2 -0
  2. package/Dockerfile +2 -2
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/config.js +1 -0
  6. package/dist/m365/base/GraphApplicationCommand.js +17 -0
  7. package/dist/m365/base/{DelegatedGraphCommand.js → GraphDelegatedCommand.js} +4 -4
  8. package/dist/m365/base/PowerAppsCommand.js +1 -1
  9. package/dist/m365/base/PowerAutomateCommand.js +1 -1
  10. package/dist/m365/base/PowerBICommand.js +1 -1
  11. package/dist/m365/base/PowerPlatformCommand.js +1 -1
  12. package/dist/m365/base/VivaEngageCommand.js +1 -1
  13. package/dist/m365/cli/commands/app/app-add.js +95 -0
  14. package/dist/m365/cli/commands.js +1 -0
  15. package/dist/m365/entra/commands/app/app-get.js +11 -52
  16. package/dist/m365/entra/commands/app/app-permission-add.js +19 -30
  17. package/dist/m365/entra/commands/app/app-permission-list.js +2 -19
  18. package/dist/m365/entra/commands/app/app-permission-remove.js +22 -31
  19. package/dist/m365/entra/commands/app/app-remove.js +2 -18
  20. package/dist/m365/entra/commands/app/app-role-add.js +10 -43
  21. package/dist/m365/entra/commands/app/app-role-list.js +2 -20
  22. package/dist/m365/entra/commands/app/app-role-remove.js +9 -40
  23. package/dist/m365/entra/commands/app/app-set.js +2 -19
  24. package/dist/m365/entra/commands/group/group-member-add.js +55 -10
  25. package/dist/m365/entra/commands/group/group-member-set.js +18 -3
  26. package/dist/m365/entra/commands/organization/organization-set.js +104 -0
  27. package/dist/m365/entra/commands.js +1 -0
  28. package/dist/m365/outlook/commands/message/message-move.js +1 -1
  29. package/dist/m365/pp/commands/managementapp/managementapp-add.js +7 -21
  30. package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +96 -0
  31. package/dist/m365/spe/commands.js +1 -0
  32. package/dist/m365/spfx/commands/project/base-project-command.js +1 -0
  33. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.21.0.js +2 -0
  34. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.21.1.js +2 -0
  35. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.0-beta.1.js +21 -0
  36. package/dist/m365/spfx/commands/project/project-doctor/rules/FN002022_DEVDEP_typescript.js +10 -0
  37. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  38. package/dist/m365/spfx/commands/project/project-model/SassJson.js +2 -0
  39. package/dist/m365/spfx/commands/project/project-model/index.js +1 -0
  40. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002001_DEVDEP_microsoft_sp_build_web.js +2 -2
  41. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002004_DEVDEP_gulp.js +2 -2
  42. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002007_DEVDEP_ajv.js +2 -2
  43. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js +2 -2
  44. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002030_DEVDEP_microsoft_spfx_web_build_rig.js +10 -0
  45. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002031_DEVDEP_rushstack_heft.js +10 -0
  46. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002032_DEVDEP_typescript_eslint_parser.js +10 -0
  47. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002033_DEVDEP_jest_junit.js +10 -0
  48. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010011_YORC_useGulp.js +40 -0
  49. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015010_FILE_gulpfile_js.js +10 -0
  50. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015011_FILE_tsconfig_json.js +10 -0
  51. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015012_FILE_config_heft_json.js +10 -0
  52. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015013_FILE_config_jest_config_json.js +10 -0
  53. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015014_FILE_config_rig_json.js +10 -0
  54. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015015_FILE_config_typescript_json.js +10 -0
  55. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021004_PKG_scripts_build.js +45 -0
  56. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021005_PKG_scripts_test.js +45 -0
  57. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021006_PKG_scripts_clean.js +45 -0
  58. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021007_PKG_scripts_deploy.js +45 -0
  59. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021008_PKG_scripts_start.js +45 -0
  60. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021009_PKG_scripts_build_watch.js +45 -0
  61. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021010_PKG_scripts_package_solution.js +45 -0
  62. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021011_PKG_scripts_deploy_azure_storage.js +45 -0
  63. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021012_PKG_scripts_eject_webpack.js +45 -0
  64. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021013_PKG_overrides_rushstack_heft.js +45 -0
  65. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023003_GITIGNORE_libdts.js +36 -0
  66. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023004_GITIGNORE_libcommonjs.js +36 -0
  67. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023005_GITIGNORE_libesm.js +36 -0
  68. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023006_GITIGNORE_jestoutput.js +36 -0
  69. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN026001_CFG_SASS_schema.js +40 -0
  70. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN026002_CFG_SASS_extends.js +40 -0
  71. package/dist/m365/spfx/commands/project/project-upgrade/rules/FileAddRemoveRule.js +7 -0
  72. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.0-beta.1.js +241 -0
  73. package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
  74. package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
  75. package/dist/m365/spo/commands/file/file-version-get.js +1 -0
  76. package/dist/m365/spo/commands/file/file-version-list.js +2 -2
  77. package/dist/m365/spo/commands/homesite/homesite-remove.js +57 -37
  78. package/dist/m365/spo/commands/list/list-view-add.js +140 -87
  79. package/dist/m365/spo/commands/page/Page.js +10 -3
  80. package/dist/m365/spo/commands/page/clientsidepages.js +4 -0
  81. package/dist/m365/spo/commands/page/page-section-add.js +73 -13
  82. package/dist/m365/spo/commands/page/page-section-list.js +5 -1
  83. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +13 -7
  84. package/dist/m365/spo/commands/site/site-appcatalog-list.js +38 -2
  85. package/dist/m365/spo/commands/tenant/tenant-site-unarchive.js +1 -1
  86. package/dist/m365/teams/commands/callrecord/callrecord-list.js +100 -0
  87. package/dist/m365/teams/commands/chat/chat-message-send.js +2 -2
  88. package/dist/m365/teams/commands/message/message-remove.js +2 -2
  89. package/dist/m365/teams/commands/message/message-restore.js +2 -2
  90. package/dist/m365/teams/commands.js +1 -0
  91. package/dist/m365/todo/commands/list/list-add.js +2 -2
  92. package/dist/m365/todo/commands/list/list-get.js +2 -2
  93. package/dist/m365/todo/commands/list/list-list.js +2 -2
  94. package/dist/m365/todo/commands/list/list-remove.js +2 -2
  95. package/dist/m365/todo/commands/list/list-set.js +2 -2
  96. package/dist/m365/todo/commands/task/task-add.js +2 -2
  97. package/dist/m365/todo/commands/task/task-get.js +2 -2
  98. package/dist/m365/todo/commands/task/task-list.js +2 -2
  99. package/dist/m365/todo/commands/task/task-remove.js +2 -2
  100. package/dist/m365/todo/commands/task/task-set.js +2 -2
  101. package/dist/m365/viva/commands/engage/EngageRole.js +2 -0
  102. package/dist/m365/viva/commands/engage/engage-role-list.js +28 -0
  103. package/dist/m365/viva/commands/engage/engage-role-member-list.js +57 -0
  104. package/dist/m365/viva/commands.js +2 -0
  105. package/dist/utils/accessToken.js +9 -5
  106. package/dist/utils/entraApp.js +15 -0
  107. package/dist/utils/entraGroup.js +43 -0
  108. package/dist/utils/vivaEngage.js +19 -0
  109. package/docs/docs/cmd/cli/app/app-add.mdx +50 -0
  110. package/docs/docs/cmd/entra/group/group-member-add.mdx +26 -5
  111. package/docs/docs/cmd/entra/group/group-member-set.mdx +7 -4
  112. package/docs/docs/cmd/entra/organization/organization-set.mdx +84 -0
  113. package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +53 -0
  114. package/docs/docs/cmd/spo/file/file-version-get.mdx +5 -2
  115. package/docs/docs/cmd/spo/file/file-version-list.mdx +7 -5
  116. package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +6 -3
  117. package/docs/docs/cmd/spo/list/list-view-add.mdx +53 -10
  118. package/docs/docs/cmd/spo/page/page-section-add.mdx +22 -2
  119. package/docs/docs/cmd/spo/site/site-appcatalog-list.mdx +11 -0
  120. package/docs/docs/cmd/spo/tenant/tenant-site-unarchive.mdx +1 -1
  121. package/docs/docs/cmd/teams/callrecord/callrecord-list.mdx +173 -0
  122. package/docs/docs/cmd/viva/engage/engage-role-list.mdx +102 -0
  123. package/docs/docs/cmd/viva/engage/engage-role-member-list.mdx +118 -0
  124. package/npm-shrinkwrap.json +293 -765
  125. package/package.json +18 -17
@@ -0,0 +1,96 @@
1
+ import { globalOptionsZod } from '../../../../Command.js';
2
+ import { z } from 'zod';
3
+ import commands from '../../commands.js';
4
+ import { validation } from '../../../../utils/validation.js';
5
+ import { spo } from '../../../../utils/spo.js';
6
+ import GraphCommand from '../../../base/GraphCommand.js';
7
+ import { spe } from '../../../../utils/spe.js';
8
+ import { odata } from '../../../../utils/odata.js';
9
+ import { formatting } from '../../../../utils/formatting.js';
10
+ import { cli } from '../../../../cli/cli.js';
11
+ import request from '../../../../request.js';
12
+ const options = globalOptionsZod
13
+ .extend({
14
+ containerTypeId: z.string()
15
+ .refine(id => validation.isValidGuid(id), id => ({
16
+ message: `'${id}' is not a valid GUID.`
17
+ })).optional(),
18
+ containerTypeName: z.string().optional(),
19
+ id: z.string().optional(),
20
+ name: z.string().optional()
21
+ })
22
+ .strict();
23
+ class SpeContainerRecycleBinItemRestoreCommand extends GraphCommand {
24
+ get name() {
25
+ return commands.CONTAINER_RECYCLEBINITEM_RESTORE;
26
+ }
27
+ get description() {
28
+ return 'Restores a deleted container';
29
+ }
30
+ get schema() {
31
+ return options;
32
+ }
33
+ getRefinedSchema(schema) {
34
+ return schema
35
+ .refine((options) => [options.id, options.name].filter(o => o !== undefined).length === 1, {
36
+ message: 'Use one of the following options: id or name.'
37
+ })
38
+ .refine((options) => !options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 1, {
39
+ message: 'Use one of the following options when specifying the container name: containerTypeId or containerTypeName.'
40
+ })
41
+ .refine((options) => options.name || [options.containerTypeId, options.containerTypeName].filter(o => o !== undefined).length === 0, {
42
+ message: 'Options containerTypeId and containerTypeName are only required when restoring a container by name.'
43
+ });
44
+ }
45
+ async commandAction(logger, args) {
46
+ try {
47
+ const containerId = await this.getContainerId(args.options, logger);
48
+ if (this.verbose) {
49
+ await logger.logToStderr(`Restoring deleted container with ID '${containerId}'...`);
50
+ }
51
+ const requestOptions = {
52
+ url: `${this.resource}/v1.0/storage/fileStorage/deletedContainers/${containerId}/restore`,
53
+ headers: {
54
+ accept: 'application/json;odata.metadata=none'
55
+ },
56
+ responseType: 'json'
57
+ };
58
+ await request.post(requestOptions);
59
+ }
60
+ catch (err) {
61
+ this.handleRejectedODataJsonPromise(err);
62
+ }
63
+ }
64
+ async getContainerId(options, logger) {
65
+ if (options.id) {
66
+ return options.id;
67
+ }
68
+ if (this.verbose) {
69
+ await logger.logToStderr(`Retrieving container with name '${options.name}'...`);
70
+ }
71
+ const containerTypeId = await this.getContainerTypeId(options, logger);
72
+ const containers = await odata.getAllItems(`${this.resource}/v1.0/storage/fileStorage/deletedContainers?$filter=containerTypeId eq ${containerTypeId}&$select=id,displayName`);
73
+ const matchingContainers = containers.filter(c => c.displayName.toLowerCase() === options.name.toLowerCase());
74
+ if (matchingContainers.length === 0) {
75
+ throw new Error(`The specified container '${options.name}' does not exist.`);
76
+ }
77
+ if (matchingContainers.length > 1) {
78
+ const containerKeyValuePair = formatting.convertArrayToHashTable('id', matchingContainers);
79
+ const container = await cli.handleMultipleResultsFound(`Multiple containers with name '${options.name}' found.`, containerKeyValuePair);
80
+ return container.id;
81
+ }
82
+ return matchingContainers[0].id;
83
+ }
84
+ async getContainerTypeId(options, logger) {
85
+ if (options.containerTypeId) {
86
+ return options.containerTypeId;
87
+ }
88
+ if (this.verbose) {
89
+ await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
90
+ }
91
+ const adminUrl = await spo.getSpoAdminUrl(logger, this.verbose);
92
+ return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
93
+ }
94
+ }
95
+ export default new SpeContainerRecycleBinItemRestoreCommand();
96
+ //# sourceMappingURL=container-recyclebinitem-restore.js.map
@@ -7,6 +7,7 @@ export default {
7
7
  CONTAINER_REMOVE: `${prefix} container remove`,
8
8
  CONTAINER_PERMISSION_LIST: `${prefix} container permission list`,
9
9
  CONTAINER_RECYCLEBINITEM_LIST: `${prefix} container recyclebinitem list`,
10
+ CONTAINER_RECYCLEBINITEM_RESTORE: `${prefix} container recyclebinitem restore`,
10
11
  CONTAINERTYPE_ADD: `${prefix} containertype add`,
11
12
  CONTAINERTYPE_GET: `${prefix} containertype get`,
12
13
  CONTAINERTYPE_LIST: `${prefix} containertype list`,
@@ -43,6 +43,7 @@ export class BaseProjectCommand extends AnonymousCommand {
43
43
  this.readAndParseJsonFile(path.join(projectRootPath, 'tslint.json'), project, 'tsLintJsonRoot');
44
44
  this.readAndParseJsonFile(path.join(projectRootPath, 'config', 'write-manifests.json'), project, 'writeManifestsJson');
45
45
  this.readAndParseJsonFile(path.join(projectRootPath, '.yo-rc.json'), project, 'yoRcJson');
46
+ this.readAndParseJsonFile(path.join(projectRootPath, 'config', 'sass.json'), project, 'sassJson');
46
47
  const gulpfileJsPath = path.join(projectRootPath, 'gulpfile.js');
47
48
  if (fs.existsSync(gulpfileJsPath)) {
48
49
  project.gulpfileJs = {
@@ -8,6 +8,7 @@ import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types
8
8
  import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
9
9
  import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
10
10
  import { FN002019_DEVDEP_microsoft_rush_stack_compiler } from './rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js';
11
+ import { FN002022_DEVDEP_typescript } from './rules/FN002022_DEVDEP_typescript.js';
11
12
  import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
12
13
  export default [
13
14
  new FN001008_DEP_react('17'),
@@ -20,6 +21,7 @@ export default [
20
21
  new FN002016_DEVDEP_types_react_dom('17'),
21
22
  new FN002019_DEVDEP_microsoft_rush_stack_compiler(['5.3']),
22
23
  new FN002021_DEVDEP_rushstack_eslint_config('4.0.1'),
24
+ new FN002022_DEVDEP_typescript('~5.3.3'),
23
25
  new FN021001_PKG_spfx_deps_versions_match_project_version(true)
24
26
  ];
25
27
  //# sourceMappingURL=doctor-1.21.0.js.map
@@ -8,6 +8,7 @@ import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types
8
8
  import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
9
9
  import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
10
10
  import { FN002019_DEVDEP_microsoft_rush_stack_compiler } from './rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js';
11
+ import { FN002022_DEVDEP_typescript } from './rules/FN002022_DEVDEP_typescript.js';
11
12
  import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
12
13
  export default [
13
14
  new FN001008_DEP_react('17'),
@@ -20,6 +21,7 @@ export default [
20
21
  new FN002016_DEVDEP_types_react_dom('17'),
21
22
  new FN002019_DEVDEP_microsoft_rush_stack_compiler(['5.3']),
22
23
  new FN002021_DEVDEP_rushstack_eslint_config('4.0.1'),
24
+ new FN002022_DEVDEP_typescript('~5.3.3'),
23
25
  new FN021001_PKG_spfx_deps_versions_match_project_version(true)
24
26
  ];
25
27
  //# sourceMappingURL=doctor-1.21.1.js.map
@@ -0,0 +1,21 @@
1
+ import { FN002021_DEVDEP_rushstack_eslint_config } from '../project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js';
2
+ import { FN001008_DEP_react } from './rules/FN001008_DEP_react.js';
3
+ import { FN001009_DEP_react_dom } from './rules/FN001009_DEP_react_dom.js';
4
+ import { FN001035_DEP_fluentui_react } from './rules/FN001035_DEP_fluentui_react.js';
5
+ import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types_webpack_env.js';
6
+ import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
7
+ import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
8
+ import { FN002022_DEVDEP_typescript } from './rules/FN002022_DEVDEP_typescript.js';
9
+ import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
10
+ export default [
11
+ new FN001008_DEP_react('17'),
12
+ new FN001009_DEP_react_dom('17'),
13
+ new FN001035_DEP_fluentui_react('^8.106.4'),
14
+ new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
15
+ new FN002015_DEVDEP_types_react('17'),
16
+ new FN002016_DEVDEP_types_react_dom('17'),
17
+ new FN002021_DEVDEP_rushstack_eslint_config('4.3.0'),
18
+ new FN002022_DEVDEP_typescript('5.3.3'),
19
+ new FN021001_PKG_spfx_deps_versions_match_project_version(true)
20
+ ];
21
+ //# sourceMappingURL=doctor-1.22.0-beta.1.js.map
@@ -0,0 +1,10 @@
1
+ import { DependencyRule } from './DependencyRule.js';
2
+ export class FN002022_DEVDEP_typescript extends DependencyRule {
3
+ constructor(version) {
4
+ super('typescript', version, true);
5
+ }
6
+ get id() {
7
+ return 'FN002022';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN002022_DEVDEP_typescript.js.map
@@ -73,7 +73,8 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
73
73
  '1.19.0',
74
74
  '1.20.0',
75
75
  '1.21.0',
76
- '1.21.1'
76
+ '1.21.1',
77
+ '1.22.0-beta.1'
77
78
  ];
78
79
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
79
80
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SassJson.js.map
@@ -11,6 +11,7 @@ export * from './PackageJson.js';
11
11
  export * from './PackageSolutionJson.js';
12
12
  export * from './Project.js';
13
13
  export * from './ScssFile.js';
14
+ export * from './SassJson.js';
14
15
  export * from './ServeJson.js';
15
16
  export * from './TsConfigJson.js';
16
17
  export * from './TsFile.js';
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002001_DEVDEP_microsoft_sp_build_web extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('@microsoft/sp-build-web', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('@microsoft/sp-build-web', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002001';
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002004_DEVDEP_gulp extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('gulp', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('gulp', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002004';
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002007_DEVDEP_ajv extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('ajv', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('ajv', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002007';
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3 extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('@microsoft/rush-stack-compiler-5.3', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('@microsoft/rush-stack-compiler-5.3', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002029';
@@ -0,0 +1,10 @@
1
+ import { DependencyRule } from "./DependencyRule.js";
2
+ export class FN002030_DEVDEP_microsoft_spfx_web_build_rig extends DependencyRule {
3
+ constructor(packageVersion) {
4
+ super('@microsoft/spfx-web-build-rig', packageVersion, true);
5
+ }
6
+ get id() {
7
+ return 'FN002030';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN002030_DEVDEP_microsoft_spfx_web_build_rig.js.map
@@ -0,0 +1,10 @@
1
+ import { DependencyRule } from "./DependencyRule.js";
2
+ export class FN002031_DEVDEP_rushstack_heft extends DependencyRule {
3
+ constructor(packageVersion) {
4
+ super('@rushstack/heft', packageVersion, true);
5
+ }
6
+ get id() {
7
+ return 'FN002031';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN002031_DEVDEP_rushstack_heft.js.map
@@ -0,0 +1,10 @@
1
+ import { DependencyRule } from "./DependencyRule.js";
2
+ export class FN002032_DEVDEP_typescript_eslint_parser extends DependencyRule {
3
+ constructor(packageVersion) {
4
+ super('@typescript-eslint/parser', packageVersion, true);
5
+ }
6
+ get id() {
7
+ return 'FN002032';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN002032_DEVDEP_typescript_eslint_parser.js.map
@@ -0,0 +1,10 @@
1
+ import { DependencyRule } from "./DependencyRule.js";
2
+ export class FN002033_DEVDEP_jest_junit extends DependencyRule {
3
+ constructor(packageVersion) {
4
+ super('jest-junit', packageVersion, true);
5
+ }
6
+ get id() {
7
+ return 'FN002033';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN002033_DEVDEP_jest_junit.js.map
@@ -0,0 +1,40 @@
1
+ import { JsonRule } from '../../JsonRule.js';
2
+ export class FN010011_YORC_useGulp extends JsonRule {
3
+ constructor(useGulp) {
4
+ super();
5
+ this.useGulp = useGulp;
6
+ }
7
+ get id() {
8
+ return 'FN010011';
9
+ }
10
+ get title() {
11
+ return '.yo-rc.json useGulp';
12
+ }
13
+ get description() {
14
+ return `Update useGulp property in .yo-rc.json`;
15
+ }
16
+ get resolution() {
17
+ return `{
18
+ "useGulp": ${this.useGulp.toString()}
19
+ }`;
20
+ }
21
+ get resolutionType() {
22
+ return 'json';
23
+ }
24
+ get severity() {
25
+ return 'Recommended';
26
+ }
27
+ get file() {
28
+ return './.yo-rc.json';
29
+ }
30
+ visit(project, findings) {
31
+ if (!project.yoRcJson) {
32
+ return;
33
+ }
34
+ if (project.yoRcJson["@microsoft/generator-sharepoint"]?.useGulp !== this.useGulp) {
35
+ const node = this.getAstNodeFromFile(project.yoRcJson, '@microsoft/generator-sharepoint.useGulp');
36
+ this.addFindingWithPosition(findings, node);
37
+ }
38
+ }
39
+ }
40
+ //# sourceMappingURL=FN010011_YORC_useGulp.js.map
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015010_FILE_gulpfile_js extends FileAddRemoveRule {
3
+ constructor(add) {
4
+ super('./gulpfile.js', add);
5
+ }
6
+ get id() {
7
+ return 'FN015010';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015010_FILE_gulpfile_js.js.map
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015011_FILE_tsconfig_json extends FileAddRemoveRule {
3
+ constructor(add, contents) {
4
+ super('./tsconfig.json', add, contents);
5
+ }
6
+ get id() {
7
+ return 'FN015011';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015011_FILE_tsconfig_json.js.map
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015012_FILE_config_heft_json extends FileAddRemoveRule {
3
+ constructor(add, contents) {
4
+ super('./config/heft.json', add, contents);
5
+ }
6
+ get id() {
7
+ return 'FN015012';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015012_FILE_config_heft_json.js.map
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015013_FILE_config_jest_config_json extends FileAddRemoveRule {
3
+ constructor(add, contents) {
4
+ super('./config/jest.config.json', add, contents);
5
+ }
6
+ get id() {
7
+ return 'FN015013';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015013_FILE_config_jest_config_json.js.map
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015014_FILE_config_rig_json extends FileAddRemoveRule {
3
+ constructor(add, contents) {
4
+ super('./config/rig.json', add, contents);
5
+ }
6
+ get id() {
7
+ return 'FN015014';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015014_FILE_config_rig_json.js.map
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015015_FILE_config_typescript_json extends FileAddRemoveRule {
3
+ constructor(add, contents) {
4
+ super('./config/typescript.json', add, contents);
5
+ }
6
+ get id() {
7
+ return 'FN015015';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015015_FILE_config_typescript_json.js.map
@@ -0,0 +1,45 @@
1
+ import { JsonRule } from "../../JsonRule.js";
2
+ export class FN021004_PKG_scripts_build extends JsonRule {
3
+ constructor(script) {
4
+ super();
5
+ this.script = script;
6
+ }
7
+ get id() {
8
+ return 'FN021004';
9
+ }
10
+ get title() {
11
+ return 'package.json scripts.build';
12
+ }
13
+ get description() {
14
+ return 'Update package.json scripts.build property';
15
+ }
16
+ get resolution() {
17
+ return `{
18
+ "scripts": {
19
+ "build": "${this.script}"
20
+ }
21
+ }`;
22
+ }
23
+ get resolutionType() {
24
+ return 'json';
25
+ }
26
+ get severity() {
27
+ return 'Required';
28
+ }
29
+ get file() {
30
+ return './package.json';
31
+ }
32
+ visit(project, findings) {
33
+ if (!project.packageJson) {
34
+ return;
35
+ }
36
+ if (!project.packageJson.scripts ||
37
+ typeof project.packageJson.scripts !== 'object' ||
38
+ !project.packageJson.scripts.build ||
39
+ project.packageJson.scripts.build !== this.script) {
40
+ const node = this.getAstNodeFromFile(project.packageJson, 'scripts.build');
41
+ this.addFindingWithPosition(findings, node);
42
+ }
43
+ }
44
+ }
45
+ //# sourceMappingURL=FN021004_PKG_scripts_build.js.map
@@ -0,0 +1,45 @@
1
+ import { JsonRule } from "../../JsonRule.js";
2
+ export class FN021005_PKG_scripts_test extends JsonRule {
3
+ constructor(script) {
4
+ super();
5
+ this.script = script;
6
+ }
7
+ get id() {
8
+ return 'FN021005';
9
+ }
10
+ get title() {
11
+ return 'package.json scripts.test';
12
+ }
13
+ get description() {
14
+ return 'Update package.json scripts.test property';
15
+ }
16
+ get resolution() {
17
+ return `{
18
+ "scripts": {
19
+ "test": "${this.script}"
20
+ }
21
+ }`;
22
+ }
23
+ get resolutionType() {
24
+ return 'json';
25
+ }
26
+ get severity() {
27
+ return 'Required';
28
+ }
29
+ get file() {
30
+ return './package.json';
31
+ }
32
+ visit(project, findings) {
33
+ if (!project.packageJson) {
34
+ return;
35
+ }
36
+ if (!project.packageJson.scripts ||
37
+ typeof project.packageJson.scripts !== 'object' ||
38
+ !project.packageJson.scripts.test ||
39
+ project.packageJson.scripts.test !== this.script) {
40
+ const node = this.getAstNodeFromFile(project.packageJson, 'scripts.test');
41
+ this.addFindingWithPosition(findings, node);
42
+ }
43
+ }
44
+ }
45
+ //# sourceMappingURL=FN021005_PKG_scripts_test.js.map
@@ -0,0 +1,45 @@
1
+ import { JsonRule } from "../../JsonRule.js";
2
+ export class FN021006_PKG_scripts_clean extends JsonRule {
3
+ constructor(script) {
4
+ super();
5
+ this.script = script;
6
+ }
7
+ get id() {
8
+ return 'FN021006';
9
+ }
10
+ get title() {
11
+ return 'package.json scripts.clean';
12
+ }
13
+ get description() {
14
+ return 'Update package.json scripts.clean property';
15
+ }
16
+ get resolution() {
17
+ return `{
18
+ "scripts": {
19
+ "clean": "${this.script}"
20
+ }
21
+ }`;
22
+ }
23
+ get resolutionType() {
24
+ return 'json';
25
+ }
26
+ get severity() {
27
+ return 'Required';
28
+ }
29
+ get file() {
30
+ return './package.json';
31
+ }
32
+ visit(project, findings) {
33
+ if (!project.packageJson) {
34
+ return;
35
+ }
36
+ if (!project.packageJson.scripts ||
37
+ typeof project.packageJson.scripts !== 'object' ||
38
+ !project.packageJson.scripts.clean ||
39
+ project.packageJson.scripts.clean !== this.script) {
40
+ const node = this.getAstNodeFromFile(project.packageJson, 'scripts.clean');
41
+ this.addFindingWithPosition(findings, node);
42
+ }
43
+ }
44
+ }
45
+ //# sourceMappingURL=FN021006_PKG_scripts_clean.js.map
@@ -0,0 +1,45 @@
1
+ import { JsonRule } from "../../JsonRule.js";
2
+ export class FN021007_PKG_scripts_deploy extends JsonRule {
3
+ constructor(script) {
4
+ super();
5
+ this.script = script;
6
+ }
7
+ get id() {
8
+ return 'FN021007';
9
+ }
10
+ get title() {
11
+ return 'package.json scripts.deploy';
12
+ }
13
+ get description() {
14
+ return 'Update package.json scripts.deploy property';
15
+ }
16
+ get resolution() {
17
+ return `{
18
+ "scripts": {
19
+ "deploy": "${this.script}"
20
+ }
21
+ }`;
22
+ }
23
+ get resolutionType() {
24
+ return 'json';
25
+ }
26
+ get severity() {
27
+ return 'Required';
28
+ }
29
+ get file() {
30
+ return './package.json';
31
+ }
32
+ visit(project, findings) {
33
+ if (!project.packageJson) {
34
+ return;
35
+ }
36
+ if (!project.packageJson.scripts ||
37
+ typeof project.packageJson.scripts !== 'object' ||
38
+ !project.packageJson.scripts.deploy ||
39
+ project.packageJson.scripts.deploy !== this.script) {
40
+ const node = this.getAstNodeFromFile(project.packageJson, 'scripts.deploy');
41
+ this.addFindingWithPosition(findings, node);
42
+ }
43
+ }
44
+ }
45
+ //# sourceMappingURL=FN021007_PKG_scripts_deploy.js.map
@@ -0,0 +1,45 @@
1
+ import { JsonRule } from "../../JsonRule.js";
2
+ export class FN021008_PKG_scripts_start extends JsonRule {
3
+ constructor(script) {
4
+ super();
5
+ this.script = script;
6
+ }
7
+ get id() {
8
+ return 'FN021008';
9
+ }
10
+ get title() {
11
+ return 'package.json scripts.start';
12
+ }
13
+ get description() {
14
+ return 'Update package.json scripts.start property';
15
+ }
16
+ get resolution() {
17
+ return `{
18
+ "scripts": {
19
+ "start": "${this.script}"
20
+ }
21
+ }`;
22
+ }
23
+ get resolutionType() {
24
+ return 'json';
25
+ }
26
+ get severity() {
27
+ return 'Required';
28
+ }
29
+ get file() {
30
+ return './package.json';
31
+ }
32
+ visit(project, findings) {
33
+ if (!project.packageJson) {
34
+ return;
35
+ }
36
+ if (!project.packageJson.scripts ||
37
+ typeof project.packageJson.scripts !== 'object' ||
38
+ !project.packageJson.scripts.start ||
39
+ project.packageJson.scripts.start !== this.script) {
40
+ const node = this.getAstNodeFromFile(project.packageJson, 'scripts.start');
41
+ this.addFindingWithPosition(findings, node);
42
+ }
43
+ }
44
+ }
45
+ //# sourceMappingURL=FN021008_PKG_scripts_start.js.map