@extenshi/cli 0.23.1 → 0.24.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/dist/amo-source.d.ts +88 -17
- package/dist/amo-source.d.ts.map +1 -1
- package/dist/amo-source.js +437 -116
- package/dist/amo-source.js.map +1 -1
- package/dist/cli.js +42 -11
- package/dist/cli.js.map +1 -1
- package/dist/compliance-review.d.ts +5 -1
- package/dist/compliance-review.d.ts.map +1 -1
- package/dist/compliance-review.js +10 -5
- package/dist/compliance-review.js.map +1 -1
- package/dist/cws-policies.d.ts.map +1 -1
- package/dist/cws-policies.js +4 -0
- package/dist/cws-policies.js.map +1 -1
- package/dist/listing-checks.d.ts +15 -9
- package/dist/listing-checks.d.ts.map +1 -1
- package/dist/listing-checks.js +54 -46
- package/dist/listing-checks.js.map +1 -1
- package/dist/listing.d.ts +48 -0
- package/dist/listing.d.ts.map +1 -1
- package/dist/listing.js +201 -23
- package/dist/listing.js.map +1 -1
- package/dist/png.d.ts +40 -0
- package/dist/png.d.ts.map +1 -0
- package/dist/png.js +208 -0
- package/dist/png.js.map +1 -0
- package/dist/review-checks.d.ts +48 -13
- package/dist/review-checks.d.ts.map +1 -1
- package/dist/review-checks.js +364 -56
- package/dist/review-checks.js.map +1 -1
- package/dist/review-risk.d.ts +8 -3
- package/dist/review-risk.d.ts.map +1 -1
- package/dist/review-risk.js +14 -4
- package/dist/review-risk.js.map +1 -1
- package/dist/review-stores.d.ts +63 -0
- package/dist/review-stores.d.ts.map +1 -0
- package/dist/review-stores.js +92 -0
- package/dist/review-stores.js.map +1 -0
- package/dist/screenshots-scenes.d.ts +13 -0
- package/dist/screenshots-scenes.d.ts.map +1 -1
- package/dist/screenshots-scenes.js +20 -2
- package/dist/screenshots-scenes.js.map +1 -1
- package/dist/screenshots.d.ts +6 -4
- package/dist/screenshots.d.ts.map +1 -1
- package/dist/screenshots.js +31 -10
- package/dist/screenshots.js.map +1 -1
- package/dist/store-assets.d.ts.map +1 -1
- package/dist/store-assets.js +7 -3
- package/dist/store-assets.js.map +1 -1
- package/package.json +1 -1
package/dist/review-checks.d.ts
CHANGED
|
@@ -14,13 +14,20 @@
|
|
|
14
14
|
* Chrome for Developers documentation so the user can verify the rule at the
|
|
15
15
|
* source. (We do not cite third-party books in product output.)
|
|
16
16
|
*
|
|
17
|
+
* The suite predicts ONE store's review per run (`store`, default Chrome Web
|
|
18
|
+
* Store). Findings that describe a store's review process — the in-depth review
|
|
19
|
+
* of broad host access, re-review on listing edits, the Privacy practices form —
|
|
20
|
+
* exist only for the store whose documentation describes them; see
|
|
21
|
+
* review-stores.ts for the wording that differs.
|
|
22
|
+
*
|
|
17
23
|
* This module is PURE (no I/O) so the rules are unit-testable against fixtures.
|
|
18
24
|
* Archive extraction lives in review-archive.ts; the network manifest fetch in
|
|
19
25
|
* review-catalog.ts; rendering in review-render.ts. The store-listing rules
|
|
20
26
|
* live in listing-checks.ts and are orchestrated from `runChecks` here so a
|
|
21
27
|
* caller gets one findings list regardless of which surface produced it.
|
|
22
28
|
*/
|
|
23
|
-
import type
|
|
29
|
+
import { type Listing } from './listing.js';
|
|
30
|
+
import { type ReviewStore } from './review-stores.js';
|
|
24
31
|
export type Verdict = 'REJECTED' | 'SLOW' | 'ATTRITION';
|
|
25
32
|
export interface ReviewFinding {
|
|
26
33
|
/** The real-world consequence — drives the label shown to the user. */
|
|
@@ -44,7 +51,9 @@ export interface ReviewFinding {
|
|
|
44
51
|
* rather than written into each rule, so one check id cannot end up
|
|
45
52
|
* attributed to two policies. `null` marks a finding about the review
|
|
46
53
|
* PROCESS rather than a rule (see the registry); absent means the check id
|
|
47
|
-
* is unregistered, which the policy test treats as a bug
|
|
54
|
+
* is unregistered, which the policy test treats as a bug — or that the run
|
|
55
|
+
* is for Edge or Firefox, where a Chrome Web Store policy would be the wrong
|
|
56
|
+
* attribution (the finding's `citation` names that store's rule instead).
|
|
48
57
|
*/
|
|
49
58
|
policy?: {
|
|
50
59
|
id: string;
|
|
@@ -114,6 +123,7 @@ export interface Manifest {
|
|
|
114
123
|
/** A text file pulled out of the artifact: package-relative path → contents. */
|
|
115
124
|
export type FileMap = Map<string, string>;
|
|
116
125
|
export declare const PERMISSION_WARNINGS: Readonly<Record<string, string>>;
|
|
126
|
+
export declare const FIREFOX_PERMISSION_MESSAGES: Readonly<Record<string, string>>;
|
|
117
127
|
export declare function isGlobalHost(value: string): boolean;
|
|
118
128
|
/**
|
|
119
129
|
* Required API permissions only (host patterns stripped out). In MV2 hosts and
|
|
@@ -131,27 +141,46 @@ export declare function normalizePath(p: string): string;
|
|
|
131
141
|
* eval get the extension rejected.
|
|
132
142
|
*/
|
|
133
143
|
export declare function htmlEntrypoints(m: Manifest): string[];
|
|
134
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Chrome Web Store only. Its review-process page says reviews "may take longer
|
|
146
|
+
* for extensions that request broad host permissions". Edge certifies every
|
|
147
|
+
* submission the same way (up to 7 business days) and AMO publishes after
|
|
148
|
+
* automated checks; neither documents a longer path for broad host access, so
|
|
149
|
+
* this finding would be invented there.
|
|
150
|
+
*/
|
|
151
|
+
export declare function checkSlowReviewQueue(m: Manifest, store?: ReviewStore): ReviewFinding[];
|
|
135
152
|
/**
|
|
136
153
|
* Static advisory — there is nothing in the package to inspect; it's a
|
|
137
154
|
* publishing-process fact developers routinely get burned by. Emitted once.
|
|
155
|
+
*
|
|
156
|
+
* Per store, because the process differs: Edge restarts certification for a
|
|
157
|
+
* metadata-only update too, and AMO documents nothing about listing-only edits
|
|
158
|
+
* (so nothing is said there).
|
|
138
159
|
*/
|
|
139
|
-
export declare function checkListingChangeReReview(): ReviewFinding[];
|
|
160
|
+
export declare function checkListingChangeReReview(store?: ReviewStore): ReviewFinding[];
|
|
140
161
|
/**
|
|
141
162
|
* Diff the local manifest against the last-published one. A newly-added
|
|
142
|
-
* *required* permission that
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
163
|
+
* *required* permission that prompts costs the installed base on update →
|
|
164
|
+
* attrition. How depends on the browser: Chromium (Chrome, Edge) silently
|
|
165
|
+
* disables the extension until the user re-accepts (only a small toolbar icon
|
|
166
|
+
* appears); Firefox keeps users on the previous version until they approve, and
|
|
167
|
+
* installs an MV3 update without the host access it adds (see
|
|
168
|
+
* FIREFOX_PERMISSION_MESSAGES). On the Chrome Web Store, newly-added permissions
|
|
169
|
+
* of any kind also re-trip the slow review queue (ch.10).
|
|
146
170
|
*
|
|
147
171
|
* `prior` is the manifest fetched from the catalog's last snapshot; pass null
|
|
148
172
|
* when it could not be fetched (the caller surfaces why and this returns []).
|
|
149
173
|
*/
|
|
150
|
-
export declare function checkAutoDisableOnUpdate(local: Manifest, prior: Manifest | null): ReviewFinding[];
|
|
174
|
+
export declare function checkAutoDisableOnUpdate(local: Manifest, prior: Manifest | null, store?: ReviewStore): ReviewFinding[];
|
|
151
175
|
export declare function checkRemoteCode(files: FileMap): ReviewFinding[];
|
|
152
176
|
export declare function checkHtmlCsp(m: Manifest, files: FileMap): ReviewFinding[];
|
|
153
177
|
export declare function checkServiceWorker(m: Manifest, files: FileMap): ReviewFinding[];
|
|
154
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Chrome Web Store only: the advice holds everywhere, but the verdict it is
|
|
180
|
+
* filed under — skipping the slow review queue — is a Chrome Web Store process
|
|
181
|
+
* fact (see `checkSlowReviewQueue`).
|
|
182
|
+
*/
|
|
183
|
+
export declare function checkActiveTabAdvisor(m: Manifest, store?: ReviewStore): ReviewFinding[];
|
|
155
184
|
export declare const OFFLINE_CHECKED_PERMISSIONS: readonly string[];
|
|
156
185
|
export declare function checkUnusedPermissions(m: Manifest, files: FileMap): ReviewFinding[];
|
|
157
186
|
/**
|
|
@@ -160,7 +189,7 @@ export declare function checkUnusedPermissions(m: Manifest, files: FileMap): Rev
|
|
|
160
189
|
* Optional permissions count: the declaration covers what the extension can
|
|
161
190
|
* request, and an optional permission ships in the package and is grantable.
|
|
162
191
|
*/
|
|
163
|
-
export declare function checkPrivacyDisclosure(manifest: Manifest): ReviewFinding[];
|
|
192
|
+
export declare function checkPrivacyDisclosure(manifest: Manifest, store?: ReviewStore): ReviewFinding[];
|
|
164
193
|
/**
|
|
165
194
|
* Privacy-practices rows for CHROMEWEBSTORE.md, from the same mapping
|
|
166
195
|
* `checkPrivacyDisclosure` uses. One row per (permission, data type) so a
|
|
@@ -171,6 +200,7 @@ export declare function privacyPracticesForManifest(manifest: Manifest): {
|
|
|
171
200
|
dataType: string;
|
|
172
201
|
permission: string;
|
|
173
202
|
}[];
|
|
203
|
+
export declare function checkManifestFieldLengths(manifest: Manifest, files: FileMap, store?: ReviewStore): ReviewFinding[];
|
|
174
204
|
export interface ReviewInputs {
|
|
175
205
|
manifest: Manifest;
|
|
176
206
|
files: FileMap;
|
|
@@ -182,6 +212,8 @@ export interface ReviewInputs {
|
|
|
182
212
|
* and, when given, `--listing`.
|
|
183
213
|
*/
|
|
184
214
|
listing?: Listing | null;
|
|
215
|
+
/** The store whose review this run predicts (default Chrome Web Store). */
|
|
216
|
+
store?: ReviewStore;
|
|
185
217
|
}
|
|
186
218
|
export declare function runChecks(input: ReviewInputs): ReviewFinding[];
|
|
187
219
|
/**
|
|
@@ -206,13 +238,16 @@ export declare function runChecks(input: ReviewInputs): ReviewFinding[];
|
|
|
206
238
|
* ever reuses an id across the two sets breaks that, and would make `scan` and
|
|
207
239
|
* `review-risk` disagree on counts.
|
|
208
240
|
*/
|
|
209
|
-
export declare function runListingOnlyChecks(listing: Listing | null): ReviewFinding[];
|
|
241
|
+
export declare function runListingOnlyChecks(listing: Listing | null, store?: ReviewStore): ReviewFinding[];
|
|
210
242
|
/**
|
|
211
243
|
* Ruleset version stamped on a persisted `review_risk` prediction.
|
|
212
244
|
* Bump when a check is added, removed, or its verdict changes — otherwise
|
|
213
245
|
* iteration 4 averages incompatible rules into one precision number.
|
|
246
|
+
*
|
|
247
|
+
* '2' (2026-10-10): `global-host-permissions` also reads content_scripts
|
|
248
|
+
* matches, and `manifest-field-length` is new.
|
|
214
249
|
*/
|
|
215
|
-
export declare const REVIEW_RISK_RULES_VERSION = "
|
|
250
|
+
export declare const REVIEW_RISK_RULES_VERSION = "2";
|
|
216
251
|
export interface ReviewSummary {
|
|
217
252
|
findings: ReviewFinding[];
|
|
218
253
|
counts: Record<Verdict, number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-checks.d.ts","sourceRoot":"","sources":["../src/review-checks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"review-checks.d.ts","sourceRoot":"","sources":["../src/review-checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAE,KAAK,OAAO,EAAsB,MAAM,cAAc,CAAA;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,oBAAoB,CAAA;AAIjE,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAEvD,MAAM,WAAW,aAAa;IAC7B,uEAAuE;IACvE,OAAO,EAAE,OAAO,CAAA;IAChB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAA;IACd,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wBAAwB;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAC1D;AAED,0EAA0E;AAC1E,MAAM,WAAW,QAAQ;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,IAAI,CAAC,E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