@extenshi/cli 0.23.0 → 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 +44 -13
- 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/pay-contract.d.ts +3 -3
- package/dist/pay-contract.d.ts.map +1 -1
- package/dist/pay-contract.js +2 -1
- package/dist/pay-contract.js.map +1 -1
- package/dist/pay-test-cycle.d.ts.map +1 -1
- package/dist/pay-test-cycle.js +6 -1
- package/dist/pay-test-cycle.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/scan.d.ts +8 -11
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +8 -11
- package/dist/scan.js.map +1 -1
- 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/dist/telemetry.d.ts +7 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +8 -0
- package/dist/telemetry.js.map +1 -1
- package/package.json +1 -1
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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