@pnp/cli-microsoft365 11.3.0-beta.b2b02ae → 11.3.0

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 (30) hide show
  1. package/allCommandsFull.json +1 -1
  2. package/dist/m365/onenote/commands/notebook/notebook-add.js +4 -3
  3. package/dist/m365/onenote/commands/notebook/notebook-list.js +6 -17
  4. package/dist/m365/onenote/commands/page/page-list.js +5 -8
  5. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.22.0-rc.0.js → doctor-1.22.0.js} +1 -1
  6. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.1.js +21 -0
  7. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  8. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014003_CODE_launch.js +7 -44
  9. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021005_PKG_scripts_test.js +18 -9
  10. package/dist/m365/spfx/commands/project/project-upgrade/rules/{FN021008_PKG_scripts_start.js → FN021007_PKG_scripts_start.js} +3 -3
  11. package/dist/m365/spfx/commands/project/project-upgrade/rules/{FN021012_PKG_scripts_eject_webpack.js → FN021008_PKG_scripts_eject_webpack.js} +3 -3
  12. package/dist/m365/spfx/commands/project/project-upgrade/rules/{FN021013_PKG_overrides_rushstack_heft.js → FN021009_PKG_overrides_rushstack_heft.js} +3 -3
  13. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.22.0-rc.0.js → upgrade-1.22.0.js} +60 -50
  14. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.1.js +55 -0
  15. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.4.js +42 -1
  16. package/dist/m365/spfx/commands/project/project-upgrade.js +12 -11
  17. package/dist/m365/spfx/commands/spfx-doctor.js +41 -1
  18. package/dist/utils/stringUtil.js +4 -0
  19. package/docs/docs/cmd/login.mdx +35 -11
  20. package/docs/docs/cmd/onenote/notebook/notebook-add.mdx +17 -0
  21. package/docs/docs/cmd/onenote/notebook/notebook-list.mdx +17 -0
  22. package/docs/docs/cmd/onenote/page/page-list.mdx +18 -1
  23. package/package.json +2 -2
  24. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021007_PKG_scripts_deploy.js +0 -45
  25. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021009_PKG_scripts_build_watch.js +0 -45
  26. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021010_PKG_scripts_package_solution.js +0 -45
  27. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021011_PKG_scripts_deploy_azure_storage.js +0 -45
  28. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021014_PKG_scripts_test_only.js +0 -45
  29. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021015_PKG_scripts_trust_dev_cert.js +0 -45
  30. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021016_PKG_scripts_untrust_dev_cert.js +0 -45
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
4
  // uncomment to support upgrading to preview releases
5
- import { prerelease } from 'semver';
5
+ // import { prerelease } from 'semver';
6
6
  import { z } from 'zod';
7
7
  import { CommandError, globalOptionsZod } from '../../../../Command.js';
8
8
  import { fsUtil } from '../../../../utils/fsUtil.js';
@@ -85,7 +85,8 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
85
85
  '1.20.0',
86
86
  '1.21.0',
87
87
  '1.21.1',
88
- '1.22.0-rc.0'
88
+ '1.22.0',
89
+ '1.22.1'
89
90
  ];
90
91
  }
91
92
  async commandAction(logger, args) {
@@ -95,15 +96,15 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
95
96
  }
96
97
  this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
97
98
  // uncomment to support upgrading to preview releases
98
- if (!args.options.toVersion &&
99
- !args.options.preview &&
100
- prerelease(this.toVersion)) {
101
- // no version and no preview specified while the current version to
102
- // upgrade to is a prerelease so let's grab the first non-preview version
103
- // since we're supporting only one preview version, it's sufficient for
104
- // us to take second to last version
105
- this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
106
- }
99
+ // if (!args.options.toVersion &&
100
+ // !args.options.preview &&
101
+ // prerelease(this.toVersion)) {
102
+ // // no version and no preview specified while the current version to
103
+ // // upgrade to is a prerelease so let's grab the first non-preview version
104
+ // // since we're supporting only one preview version, it's sufficient for
105
+ // // us to take second to last version
106
+ // this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
107
+ // }
107
108
  this.packageManager = args.options.packageManager || 'npm';
108
109
  this.shell = args.options.shell || 'powershell';
109
110
  if (this.supportedVersions.indexOf(this.toVersion) < 0) {
@@ -621,7 +621,26 @@ class SpfxDoctorCommand extends BaseProjectCommand {
621
621
  fix: 'npm i -g yo@5'
622
622
  }
623
623
  },
624
- '1.22.0-rc.0': {
624
+ '1.22.0': {
625
+ heft: {
626
+ range: '^1',
627
+ fix: 'npm i -g @rushstack/heft@1'
628
+ },
629
+ node: {
630
+ range: '>=22.14.0 < 23.0.0',
631
+ fix: 'Install Node.js >=22.14.0 < 23.0.0'
632
+ },
633
+ sp: SharePointVersion.SPO,
634
+ yo: {
635
+ range: '^4 || ^5 || ^6',
636
+ fix: 'npm i -g yo@6'
637
+ }
638
+ },
639
+ '1.22.1': {
640
+ heft: {
641
+ range: '^1',
642
+ fix: 'npm i -g @rushstack/heft@1'
643
+ },
625
644
  node: {
626
645
  range: '>=22.14.0 < 23.0.0',
627
646
  fix: 'Install Node.js >=22.14.0 < 23.0.0'
@@ -702,6 +721,7 @@ class SpfxDoctorCommand extends BaseProjectCommand {
702
721
  await this.checkYo(prerequisites);
703
722
  await this.checkGulp();
704
723
  await this.checkGulpCli(prerequisites);
724
+ await this.checkHeft(prerequisites);
705
725
  await this.checkTypeScript();
706
726
  if (this.resultsObject.some(y => y.fix !== undefined)) {
707
727
  await this.logMessage('Recommended fixes:');
@@ -831,6 +851,26 @@ class SpfxDoctorCommand extends BaseProjectCommand {
831
851
  await this.logMessage(formatting.getStatus(CheckStatus.Failure, message));
832
852
  }
833
853
  }
854
+ async checkHeft(prerequisites) {
855
+ if (!prerequisites.heft) {
856
+ // heft is not required for this version of SPFx
857
+ return;
858
+ }
859
+ const heftVersion = await this.getPackageVersion('@rushstack/heft', PackageSearchMode.GlobalOnly, HandlePromise.Continue);
860
+ if (heftVersion) {
861
+ await this.checkStatus('@rushstack/heft', heftVersion, prerequisites.heft);
862
+ }
863
+ else {
864
+ const message = '@rushstack/heft not found';
865
+ this.resultsObject.push({
866
+ check: '@rushstack/heft',
867
+ passed: false,
868
+ message: message,
869
+ fix: prerequisites.heft.fix
870
+ });
871
+ await this.logMessage(formatting.getStatus(CheckStatus.Failure, message));
872
+ }
873
+ }
834
874
  async checkGulp() {
835
875
  const gulpVersion = await this.getPackageVersion('gulp', PackageSearchMode.GlobalOnly, HandlePromise.Continue);
836
876
  if (gulpVersion) {
@@ -0,0 +1,4 @@
1
+ export const stringUtil = {
2
+ normalizeLineEndings: (str) => str?.replace(/\r\n/g, '\n')
3
+ };
4
+ //# sourceMappingURL=stringUtil.js.map
@@ -118,54 +118,72 @@ Log in to Microsoft 365 using your own Microsoft Entra application and a persona
118
118
  m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
119
119
  ```
120
120
 
121
- Log in to Microsoft 365 using a user name and password with `clientId` set in the configuration.
121
+ Log in to Microsoft 365 using a user name and password by providing the application and tenant identifiers explicitly.
122
122
 
123
123
  ```sh
124
- m365 login --authType password --userName user@contoso.com --password pass@word1
124
+ m365 login --authType password --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --userName user@contoso.com --password pass@word1
125
125
  ```
126
126
 
127
- Log in to Microsoft 365 using a PEM certificate with `clientId` set in the configuration.
127
+ Log in to Microsoft 365 using a PEM certificate with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
128
128
 
129
129
  ```sh
130
130
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem
131
131
  ```
132
132
 
133
- Log in to Microsoft 365 using a PEM certificate with `clientId` set in the configuration. Use the specified thumbprint.
133
+ Log in to Microsoft 365 using a PEM certificate and a specific thumbprint with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
134
134
 
135
135
  ```sh
136
- m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1
136
+ m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pem --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1
137
137
  ```
138
138
 
139
- Log in to Microsoft 365 using a personal information exchange (.pfx) file with `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
139
+ Log in to Microsoft 365 using a PEM certificate by providing the application and tenant identifiers explicitly.
140
+
141
+ ```sh
142
+ m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pem
143
+ ```
144
+
145
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
140
146
 
141
147
  ```sh
142
148
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
143
149
  ```
144
150
 
145
- Log in to Microsoft 365 using a personal information exchange (.pfx) file protected with an empty password and `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
151
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file protected with an empty password with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
146
152
 
147
153
  ```sh
148
154
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --password
149
155
  ```
150
156
 
151
- Log in to Microsoft 365 using a personal information exchange (.pfx) file not protected with a password and `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
157
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file not protected with a password with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
152
158
 
153
159
  ```sh
154
160
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx
155
161
  ```
156
162
 
157
- Log in to Microsoft 365 using a personal information exchange (.pfx) file. Use the specified thumbprint and `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
163
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file and a specific thumbprint with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
158
164
 
159
165
  ```sh
160
166
  m365 login --authType certificate --certificateFile /Users/user/dev/localhost.pfx --thumbprint 47C4885736C624E90491F32B98855AA8A7562AF1 --password 'pass@word1'
161
167
  ```
162
168
 
163
- Log in to Microsoft 365 using a certificate from a base64-encoded string with `CLIMICROSOFT365_ENTRAAPPID` environment variable set.
169
+ Log in to Microsoft 365 using a personal information exchange (.pfx) file by providing the application and tenant identifiers explicitly.
170
+
171
+ ```sh
172
+ m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
173
+ ```
174
+
175
+ Log in to Microsoft 365 using a certificate from a base64-encoded string with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
164
176
 
165
177
  ```sh
166
178
  m365 login --authType certificate --certificateBase64Encoded MIII2QIBAzCCCJ8GCSqGSIb3DQEHAaCCCJAEg...eX1N5AgIIAA== --thumbprint D0C9B442DE249F55D10CDA1A2418952DC7D407A3
167
179
  ```
168
180
 
181
+ Log in to Microsoft 365 using a certificate from a base64-encoded string by providing the application and tenant identifiers explicitly.
182
+
183
+ ```sh
184
+ m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateBase64Encoded MIII2QIBAzCCCJ8GCSqGSIb3DQEHAaCCCJAEg...eX1N5AgIIAA== --thumbprint D0C9B442DE249F55D10CDA1A2418952DC7D407A3
185
+ ```
186
+
169
187
  Log in to Microsoft 365 using a system assigned managed identity with `clientId` set in the configuration. Applies to Azure resources with managed identity enabled, such as Azure Virtual Machines, Azure App Service or Azure Functions.
170
188
 
171
189
  ```sh
@@ -196,12 +214,18 @@ Log in to Microsoft 365 using the interactive browser authentication with `clien
196
214
  m365 login --authType browser
197
215
  ```
198
216
 
199
- Log in to Microsoft 365 using a client secret with `clientId` set in the configuration.
217
+ Log in to Microsoft 365 using a client secret with `CLIMICROSOFT365_ENTRAAPPID` and `CLIMICROSOFT365_TENANT` environment variables set.
200
218
 
201
219
  ```sh
202
220
  m365 login --authType secret --secret topSeCr3t@007
203
221
  ```
204
222
 
223
+ Log in to Microsoft 365 using a client secret by providing the application and tenant identifiers explicitly.
224
+
225
+ ```sh
226
+ m365 login --authType secret --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --secret topSeCr3t@007
227
+ ```
228
+
205
229
  Ensures that the user is signed in, initiates the login flow if the user isn't signed in
206
230
 
207
231
  ```sh
@@ -36,6 +36,23 @@ m365 onenote notebook add [options]
36
36
 
37
37
  <Global />
38
38
 
39
+ ## Permissions
40
+
41
+ <Tabs>
42
+ <TabItem value="Delegated">
43
+
44
+ | Resource | Permissions |
45
+ |-----------------|------------------------------------------------------------------|
46
+ | Microsoft Graph | Notes.Create, Sites.Read.All, User.ReadBasic.All, Group.Read.All |
47
+
48
+ </TabItem>
49
+ <TabItem value="Application">
50
+
51
+ This command does not support application permissions.
52
+
53
+ </TabItem>
54
+ </Tabs>
55
+
39
56
  ## Examples
40
57
 
41
58
  Create a Microsoft OneNote notebook for the currently logged in user
@@ -33,6 +33,23 @@ m365 onenote notebook list [options]
33
33
 
34
34
  <Global />
35
35
 
36
+ ## Permissions
37
+
38
+ <Tabs>
39
+ <TabItem value="Delegated">
40
+
41
+ | Resource | Permissions |
42
+ |-----------------|--------------------------------------------------------------------|
43
+ | Microsoft Graph | Notes.Read.All, Sites.Read.All, User.ReadBasic.All, Group.Read.All |
44
+
45
+ </TabItem>
46
+ <TabItem value="Application">
47
+
48
+ This command does not support application permissions.
49
+
50
+ </TabItem>
51
+ </Tabs>
52
+
36
53
  ## Examples
37
54
 
38
55
  List Microsoft OneNote notebooks for the currently logged in user
@@ -35,7 +35,24 @@ m365 onenote page list [options]
35
35
 
36
36
  ## Remarks
37
37
 
38
- When we don't specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, the OneNote pages will be retrieved of the currently logged in user.
38
+ When you don't specify either `userId`, `userName`, `groupId`, `groupName` or `webUrl`, the OneNote pages will be retrieved of the currently logged in user.
39
+
40
+ ## Permissions
41
+
42
+ <Tabs>
43
+ <TabItem value="Delegated">
44
+
45
+ | Resource | Permissions |
46
+ |-----------------|--------------------------------------------------------------------|
47
+ | Microsoft Graph | Notes.Read.All, Sites.Read.All, User.ReadBasic.All, Group.Read.All |
48
+
49
+ </TabItem>
50
+ <TabItem value="Application">
51
+
52
+ This command does not support application permissions.
53
+
54
+ </TabItem>
55
+ </Tabs>
39
56
 
40
57
  ## Examples
41
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "11.3.0-beta.b2b02ae",
3
+ "version": "11.3.0",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -323,4 +323,4 @@
323
323
  "source-map-support": "^0.5.21",
324
324
  "tsc-watch": "^7.2.0"
325
325
  }
326
- }
326
+ }
@@ -1,45 +0,0 @@
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
@@ -1,45 +0,0 @@
1
- import { JsonRule } from "../../JsonRule.js";
2
- export class FN021009_PKG_scripts_build_watch extends JsonRule {
3
- constructor(script) {
4
- super();
5
- this.script = script;
6
- }
7
- get id() {
8
- return 'FN021009';
9
- }
10
- get title() {
11
- return 'package.json scripts.build-watch';
12
- }
13
- get description() {
14
- return 'Update package.json scripts.build-watch property';
15
- }
16
- get resolution() {
17
- return `{
18
- "scripts": {
19
- "build-watch": "${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-watch'] ||
39
- project.packageJson.scripts['build-watch'] !== this.script) {
40
- const node = this.getAstNodeFromFile(project.packageJson, 'scripts.build-watch');
41
- this.addFindingWithPosition(findings, node);
42
- }
43
- }
44
- }
45
- //# sourceMappingURL=FN021009_PKG_scripts_build_watch.js.map
@@ -1,45 +0,0 @@
1
- import { JsonRule } from "../../JsonRule.js";
2
- export class FN021010_PKG_scripts_package_solution extends JsonRule {
3
- constructor(script) {
4
- super();
5
- this.script = script;
6
- }
7
- get id() {
8
- return 'FN021010';
9
- }
10
- get title() {
11
- return 'package.json scripts.package-solution';
12
- }
13
- get description() {
14
- return 'Update package.json scripts.package-solution property';
15
- }
16
- get resolution() {
17
- return `{
18
- "scripts": {
19
- "package-solution": "${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['package-solution'] ||
39
- project.packageJson.scripts['package-solution'] !== this.script) {
40
- const node = this.getAstNodeFromFile(project.packageJson, 'scripts.package-solution');
41
- this.addFindingWithPosition(findings, node);
42
- }
43
- }
44
- }
45
- //# sourceMappingURL=FN021010_PKG_scripts_package_solution.js.map
@@ -1,45 +0,0 @@
1
- import { JsonRule } from "../../JsonRule.js";
2
- export class FN021011_PKG_scripts_deploy_azure_storage extends JsonRule {
3
- constructor(script) {
4
- super();
5
- this.script = script;
6
- }
7
- get id() {
8
- return 'FN021011';
9
- }
10
- get title() {
11
- return 'package.json scripts.deploy-azure-storage';
12
- }
13
- get description() {
14
- return 'Update package.json scripts.deploy-azure-storage property';
15
- }
16
- get resolution() {
17
- return `{
18
- "scripts": {
19
- "deploy-azure-storage": "${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-azure-storage'] ||
39
- project.packageJson.scripts['deploy-azure-storage'] !== this.script) {
40
- const node = this.getAstNodeFromFile(project.packageJson, 'scripts.deploy-azure-storage');
41
- this.addFindingWithPosition(findings, node);
42
- }
43
- }
44
- }
45
- //# sourceMappingURL=FN021011_PKG_scripts_deploy_azure_storage.js.map
@@ -1,45 +0,0 @@
1
- import { JsonRule } from "../../JsonRule.js";
2
- export class FN021014_PKG_scripts_test_only extends JsonRule {
3
- constructor(script) {
4
- super();
5
- this.script = script;
6
- }
7
- get id() {
8
- return 'FN021014';
9
- }
10
- get title() {
11
- return 'package.json scripts.test-only';
12
- }
13
- get description() {
14
- return 'Add package.json scripts.test-only property';
15
- }
16
- get resolution() {
17
- return `{
18
- "scripts": {
19
- "test-only": "${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-only'] ||
39
- project.packageJson.scripts['test-only'] !== this.script) {
40
- const node = this.getAstNodeFromFile(project.packageJson, 'scripts.test-only');
41
- this.addFindingWithPosition(findings, node);
42
- }
43
- }
44
- }
45
- //# sourceMappingURL=FN021014_PKG_scripts_test_only.js.map
@@ -1,45 +0,0 @@
1
- import { JsonRule } from "../../JsonRule.js";
2
- export class FN021015_PKG_scripts_trust_dev_cert extends JsonRule {
3
- constructor(script) {
4
- super();
5
- this.script = script;
6
- }
7
- get id() {
8
- return 'FN021015';
9
- }
10
- get title() {
11
- return 'package.json scripts.trust-dev-cert';
12
- }
13
- get description() {
14
- return 'Add package.json scripts.trust-dev-cert property';
15
- }
16
- get resolution() {
17
- return `{
18
- "scripts": {
19
- "trust-dev-cert": "${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['trust-dev-cert'] ||
39
- project.packageJson.scripts['trust-dev-cert'] !== this.script) {
40
- const node = this.getAstNodeFromFile(project.packageJson, 'scripts.trust-dev-cert');
41
- this.addFindingWithPosition(findings, node);
42
- }
43
- }
44
- }
45
- //# sourceMappingURL=FN021015_PKG_scripts_trust_dev_cert.js.map
@@ -1,45 +0,0 @@
1
- import { JsonRule } from "../../JsonRule.js";
2
- export class FN021016_PKG_scripts_untrust_dev_cert extends JsonRule {
3
- constructor(script) {
4
- super();
5
- this.script = script;
6
- }
7
- get id() {
8
- return 'FN021016';
9
- }
10
- get title() {
11
- return 'package.json scripts.untrust-dev-cert';
12
- }
13
- get description() {
14
- return 'Add package.json scripts.untrust-dev-cert property';
15
- }
16
- get resolution() {
17
- return `{
18
- "scripts": {
19
- "untrust-dev-cert": "${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['untrust-dev-cert'] ||
39
- project.packageJson.scripts['untrust-dev-cert'] !== this.script) {
40
- const node = this.getAstNodeFromFile(project.packageJson, 'scripts.untrust-dev-cert');
41
- this.addFindingWithPosition(findings, node);
42
- }
43
- }
44
- }
45
- //# sourceMappingURL=FN021016_PKG_scripts_untrust_dev_cert.js.map