@automattic/jetpack-scan 1.1.0 → 1.2.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.
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
|
+
## [1.2.0] - 2025-10-10
|
|
9
|
+
### Added
|
|
10
|
+
- Add missing types. [#44787]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Update @wordpress/dataviews package. [#44376] [#45012] [#45213]
|
|
14
|
+
- Update package dependencies. [#44677] [#44701] [#45027] [#45097] [#45229] [#45335] [#45428]
|
|
15
|
+
|
|
8
16
|
## [1.1.0] - 2025-07-30
|
|
9
17
|
### Added
|
|
10
18
|
- Add UI confirmation via text box when deleting an extension via delete-fixer so that the user is fully aware that it may break their site. [#44521]
|
|
@@ -143,6 +151,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
143
151
|
### Removed
|
|
144
152
|
- Updated dependencies. [#39754]
|
|
145
153
|
|
|
154
|
+
[1.2.0]: https://github.com/Automattic/jetpack-scan/compare/v1.1.0...v1.2.0
|
|
146
155
|
[1.1.0]: https://github.com/Automattic/jetpack-scan/compare/v1.0.2...v1.1.0
|
|
147
156
|
[1.0.2]: https://github.com/Automattic/jetpack-scan/compare/v1.0.1...v1.0.2
|
|
148
157
|
[1.0.1]: https://github.com/Automattic/jetpack-scan/compare/v1.0.0...v1.0.1
|
|
@@ -3,16 +3,25 @@ export declare const THREAT_STATUSES: {
|
|
|
3
3
|
label: string;
|
|
4
4
|
variant?: 'success' | 'warning';
|
|
5
5
|
}[];
|
|
6
|
-
export declare const THREAT_TYPES: {
|
|
6
|
+
export declare const THREAT_TYPES: ({
|
|
7
7
|
value: string;
|
|
8
|
-
label:
|
|
9
|
-
}
|
|
8
|
+
label: import("@wordpress/i18n").TranslatableText<"Plugin">;
|
|
9
|
+
} | {
|
|
10
|
+
value: string;
|
|
11
|
+
label: import("@wordpress/i18n").TranslatableText<"Theme">;
|
|
12
|
+
} | {
|
|
13
|
+
value: string;
|
|
14
|
+
label: import("@wordpress/i18n").TranslatableText<"WordPress">;
|
|
15
|
+
} | {
|
|
16
|
+
value: string;
|
|
17
|
+
label: import("@wordpress/i18n").TranslatableText<"File">;
|
|
18
|
+
})[];
|
|
10
19
|
export declare const THREAT_ICONS: {
|
|
11
|
-
plugins:
|
|
12
|
-
themes:
|
|
13
|
-
core:
|
|
14
|
-
file:
|
|
15
|
-
default:
|
|
20
|
+
plugins: any;
|
|
21
|
+
themes: any;
|
|
22
|
+
core: any;
|
|
23
|
+
file: any;
|
|
24
|
+
default: any;
|
|
16
25
|
};
|
|
17
26
|
export declare const THREAT_FIELD_THREAT = "threat";
|
|
18
27
|
export declare const THREAT_FIELD_TITLE = "title";
|
package/build/types/status.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { Threat } from './threats.ts';
|
|
2
|
+
export type ExtensionStatus = {
|
|
3
|
+
/** The name of the extension. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** The slug of the extension. */
|
|
6
|
+
slug: string;
|
|
7
|
+
/** The version of the extension. */
|
|
8
|
+
version: string;
|
|
9
|
+
/** The threats found in the extension. */
|
|
10
|
+
threats: Threat[];
|
|
11
|
+
/** The type of extension. */
|
|
12
|
+
type: 'plugins' | 'themes';
|
|
13
|
+
/** Whether the extension was checked in the latest scan. */
|
|
14
|
+
checked: boolean;
|
|
15
|
+
};
|
|
2
16
|
export type ScanStatus = {
|
|
3
17
|
/** The current status of the scanner. */
|
|
4
18
|
status: 'unavailable' | 'provisioning' | 'idle' | 'scanning' | 'scheduled';
|
|
@@ -20,4 +34,9 @@ export type ScanStatus = {
|
|
|
20
34
|
errorMessage: string | null;
|
|
21
35
|
/** The detected threats. */
|
|
22
36
|
threats: Threat[];
|
|
37
|
+
core: ExtensionStatus | ExtensionStatus[];
|
|
38
|
+
plugins: ExtensionStatus[];
|
|
39
|
+
themes: ExtensionStatus[];
|
|
40
|
+
files: Threat[];
|
|
41
|
+
database: Threat[];
|
|
23
42
|
};
|
package/build/utils/index.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export declare const getFixerState: (fixerStatus: ThreatFixStatus) => {
|
|
|
10
10
|
error: boolean;
|
|
11
11
|
stale: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare const getFixerAction: (threat: Threat) =>
|
|
14
|
-
export declare const getDetailedFixerAction: (threat: Threat) =>
|
|
13
|
+
export declare const getFixerAction: (threat: Threat) => import("@wordpress/i18n").TranslatableText<"Delete"> | import("@wordpress/i18n").TranslatableText<"Update"> | import("@wordpress/i18n").TranslatableText<"Replace"> | import("@wordpress/i18n").TranslatableText<"Auto-fix">;
|
|
14
|
+
export declare const getDetailedFixerAction: (threat: Threat) => import("@wordpress/i18n").TranslatableText<"Update"> | import("@wordpress/i18n").TranslatableText<"Auto-fix"> | import("@wordpress/i18n").TranslatableText<"Delete file"> | import("@wordpress/i18n").TranslatableText<"Delete plugin from site"> | import("@wordpress/i18n").TranslatableText<"Delete theme from site"> | import("@wordpress/i18n").TranslatableText<"Update plugin to newer version"> | import("@wordpress/i18n").TranslatableText<"Update theme to newer version"> | import("@wordpress/i18n").TranslatableText<"Replace from backup"> | import("@wordpress/i18n").TranslatableText<"Replace default salts">;
|
|
15
15
|
export declare const getFixerDescription: (threat: Threat) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"private": false,
|
|
3
2
|
"name": "@automattic/jetpack-scan",
|
|
4
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"private": false,
|
|
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": {
|
|
@@ -14,6 +14,15 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "GPL-2.0-or-later",
|
|
16
16
|
"author": "Automattic",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./build/index.d.ts",
|
|
21
|
+
"default": "./build/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"main": "./build/index.js",
|
|
25
|
+
"types": "./build/index.d.ts",
|
|
17
26
|
"scripts": {
|
|
18
27
|
"build": "pnpm run clean && pnpm run compile-ts",
|
|
19
28
|
"clean": "rm -rf build/",
|
|
@@ -22,45 +31,36 @@
|
|
|
22
31
|
"test-coverage": "pnpm run test --coverage",
|
|
23
32
|
"typecheck": "tsc --noEmit"
|
|
24
33
|
},
|
|
25
|
-
"
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@automattic/jetpack-api": "^1.0.10",
|
|
36
|
+
"@automattic/jetpack-base-styles": "^1.0.10",
|
|
37
|
+
"@automattic/jetpack-components": "^1.3.5",
|
|
38
|
+
"@wordpress/api-fetch": "7.31.0",
|
|
39
|
+
"@wordpress/components": "30.4.0",
|
|
40
|
+
"@wordpress/dataviews": "9.1.0",
|
|
41
|
+
"@wordpress/date": "5.31.0",
|
|
42
|
+
"@wordpress/element": "6.31.0",
|
|
43
|
+
"@wordpress/i18n": "6.4.0",
|
|
44
|
+
"@wordpress/icons": "10.31.0",
|
|
45
|
+
"@wordpress/url": "4.31.0",
|
|
46
|
+
"debug": "4.4.1",
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0"
|
|
49
|
+
},
|
|
26
50
|
"devDependencies": {
|
|
27
51
|
"@storybook/addon-docs": "9.0.15",
|
|
28
52
|
"@storybook/react": "9.0.15",
|
|
29
53
|
"@testing-library/dom": "10.4.0",
|
|
30
54
|
"@testing-library/react": "16.3.0",
|
|
31
55
|
"@types/jest": "30.0.0",
|
|
32
|
-
"@types/react": "18.3.
|
|
56
|
+
"@types/react": "18.3.25",
|
|
33
57
|
"jest": "30.0.4",
|
|
34
58
|
"jest-environment-jsdom": "30.0.4",
|
|
35
59
|
"storybook": "9.0.15",
|
|
36
|
-
"typescript": "5.
|
|
37
|
-
},
|
|
38
|
-
"exports": {
|
|
39
|
-
".": {
|
|
40
|
-
"types": "./build/index.d.ts",
|
|
41
|
-
"default": "./build/index.js"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"main": "./build/index.js",
|
|
45
|
-
"types": "./build/index.d.ts",
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@automattic/jetpack-api": "^1.0.5",
|
|
48
|
-
"@automattic/jetpack-base-styles": "^1.0.6",
|
|
49
|
-
"@automattic/jetpack-components": "^1.1.16",
|
|
50
|
-
"@wordpress/api-fetch": "7.26.0",
|
|
51
|
-
"@wordpress/components": "29.12.0",
|
|
52
|
-
"@wordpress/dataviews": "4.17.0",
|
|
53
|
-
"@wordpress/date": "5.26.0",
|
|
54
|
-
"@wordpress/element": "6.26.0",
|
|
55
|
-
"@wordpress/i18n": "5.26.0",
|
|
56
|
-
"@wordpress/icons": "10.26.0",
|
|
57
|
-
"@wordpress/url": "4.26.0",
|
|
58
|
-
"debug": "4.4.1",
|
|
59
|
-
"react": "^18.2.0",
|
|
60
|
-
"react-dom": "^18.2.0"
|
|
60
|
+
"typescript": "5.9.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@wordpress/i18n": "
|
|
63
|
+
"@wordpress/i18n": "6.4.0",
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0"
|
|
66
66
|
}
|
package/src/types/status.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { Threat } from './threats.ts';
|
|
2
2
|
|
|
3
|
+
export type ExtensionStatus = {
|
|
4
|
+
/** The name of the extension. */
|
|
5
|
+
name: string;
|
|
6
|
+
|
|
7
|
+
/** The slug of the extension. */
|
|
8
|
+
slug: string;
|
|
9
|
+
|
|
10
|
+
/** The version of the extension. */
|
|
11
|
+
version: string;
|
|
12
|
+
|
|
13
|
+
/** The threats found in the extension. */
|
|
14
|
+
threats: Threat[];
|
|
15
|
+
|
|
16
|
+
/** The type of extension. */
|
|
17
|
+
type: 'plugins' | 'themes';
|
|
18
|
+
|
|
19
|
+
/** Whether the extension was checked in the latest scan. */
|
|
20
|
+
checked: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
3
23
|
export type ScanStatus = {
|
|
4
24
|
/** The current status of the scanner. */
|
|
5
25
|
status: 'unavailable' | 'provisioning' | 'idle' | 'scanning' | 'scheduled';
|
|
@@ -30,4 +50,10 @@ export type ScanStatus = {
|
|
|
30
50
|
|
|
31
51
|
/** The detected threats. */
|
|
32
52
|
threats: Threat[];
|
|
53
|
+
|
|
54
|
+
core: ExtensionStatus | ExtensionStatus[];
|
|
55
|
+
plugins: ExtensionStatus[];
|
|
56
|
+
themes: ExtensionStatus[];
|
|
57
|
+
files: Threat[];
|
|
58
|
+
database: Threat[];
|
|
33
59
|
};
|