@stacksjs/browser-extension 0.70.161 → 0.70.162

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.
Files changed (2) hide show
  1. package/README.md +26 -26
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -45,12 +45,12 @@ buddy extension:safari:publish
45
45
  buddy extension:safari:submit # submit an already-uploaded version
46
46
  ```
47
47
 
48
- Chrome reads `CHROME_WEB_STORE_SERVICE_ACCOUNT_PATH` (or
49
- `GOOGLE_APPLICATION_CREDENTIALS`) and the configured
48
+ Chrome reads `CHROME*WEB*STORE*SERVICE*ACCOUNT*PATH` (or
49
+ `GOOGLE*APPLICATION*CREDENTIALS`) and the configured
50
50
  `chromeWebStore.publisherId`/`itemId`. The API only updates existing items, so
51
51
  create the initial Developer Dashboard item once and link the service-account
52
- email to the publisher account. Firefox reads `AMO_JWT_ISSUER` and
53
- `AMO_JWT_SECRET`; `web-ext` can create the initial listing when
52
+ email to the publisher account. Firefox reads `AMO*JWT*ISSUER` and
53
+ `AMO*JWT*SECRET`; `web-ext` can create the initial listing when
54
54
  `firefoxAddons.license` and `firefoxAddons.categories` are configured.
55
55
 
56
56
  For tag-driven publication, call Stacks' reusable workflow from the extension
@@ -60,7 +60,7 @@ resubmitting builds to the browser stores:
60
60
 
61
61
  ```yaml
62
62
  on:
63
- workflow_dispatch:
63
+ workflow*dispatch:
64
64
  inputs:
65
65
  github-release-only:
66
66
  description: Build packages and create or repair the GitHub Release only
@@ -78,17 +78,17 @@ jobs:
78
78
  publish:
79
79
  uses: stacksjs/stacks/.github/workflows/browser-extension-release.yml@v0.70.147
80
80
  with:
81
- chrome-publisher-id: ${{ vars.CHROME_WEB_STORE_PUBLISHER_ID }}
82
- safari-enabled: ${{ vars.ENABLE_SAFARI_PUBLISH == 'true' }}
81
+ chrome-publisher-id: ${{ vars.CHROME*WEB*STORE*PUBLISHER*ID }}
82
+ safari-enabled: ${{ vars.ENABLE*SAFARI*PUBLISH == 'true' }}
83
83
  publish-stores: ${{ !inputs.github-release-only }}
84
84
  release-tag: ${{ inputs.release-tag || '' }}
85
85
  secrets:
86
- CHROME_WEB_STORE_SERVICE_ACCOUNT_JSON: ${{ secrets.CHROME_WEB_STORE_SERVICE_ACCOUNT_JSON }}
87
- AMO_JWT_ISSUER: ${{ secrets.AMO_JWT_ISSUER }}
88
- AMO_JWT_SECRET: ${{ secrets.AMO_JWT_SECRET }}
89
- APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
90
- APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
91
- APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_ISSUER_ID }}
86
+ CHROME*WEB*STORE*SERVICE*ACCOUNT*JSON: ${{ secrets.CHROME*WEB*STORE*SERVICE*ACCOUNT*JSON }}
87
+ AMO*JWT*ISSUER: ${{ secrets.AMO*JWT*ISSUER }}
88
+ AMO*JWT*SECRET: ${{ secrets.AMO*JWT*SECRET }}
89
+ APP*STORE*CONNECT*API*KEY: ${{ secrets.APP*STORE*CONNECT*API*KEY }}
90
+ APP*STORE*CONNECT*API*KEY*ID: ${{ secrets.APP*STORE*CONNECT*API*KEY*ID }}
91
+ APP*STORE*CONNECT*API*ISSUER*ID: ${{ secrets.APP*STORE*CONNECT*API*ISSUER*ID }}
92
92
  ```
93
93
 
94
94
  It packages every configured target, publishes Chrome and Firefox in
@@ -104,8 +104,8 @@ Safari Web Extensions ship inside Apple container apps, so the safari target
104
104
  has two halves: the web bundle (`extension:build --target safari`) and the
105
105
  macOS/iOS apps. The build rewrites promise-style `chrome.*` to `browser.*` (Safari's
106
106
  `chrome.*` is callback-flavoured) and pins
107
- `browser_specific_settings.safari.strict_min_version` (default 18.4, the first
108
- Safari with MAIN-world content scripts + `match_about_blank`).
107
+ `browser*specific*settings.safari.strict*min*version` (default 18.4, the first
108
+ Safari with MAIN-world content scripts + `match*about*blank`).
109
109
 
110
110
  ```sh
111
111
  buddy extension:safari:init # scaffold the Xcode container app into safari/
