@automattic/jetpack-scan 0.5.0 → 0.5.2
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.
- package/CHANGELOG.md +10 -0
- package/build/types/threats.d.ts +1 -1
- package/build/utils/index.d.ts +1 -1
- package/build/utils/index.js +6 -7
- package/package.json +8 -8
- package/src/types/threats.ts +1 -1
- package/src/utils/index.ts +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.5.2] - 2024-12-16
|
|
9
|
+
### Changed
|
|
10
|
+
- Updated package dependencies. [#40564]
|
|
11
|
+
|
|
12
|
+
## [0.5.1] - 2024-12-09
|
|
13
|
+
### Changed
|
|
14
|
+
- Internal updates.
|
|
15
|
+
|
|
8
16
|
## [0.5.0] - 2024-12-04
|
|
9
17
|
### Added
|
|
10
18
|
- Added more types for working with scan results. [#40399]
|
|
@@ -79,6 +87,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
79
87
|
### Removed
|
|
80
88
|
- Updated dependencies. [#39754]
|
|
81
89
|
|
|
90
|
+
[0.5.2]: https://github.com/Automattic/jetpack-scan/compare/v0.5.1...v0.5.2
|
|
91
|
+
[0.5.1]: https://github.com/Automattic/jetpack-scan/compare/v0.5.0...v0.5.1
|
|
82
92
|
[0.5.0]: https://github.com/Automattic/jetpack-scan/compare/v0.4.1...v0.5.0
|
|
83
93
|
[0.4.1]: https://github.com/Automattic/jetpack-scan/compare/v0.4.0...v0.4.1
|
|
84
94
|
[0.4.0]: https://github.com/Automattic/jetpack-scan/compare/v0.3.0...v0.4.0
|
package/build/types/threats.d.ts
CHANGED
package/build/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ThreatFixStatus } from '../types/fixers.js';
|
|
2
2
|
import { type Threat } from '../types/threats.js';
|
|
3
|
-
export declare const getThreatType: (threat: Threat) => "
|
|
3
|
+
export declare const getThreatType: (threat: Threat) => "plugins" | "themes" | "core" | "file";
|
|
4
4
|
export declare const fixerTimestampIsStale: (lastUpdatedTimestamp: string) => boolean;
|
|
5
5
|
export declare const fixerIsInError: (fixerStatus: ThreatFixStatus) => boolean;
|
|
6
6
|
export declare const fixerIsInProgress: (fixerStatus: ThreatFixStatus) => boolean;
|
package/build/utils/index.js
CHANGED
|
@@ -55,22 +55,21 @@ export const getDetailedFixerAction = (threat) => {
|
|
|
55
55
|
if (threat.filename) {
|
|
56
56
|
return __('Delete file', 'jetpack-scan');
|
|
57
57
|
}
|
|
58
|
-
if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === '
|
|
58
|
+
if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === 'plugins') {
|
|
59
59
|
return __('Delete plugin from site', 'jetpack-scan');
|
|
60
60
|
}
|
|
61
|
-
if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === '
|
|
61
|
+
if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === 'themes') {
|
|
62
62
|
return __('Delete theme from site', 'jetpack-scan');
|
|
63
63
|
}
|
|
64
64
|
break;
|
|
65
65
|
case 'update':
|
|
66
|
-
if (((_c = threat.extension) === null || _c === void 0 ? void 0 : _c.type) === '
|
|
66
|
+
if (((_c = threat.extension) === null || _c === void 0 ? void 0 : _c.type) === 'plugins') {
|
|
67
67
|
return __('Update plugin to newer version', 'jetpack-scan');
|
|
68
68
|
}
|
|
69
|
-
if (((_d = threat.extension) === null || _d === void 0 ? void 0 : _d.type) === '
|
|
69
|
+
if (((_d = threat.extension) === null || _d === void 0 ? void 0 : _d.type) === 'themes') {
|
|
70
70
|
return __('Update theme to newer version', 'jetpack-scan');
|
|
71
71
|
}
|
|
72
72
|
return __('Update', 'jetpack-scan');
|
|
73
|
-
break;
|
|
74
73
|
case 'replace':
|
|
75
74
|
case 'rollback':
|
|
76
75
|
if (threat.filename) {
|
|
@@ -97,10 +96,10 @@ export const getFixerDescription = (threat) => {
|
|
|
97
96
|
}
|
|
98
97
|
return __('Delete the infected file.', 'jetpack-scan');
|
|
99
98
|
}
|
|
100
|
-
if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === '
|
|
99
|
+
if (((_a = threat.extension) === null || _a === void 0 ? void 0 : _a.type) === 'plugins') {
|
|
101
100
|
return __('Delete the plugin directory to fix the threat.', 'jetpack-scan');
|
|
102
101
|
}
|
|
103
|
-
if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === '
|
|
102
|
+
if (((_b = threat.extension) === null || _b === void 0 ? void 0 : _b.type) === 'themes') {
|
|
104
103
|
return __('Delete the theme directory to fix the threat.', 'jetpack-scan');
|
|
105
104
|
}
|
|
106
105
|
break;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@automattic/jetpack-scan",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"description": "A JS client for consuming Jetpack Scan services",
|
|
6
6
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/scan/#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"main": "./build/index.js",
|
|
46
46
|
"types": "./build/index.d.ts",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@automattic/jetpack-api": "^0.17.
|
|
49
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
50
|
-
"@wordpress/api-fetch": "7.
|
|
51
|
-
"@wordpress/element": "6.
|
|
52
|
-
"@wordpress/i18n": "5.
|
|
53
|
-
"@wordpress/url": "4.
|
|
48
|
+
"@automattic/jetpack-api": "^0.17.21",
|
|
49
|
+
"@automattic/jetpack-base-styles": "^0.6.39",
|
|
50
|
+
"@wordpress/api-fetch": "7.14.0",
|
|
51
|
+
"@wordpress/element": "6.14.0",
|
|
52
|
+
"@wordpress/i18n": "5.14.0",
|
|
53
|
+
"@wordpress/url": "4.14.0",
|
|
54
54
|
"debug": "4.3.4",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@wordpress/i18n": "5.
|
|
59
|
+
"@wordpress/i18n": "5.14.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0"
|
|
62
62
|
}
|
package/src/types/threats.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -68,23 +68,22 @@ export const getDetailedFixerAction = ( threat: Threat ) => {
|
|
|
68
68
|
return __( 'Delete file', 'jetpack-scan' );
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
if ( threat.extension?.type === '
|
|
71
|
+
if ( threat.extension?.type === 'plugins' ) {
|
|
72
72
|
return __( 'Delete plugin from site', 'jetpack-scan' );
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
if ( threat.extension?.type === '
|
|
75
|
+
if ( threat.extension?.type === 'themes' ) {
|
|
76
76
|
return __( 'Delete theme from site', 'jetpack-scan' );
|
|
77
77
|
}
|
|
78
78
|
break;
|
|
79
79
|
case 'update':
|
|
80
|
-
if ( threat.extension?.type === '
|
|
80
|
+
if ( threat.extension?.type === 'plugins' ) {
|
|
81
81
|
return __( 'Update plugin to newer version', 'jetpack-scan' );
|
|
82
82
|
}
|
|
83
|
-
if ( threat.extension?.type === '
|
|
83
|
+
if ( threat.extension?.type === 'themes' ) {
|
|
84
84
|
return __( 'Update theme to newer version', 'jetpack-scan' );
|
|
85
85
|
}
|
|
86
86
|
return __( 'Update', 'jetpack-scan' );
|
|
87
|
-
break;
|
|
88
87
|
case 'replace':
|
|
89
88
|
case 'rollback':
|
|
90
89
|
if ( threat.filename ) {
|
|
@@ -115,11 +114,11 @@ export const getFixerDescription = ( threat: Threat ) => {
|
|
|
115
114
|
return __( 'Delete the infected file.', 'jetpack-scan' );
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
if ( threat.extension?.type === '
|
|
117
|
+
if ( threat.extension?.type === 'plugins' ) {
|
|
119
118
|
return __( 'Delete the plugin directory to fix the threat.', 'jetpack-scan' );
|
|
120
119
|
}
|
|
121
120
|
|
|
122
|
-
if ( threat.extension?.type === '
|
|
121
|
+
if ( threat.extension?.type === 'themes' ) {
|
|
123
122
|
return __( 'Delete the theme directory to fix the threat.', 'jetpack-scan' );
|
|
124
123
|
}
|
|
125
124
|
break;
|