@extenshi/cli 0.23.1 → 0.25.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/README.md +1 -1
- package/dist/amo-source.d.ts +88 -17
- package/dist/amo-source.d.ts.map +1 -1
- package/dist/amo-source.js +442 -116
- package/dist/amo-source.js.map +1 -1
- package/dist/amowebstore-md.d.ts +26 -0
- package/dist/amowebstore-md.d.ts.map +1 -1
- package/dist/amowebstore-md.js +32 -3
- package/dist/amowebstore-md.js.map +1 -1
- package/dist/auto-update.d.ts +46 -3
- package/dist/auto-update.d.ts.map +1 -1
- package/dist/auto-update.js +94 -19
- package/dist/auto-update.js.map +1 -1
- package/dist/chromewebstore-md.d.ts +7 -0
- package/dist/chromewebstore-md.d.ts.map +1 -1
- package/dist/chromewebstore-md.js +20 -3
- package/dist/chromewebstore-md.js.map +1 -1
- package/dist/cli.js +73 -20
- 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/edgewebstore-md.d.ts +14 -0
- package/dist/edgewebstore-md.d.ts.map +1 -1
- package/dist/edgewebstore-md.js +20 -5
- package/dist/edgewebstore-md.js.map +1 -1
- package/dist/evidence-ingest.d.ts +67 -5
- package/dist/evidence-ingest.d.ts.map +1 -1
- package/dist/evidence-ingest.js +146 -21
- package/dist/evidence-ingest.js.map +1 -1
- package/dist/generate-listing.d.ts +18 -6
- package/dist/generate-listing.d.ts.map +1 -1
- package/dist/generate-listing.js +62 -19
- package/dist/generate-listing.js.map +1 -1
- package/dist/json-ld.d.ts +43 -5
- package/dist/json-ld.d.ts.map +1 -1
- package/dist/json-ld.js +53 -1
- package/dist/json-ld.js.map +1 -1
- package/dist/landing-sections.d.ts +21 -3
- package/dist/landing-sections.d.ts.map +1 -1
- package/dist/landing-sections.js +63 -17
- package/dist/landing-sections.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-data-flows.d.ts +140 -0
- package/dist/listing-data-flows.d.ts.map +1 -0
- package/dist/listing-data-flows.js +454 -0
- package/dist/listing-data-flows.js.map +1 -0
- 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/localize-parity.d.ts +26 -0
- package/dist/localize-parity.d.ts.map +1 -0
- package/dist/localize-parity.js +227 -0
- package/dist/localize-parity.js.map +1 -0
- package/dist/localize.d.ts +6 -0
- package/dist/localize.d.ts.map +1 -1
- package/dist/localize.js +4 -4
- package/dist/localize.js.map +1 -1
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +1 -2
- package/dist/media.js.map +1 -1
- package/dist/package.d.ts +13 -0
- package/dist/package.d.ts.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/dist/page.d.ts +16 -0
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +49 -4
- package/dist/page.js.map +1 -1
- package/dist/permission-justifications.d.ts +19 -1
- package/dist/permission-justifications.d.ts.map +1 -1
- package/dist/permission-justifications.js +129 -0
- package/dist/permission-justifications.js.map +1 -1
- package/dist/png.d.ts +40 -0
- package/dist/png.d.ts.map +1 -0
- package/dist/png.js +266 -0
- package/dist/png.js.map +1 -0
- package/dist/review-checks.d.ts +54 -13
- package/dist/review-checks.d.ts.map +1 -1
- package/dist/review-checks.js +367 -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 -11
- package/dist/screenshots.js.map +1 -1
- package/dist/smoke.d.ts +54 -6
- package/dist/smoke.d.ts.map +1 -1
- package/dist/smoke.js +302 -26
- package/dist/smoke.js.map +1 -1
- package/dist/store-assets.d.ts +20 -3
- package/dist/store-assets.d.ts.map +1 -1
- package/dist/store-assets.js +17 -7
- package/dist/store-assets.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Only missing, untracked, source-changed or target-edited keys appear in the requ
|
|
|
49
49
|
|
|
50
50
|
Apply requires a reviewed bundle and rejects unknown keys, empty messages, changed placeholders, changed positional substitutions or dollar escapes, missing protected terms, stale source hashes, invalid locale paths and symlinked workspace files. It validates all requested locales before writing and checks localized manifest lengths plus new findings from the existing listing risk rules against the default locale. Manifest checks resolve case-insensitive message names, static named placeholders and dollar escapes before measuring visible text. Manifest strings that require runtime positional arguments are rejected; use static content there. Checks are heuristic and cannot certify translation accuracy or store acceptance. Complete translations are required for each applied locale; sparse browser fallback catalogs need their missing keys translated first.
|
|
51
51
|
|
|
52
|
-
`check` prints JSON and exits with status 1 for missing, stale, unreviewed or invalid translations, including target locales configured but not created. This workflow covers extension message catalogs, including localized manifest text. Full store descriptions and screenshots need separate localization. RTL text is accepted for supported locales, but visual direction, overflow and interaction need testing in the target browser.
|
|
52
|
+
`check` prints JSON and exits with status 1 for missing, stale, unreviewed or invalid translations, including target locales configured but not created. A project that keeps its own translations (for example a script that writes every `messages.json`) has no `.extenshi-localization.json`, so nothing there was ever reviewed through prepare/apply. Without that file `check` runs in `parity-only` mode, or run `check ./extension --parity-only` yourself: it compares every locale with the default locale for missing or extra keys, changed `$NAME$`, `$1` and `$$` tokens and `placeholders` definitions, empty or malformed messages, reserved `@@` names, case-only duplicates, a missing `default_locale` directory and locale directories Chrome ignores, plus the same listing-risk and manifest length findings review mode reports; it ignores review state. See the localization guide for the rule list. The JSON reports `"mode"` and, when the mode was chosen automatically, a `note`. This workflow covers extension message catalogs, including localized manifest text. Full store descriptions and screenshots need separate localization. RTL text is accepted for supported locales, but visual direction, overflow and interaction need testing in the target browser.
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
### Standalone Pay
|
package/dist/amo-source.d.ts
CHANGED
|
@@ -1,34 +1,77 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `extenshi amo-source <project-dir> [--out <path>]
|
|
3
|
-
* source-code archive + BUILD.md reviewer instructions
|
|
2
|
+
* `extenshi amo-source <project-dir> [--out <path>] [--build <cmd>] [--verify <package>]`
|
|
3
|
+
* — produce the AMO source-code archive + BUILD.md reviewer instructions, and
|
|
4
|
+
* optionally prove a reviewer can rebuild the package from it.
|
|
4
5
|
*
|
|
5
6
|
* AMO requires reviewable source for any minified/bundled/transpiled code so a
|
|
6
7
|
* reviewer can rebuild the extension and diff it against the submitted
|
|
7
8
|
* package: https://extensionworkshop.com/documentation/publish/source-code-submission/
|
|
8
9
|
*
|
|
9
|
-
* This command does NOT
|
|
10
|
-
*
|
|
11
|
-
* 1. archives the project's
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* This command does NOT talk to AMO's API (that is
|
|
11
|
+
* `publisher/src/services/firefox.ts`, owned separately). It:
|
|
12
|
+
* 1. archives the project's source — in a git repository `git archive HEAD`
|
|
13
|
+
* (.gitignore, nested ignore files, export-ignore and untracked build
|
|
14
|
+
* output all stay out); outside git, every file minus
|
|
15
|
+
* node_modules/dist-style directories and what the top-level .gitignore
|
|
16
|
+
* names. Dotenv files, symlinks and files over 25 MB never go in, and the
|
|
17
|
+
* result lists each one it left out;
|
|
18
|
+
* 2. writes BUILD.md with the commands a reviewer needs (Node/npm versions,
|
|
19
|
+
* package manager + lockfile, the build command);
|
|
17
20
|
* 3. flags vendored minified files that carry no reproducible-build
|
|
18
|
-
* provenance as BLOCKERS —
|
|
19
|
-
*
|
|
21
|
+
* provenance as BLOCKERS — unless their source is vendored under
|
|
22
|
+
* `vendor-src/<name>/` (optionally pinned by a `SOURCE_COMMIT` file), the
|
|
23
|
+
* layout these docs tell developers to use;
|
|
24
|
+
* 4. with `--verify <package>`, unpacks the archive into an empty directory,
|
|
25
|
+
* runs the install + build there, and compares the rebuilt package's
|
|
26
|
+
* SHA-256 with the one you are about to upload.
|
|
20
27
|
*
|
|
21
|
-
* If the project directory is a
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* all is archived as-is; there is nothing to compare it against.
|
|
28
|
+
* If the project directory is a git working tree, the archive is refused when
|
|
29
|
+
* there are uncommitted changes — the archive should match a commit a reviewer
|
|
30
|
+
* can also check out. A directory that is not a git repo at all is archived
|
|
31
|
+
* as-is; there is nothing to compare it against.
|
|
26
32
|
*/
|
|
27
33
|
import { type MinifiedFileFinding } from './amo-source-detect.js';
|
|
28
34
|
export interface AmoSourceOptions {
|
|
29
35
|
projectDir: string;
|
|
30
36
|
/** Where to write the archive. Default: `amo-source.zip` in the current directory. */
|
|
31
37
|
outputPath?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The build step a reviewer runs after installing (BUILD.md, and `--verify`).
|
|
40
|
+
* Default: `npm run build` when package.json has a build script.
|
|
41
|
+
*/
|
|
42
|
+
buildCommand?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The package you will upload, relative to the project (e.g.
|
|
45
|
+
* `deploy-firefox.zip`). Rebuild it in a clean directory from the archive and
|
|
46
|
+
* compare SHA-256 digests.
|
|
47
|
+
*/
|
|
48
|
+
verifyPackage?: string;
|
|
49
|
+
/** Discard the clean-room install/build output instead of streaming it to stderr. */
|
|
50
|
+
quiet?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** A minified file whose source is vendored under `vendor-src/`. */
|
|
53
|
+
export interface VendoredBundle extends MinifiedFileFinding {
|
|
54
|
+
/** `vendor-src/<name>` — the directory holding its source. */
|
|
55
|
+
sourceDir: string;
|
|
56
|
+
/** The upstream commit pinned in `<sourceDir>/SOURCE_COMMIT`, when there is one. */
|
|
57
|
+
sourceCommit?: string;
|
|
58
|
+
/** Which rule tied the file to its source: the build config names it, or the directory name does. */
|
|
59
|
+
matchedBy: 'build config' | 'name';
|
|
60
|
+
}
|
|
61
|
+
export interface VerifyResult {
|
|
62
|
+
/** Project-relative path of the package that was compared. */
|
|
63
|
+
packagePath: string;
|
|
64
|
+
/** SHA-256 of the package in the project — the one you upload. */
|
|
65
|
+
expected: string;
|
|
66
|
+
/** SHA-256 of the package rebuilt from the archive, or null when the build did not produce it. */
|
|
67
|
+
actual: string | null;
|
|
68
|
+
match: boolean;
|
|
69
|
+
/** What ran in the clean room, in order. */
|
|
70
|
+
commands: string[];
|
|
71
|
+
/** Kept for inspection when the rebuild did not match; removed otherwise. */
|
|
72
|
+
cleanRoom?: string;
|
|
73
|
+
/** Why the rebuild failed, when it did. */
|
|
74
|
+
error?: string;
|
|
32
75
|
}
|
|
33
76
|
export interface AmoSourceResult {
|
|
34
77
|
zipPath: string;
|
|
@@ -36,6 +79,34 @@ export interface AmoSourceResult {
|
|
|
36
79
|
fileCount: number;
|
|
37
80
|
blockers: MinifiedFileFinding[];
|
|
38
81
|
reproducible: MinifiedFileFinding[];
|
|
82
|
+
/** Minified files recognised as rebuilt from `vendor-src/` (subset of `reproducible`). */
|
|
83
|
+
vendored: VendoredBundle[];
|
|
84
|
+
/** Files the archive leaves out (dotenv, symlinks, over 25 MB), with the reason. */
|
|
85
|
+
skipped: SkippedFile[];
|
|
86
|
+
verification?: VerifyResult;
|
|
87
|
+
}
|
|
88
|
+
interface IgnoreRule {
|
|
89
|
+
re: RegExp;
|
|
90
|
+
negate: boolean;
|
|
91
|
+
dirOnly: boolean;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The top-level `.gitignore` of a project that is NOT a git repository, read
|
|
95
|
+
* the way git reads it: comments, `!` negation, trailing `/` for directories,
|
|
96
|
+
* a leading or inner `/` anchoring the pattern to the root, `*`, `?`, `**`,
|
|
97
|
+
* last match wins. Character classes (`[abc]`) and backslash escapes are not
|
|
98
|
+
* supported; such a pattern matches literally, so the file stays IN the archive
|
|
99
|
+
* (the safe direction). Inside a repository none of this runs — `git ls-files`
|
|
100
|
+
* already applies every ignore file git knows about.
|
|
101
|
+
*/
|
|
102
|
+
export declare function compileGitignore(raw: string): IgnoreRule[];
|
|
103
|
+
/** `rel` is a project-relative posix path. */
|
|
104
|
+
export declare function isGitignored(rel: string, isDir: boolean, rules: readonly IgnoreRule[]): boolean;
|
|
105
|
+
/** A file left out of the archive, and why — reported, never dropped silently. */
|
|
106
|
+
export interface SkippedFile {
|
|
107
|
+
path: string;
|
|
108
|
+
reason: string;
|
|
39
109
|
}
|
|
40
110
|
export declare function runAmoSource(opts: AmoSourceOptions): Promise<AmoSourceResult>;
|
|
111
|
+
export {};
|
|
41
112
|
//# sourceMappingURL=amo-source.d.ts.map
|
package/dist/amo-source.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amo-source.d.ts","sourceRoot":"","sources":["../src/amo-source.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"amo-source.d.ts","sourceRoot":"","sources":["../src/amo-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAQH,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AA2BtF,MAAM,WAAW,gBAAgB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;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