@@ -123,8 +123,8 @@ iPhone and iPad. Stacks generates the current Apple-supported universal Xcode
123
123
  project from the same built extension, archives both platforms, uploads them
124
124
  to the same App Store Connect app record, waits for Apple processing, and
125
125
  selects each processed build on its matching App Store version. Publishing
126
- reads `APP_STORE_CONNECT_API_KEY_ID`, `APP_STORE_CONNECT_API_ISSUER_ID`, and
127
- `APP_STORE_CONNECT_API_KEY_PATH` from the environment. Run with
126
+ reads `APP*STORE*CONNECT*API*KEY*ID`, `APP*STORE*CONNECT*API*ISSUER*ID`, and
127
+ `APP*STORE*CONNECT*API*KEY*PATH` from the environment. Run with
128
128
  `--validate-only` to exercise Apple's validation without uploading a build.
129
129
  List any build output that is not part of the extension (marketing pages,
130
130
  etc.) in `safariExclude` so it stays out of the appex. The scaffold mirrors
@@ -168,16 +168,16 @@ export default defineExtension({
168
168
  supportUrl: 'https://example.com/support',
169
169
  copyright: '2026 Example',
170
170
  primaryCategory: 'UTILITIES',
171
- contentRightsDeclaration: 'DOES_NOT_USE_THIRD_PARTY_CONTENT',
171
+ contentRightsDeclaration: 'DOES*NOT*USE*THIRD*PARTY*CONTENT',
172
172
  price: '0',
173
173
  reviewContact: {
174
174
  firstName: 'App', lastName: 'Reviewer',
175
175
  phone: '+1 555-555-0100', email: 'review@example.com',
176
176
  },
177
177
  screenshots: {
178
- APP_DESKTOP: ['resources/store/macos.png'],
179
- APP_IPHONE_67: ['resources/store/iphone.png'],
180
- APP_IPAD_PRO_3GEN_129: ['resources/store/ipad.png'],
178
+ APP*DESKTOP: ['resources/store/macos.png'],
179
+ APP*IPHONE*67: ['resources/store/iphone.png'],
180
+ APP*IPAD*PRO*3GEN*129: ['resources/store/ipad.png'],
181
181
  },
182
182
  submitForReview: true,
183
183
  },
@@ -185,7 +185,7 @@ export default defineExtension({
185
185
 
186
186
  background: 'src/background/index.ts',
187
187
  content: [
188
- { entry: 'src/content/index.ts', matches: ['<all_urls>'], runAt: 'document_start' },
188
+ { entry: 'src/content/index.ts', matches: ['<all*urls>'], runAt: 'document*start' },
189
189
  // world: 'MAIN' runs in the page's own JS context (patch page globals)
190
190
  { entry: 'src/content/inpage.ts', matches: ['*://example.com/*'], world: 'MAIN' },
191
191
  ],
@@ -199,7 +199,7 @@ export default defineExtension({
199
199
 
200
200
  // declarativeNetRequest — compiled from a module whose default export
201
201
  // returns the rules array, written to rules/<id>.json:
202
- rules: [{ id: 'static_rules', source: 'src/rules/static.ts' }],
202
+ rules: [{ id: 'static*rules', source: 'src/rules/static.ts' }],
203
203
 
204
204
  manifest: {
205
205
  permissions: ['declarativeNetRequest', 'storage', 'tabs'],
@@ -207,7 +207,7 @@ export default defineExtension({
207
207
  minimumChromeVersion: '111',
208
208
  firefoxMinVersion: '142.0',
209
209
  safariMinVersion: '18.4',
210
- webAccessibleResources: [{ resources: ['stubs/*.js'], matches: ['<all_urls>'] }],
210
+ webAccessibleResources: [{ resources: ['stubs/*.js'], matches: ['<all*urls>'] }],
211
211
  },
212
212
 
213
213
  // App-specific post-processing the generic build can't express:
@@ -224,8 +224,8 @@ stx pages to HTML (**sanitized for the extension CSP** — inline scripts/styles
224
224
  stripped, asset paths made relative, stx dev-chunks removed), bundles
225
225
  content/background scripts as classic **IIFE** bundles (esm would leak
226
226
  top-level vars as page globals), compiles each ruleset's `source` to
227
- `rules/<id>.json`, writes `manifest.json` (per-target: Chrome `service_worker`
228
- vs Firefox event-page + `browser_specific_settings.gecko`), and runs your
227
+ `rules/<id>.json`, writes `manifest.json` (per-target: Chrome `service*worker`
228
+ vs Firefox event-page + `browser*specific*settings.gecko`), and runs your
229
229
  `hooks.postBuild`.
230
230
 
231
231
  ## Programmatic API
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/browser-extension",
3
3
  "type": "module",
4
- "version": "0.70.161",
4
+ "version": "0.70.162",
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": [