@stacksjs/browser-extension 0.70.142 → 0.70.144

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 CHANGED
@@ -141,7 +141,7 @@ export default defineExtension({
141
141
  permissions: ['declarativeNetRequest', 'storage', 'tabs'],
142
142
  hostPermissions: ['http://*/*', 'https://*/*'],
143
143
  minimumChromeVersion: '111',
144
- firefoxMinVersion: '140.0',
144
+ firefoxMinVersion: '142.0',
145
145
  safariMinVersion: '18.4',
146
146
  webAccessibleResources: [{ resources: ['stubs/*.js'], matches: ['<all_urls>'] }],
147
147
  },
@@ -1,4 +1,5 @@
1
1
  import type { ExtensionConfig, FirefoxAddonsConfig } from './types';
2
+ export declare function firefoxSignArgs(options: FirefoxSignArgsOptions): string[];
2
3
  /** Metadata accepted by AMO v5 when web-ext creates the first listed version. */
3
4
  export declare function firefoxListingMetadata(config: ExtensionConfig, store: FirefoxAddonsConfig): Record<string, unknown> | undefined;
4
5
  /** Resolve web-ext from PATH or from this package's declared dependency. */
@@ -22,3 +23,11 @@ export declare interface FirefoxPublishResult {
22
23
  artifacts: string[]
23
24
  channel: 'listed' | 'unlisted'
24
25
  }
26
+ declare interface FirefoxSignArgsOptions {
27
+ executable: string
28
+ sourceDir: string
29
+ artifactsDir: string
30
+ channel: 'listed' | 'unlisted'
31
+ timeout: number
32
+ approvalTimeout: number
33
+ }
@@ -4,6 +4,23 @@ import { createRequire } from "node:module";
4
4
  import { tmpdir } from "node:os";
5
5
  import { join, resolve } from "node:path";
6
6
  import { buildExtension, resolveOutdir } from "./build";
7
+ export function firefoxSignArgs(options) {
8
+ return [
9
+ options.executable,
10
+ "sign",
11
+ "--source-dir",
12
+ options.sourceDir,
13
+ "--artifacts-dir",
14
+ options.artifactsDir,
15
+ "--channel",
16
+ options.channel,
17
+ "--timeout",
18
+ String(options.timeout),
19
+ "--approval-timeout",
20
+ String(options.approvalTimeout),
21
+ "--no-input"
22
+ ];
23
+ }
7
24
  function resolveFirefoxAuth(options) {
8
25
  const issuer = options.issuer ?? process.env.AMO_JWT_ISSUER ?? process.env.WEB_EXT_API_KEY, secret = options.secret ?? process.env.AMO_JWT_SECRET ?? process.env.WEB_EXT_API_SECRET, missing = [!issuer && "AMO_JWT_ISSUER", !secret && "AMO_JWT_SECRET"].filter(Boolean);
9
26
  if (missing.length)
@@ -50,22 +67,14 @@ export async function publishFirefoxExtension(config, options) {
50
67
  await mkdir(artifactsDir, { recursive: !0 });
51
68
  const before = new Set(existsSync(artifactsDir) ? readdirSync(artifactsDir) : []), tempDir = await mkdtemp(join(tmpdir(), "stacks-firefox-publish-"));
52
69
  try {
53
- const args = [
70
+ const args = firefoxSignArgs({
54
71
  executable,
55
- "sign",
56
- "--source-dir",
57
72
  sourceDir,
58
- "--artifacts-dir",
59
73
  artifactsDir,
60
- "--channel",
61
- store.channel ?? "listed",
62
- "--timeout",
63
- String(options.timeout ?? 300000),
64
- "--approval-timeout",
65
- String(options.approvalTimeout ?? 0),
66
- "--no-input",
67
- "--boring"
68
- ], metadata = firefoxListingMetadata(config, store);
74
+ channel: store.channel ?? "listed",
75
+ timeout: options.timeout ?? 300000,
76
+ approvalTimeout: options.approvalTimeout ?? 0
77
+ }), metadata = firefoxListingMetadata(config, store);
69
78
  if (metadata) {
70
79
  const metadataPath = join(tempDir, "amo-metadata.json");
71
80
  await Bun.write(metadataPath, `${JSON.stringify(metadata, null, 2)}
package/dist/manifest.js CHANGED
@@ -21,7 +21,7 @@ export function generateManifest(config, opts) {
21
21
  manifest.browser_specific_settings = {
22
22
  gecko: {
23
23
  id: config.geckoId,
24
- strict_min_version: m.firefoxMinVersion ?? "128.0",
24
+ strict_min_version: m.firefoxMinVersion ?? "142.0",
25
25
  data_collection_permissions: { required: ["none"] }
26
26
  }
27
27
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/browser-extension",
3
3
  "type": "module",
4
- "version": "0.70.142",
4
+ "version": "0.70.144",
5
5
  "description": "Build MV3 browser extensions (Chrome, Firefox, Safari) the Stacks way — manifest, content/background scripts, DNR rules, packaging, Safari container app, all config-driven.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [