File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { replaceInFileSync } from "replace-in-file";
1212import webext from "web-ext" ;
1313import { generateHashSync } from "../utils/crypto.js" ;
1414import { patchWebExtLogger } from "../utils/log.js" ;
15+ import { getValidatedManifest } from "../utils/manifest.js" ;
1516import { dateFormat , toArray } from "../utils/string.js" ;
1617import { Base } from "./base.js" ;
1718
@@ -119,11 +120,6 @@ export default class Build extends Base {
119120 id,
120121 update_url : updateURL ,
121122 } ,
122- gecko : {
123- id,
124- update_url : updateURL ,
125- strict_min_version : "102" ,
126- } ,
127123 } ,
128124 } ;
129125
@@ -319,6 +315,8 @@ export default class Build extends Base {
319315 artifactsDir : dist ,
320316 filename : `${ xpiName } .xpi` ,
321317 overwriteDest : true ,
318+ } , {
319+ manifestData : getValidatedManifest ( ) ,
322320 } ) ;
323321 }
324322}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { resolve } from "node:path";
44import { env } from "node:process" ;
55import webext from "web-ext" ;
66import { patchWebExtLogger } from "../../utils/log.js" ;
7+ import { getValidatedManifest } from "../../utils/manifest.js" ;
78import { ServeBase } from "./base.js" ;
89
910export default class RunnerWebExt extends ServeBase {
@@ -41,6 +42,7 @@ export default class RunnerWebExt extends ServeBase {
4142 // You need to specify this one so that your NodeJS application
4243 // can continue running after web-ext is finished.
4344 shouldExitProgram : false ,
45+ getValidatedManifest,
4446 } ,
4547 ) ;
4648 this . _runner = runner ;
Original file line number Diff line number Diff line change 1+ /**
2+ * Patch web-ext's getValidatedManifest
3+ * @see https://github.com/mozilla/web-ext?tab=readme-ov-file#using-web-ext-in-nodejs-code
4+ * @see https://github.com/mozilla/web-ext/blob/master/src/util/manifest.js#L15
5+ */
6+ export function getValidatedManifest ( _sourceDir ?: string ) {
7+ return {
8+ manifest_version : 2 ,
9+ name : "zoterp-plugin-scaffold-fake-name" ,
10+ version : "0.0.0.0" ,
11+ } ;
12+ }
You can’t perform that action at this time.
0 commit comments