browser-extension-manager 1.3.2 → 1.3.4

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/CHANGELOG.md CHANGED
@@ -32,6 +32,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
32
32
  - `audit.js` audits chromium build (code is identical between targets)
33
33
  - Manifest compilation now uses 3-step process: apply defaults → target adjustments → cleanup
34
34
 
35
+ ### Fixed
36
+ - Packaged extensions no longer include `.scss`, `.sass`, `.ts`, or `.DS_Store` files (caused store rejections)
37
+
35
38
  ## [1.1.13] - 2025-11-26
36
39
  ### Added
37
40
  - Default `.env` file with publish credential templates for all stores
@@ -304,7 +304,7 @@ class Manager {
304
304
  if (user) {
305
305
  // User is signed in - get current stored state to preserve token
306
306
  const result = await new Promise(resolve =>
307
- this.extension.storage.get('bxm:authState', resolve)
307
+ this.extension.storage.local.get('bxm:authState', resolve)
308
308
  );
309
309
  const currentState = result['bxm:authState'] || {};
310
310
 
@@ -321,11 +321,11 @@ class Manager {
321
321
  timestamp: Date.now(),
322
322
  };
323
323
 
324
- await this.extension.storage.set({ 'bxm:authState': authState });
324
+ await this.extension.storage.local.set({ 'bxm:authState': authState });
325
325
  this.logger.log('[AUTH] Auth state synced to storage');
326
326
  } else {
327
327
  // User is signed out - clear storage
328
- await this.extension.storage.remove('bxm:authState');
328
+ await this.extension.storage.local.remove('bxm:authState');
329
329
  this.logger.log('[AUTH] Auth state cleared from storage');
330
330
  }
331
331
  }
@@ -349,11 +349,11 @@ class Manager {
349
349
 
350
350
  // Save token to storage (user state will be synced by onAuthStateChanged)
351
351
  const result = await new Promise(resolve =>
352
- this.extension.storage.get('bxm:authState', resolve)
352
+ this.extension.storage.local.get('bxm:authState', resolve)
353
353
  );
354
354
  const currentState = result['bxm:authState'] || {};
355
355
 
356
- await this.extension.storage.set({
356
+ await this.extension.storage.local.set({
357
357
  'bxm:authState': {
358
358
  ...currentState,
359
359
  token: token,
@@ -2,8 +2,6 @@
2
2
  // Basic info
3
3
  manifest_version: 3,
4
4
  name: '__MSG_appName__',
5
- // NOTE: Opera enforces a 12-char limit on short_name INCLUDING the placeholder text
6
- // '__MSG_appNameShort__' is 19 chars, so use a static value for Opera compatibility
7
5
  short_name: '__MSG_appNameShort__',
8
6
  description: '__MSG_appDescription__',
9
7
 
@@ -351,6 +351,14 @@ async function packageRaw() {
351
351
  }
352
352
  }
353
353
 
354
+ // Files to exclude from packaged output (development/source files)
355
+ const PACKAGE_EXCLUDE_PATTERNS = [
356
+ '**/*.scss',
357
+ '**/*.sass',
358
+ '**/*.ts',
359
+ '**/.DS_Store',
360
+ ];
361
+
354
362
  // Package raw for a specific target (chromium or firefox)
355
363
  async function packageRawForTarget(target) {
356
364
  logger.log(`[${target}] Starting raw packaging...`);
@@ -363,6 +371,13 @@ async function packageRawForTarget(target) {
363
371
  // Copy files to raw package directory
364
372
  await execute(`cp -r dist/* ${outputDir}`);
365
373
 
374
+ // Remove development/source files that shouldn't be in the package
375
+ const filesToRemove = jetpack.find(outputDir, { matching: PACKAGE_EXCLUDE_PATTERNS });
376
+ filesToRemove.forEach(file => {
377
+ jetpack.remove(file);
378
+ logger.log(`[${target}] Removed dev file: ${path.relative(outputDir, file)}`);
379
+ });
380
+
366
381
  // Loop thru outputDir/assets/js all JS files for redactions
367
382
  const jsFiles = jetpack.find(path.join(outputDir, 'assets', 'js'), { matching: '*.js' });
368
383
  const redactions = getRedactions();
@@ -54,7 +54,14 @@ const STORES = {
54
54
  name: 'Opera Add-ons',
55
55
  submitUrl: 'https://addons.opera.com/developer/',
56
56
  apiUrl: null,
57
- enabled: () => false,
57
+ enabled: () => false, // No API available
58
+ },
59
+ brave: {
60
+ name: 'Brave (via Chrome Web Store)',
61
+ submitUrl: 'https://chrome.google.com/webstore/devconsole',
62
+ apiUrl: null,
63
+ enabled: () => false, // Uses Chrome Web Store - no separate store
64
+ note: 'Brave uses Chrome Web Store directly. Publishing to Chrome makes extension available in Brave.',
58
65
  },
59
66
  };
60
67
 
@@ -95,7 +102,13 @@ async function publish(complete) {
95
102
  Object.entries(STORES).forEach(([, store]) => {
96
103
  logger.log(` ${store.name}:`);
97
104
  logger.log(` Submit: ${store.submitUrl}`);
98
- logger.log(` API: ${store.apiUrl || 'N/A (manual submission only)'}`);
105
+ if (store.apiUrl) {
106
+ logger.log(` API: ${store.apiUrl}`);
107
+ } else if (store.note) {
108
+ logger.log(` Note: ${store.note}`);
109
+ } else {
110
+ logger.log(` API: N/A (manual submission only)`);
111
+ }
99
112
  });
100
113
  throw new Error('No stores configured for publishing');
101
114
  }
@@ -141,10 +154,14 @@ async function publish(complete) {
141
154
  status = '✓ Published';
142
155
  } else if (results.failed.includes(key)) {
143
156
  status = '✗ Failed';
157
+ } else if (store.note) {
158
+ status = '○ ' + store.note.split('.')[0]; // First sentence of note
144
159
  }
145
160
  logger.log(` ${store.name}: ${status}`);
146
161
  logger.log(` Submit: ${store.submitUrl}`);
147
- logger.log(` API: ${store.apiUrl || 'N/A (manual submission only)'}`);
162
+ if (store.apiUrl) {
163
+ logger.log(` API: ${store.apiUrl}`);
164
+ }
148
165
  });
149
166
 
150
167
  // Throw error if any failed
@@ -26,7 +26,7 @@ npm install
26
26
  npm run build
27
27
  ```
28
28
  5. The built extensions will be in `packaged/` directory:
29
- - **Chrome/Edge:** `packaged/chromium/raw/` (unpacked) and `packaged/chromium/extension.zip`
29
+ - **Chrome/Edge/Brave:** `packaged/chromium/raw/` (unpacked) and `packaged/chromium/extension.zip`
30
30
  - **Firefox:** `packaged/firefox/raw/` (unpacked) and `packaged/firefox/extension.zip`
31
31
  - **Opera:** `packaged/opera/raw/` (unpacked) and `packaged/opera/extension.zip`
32
32
 
@@ -56,6 +56,14 @@ npm run build
56
56
  3. Click "Load unpacked"
57
57
  4. Select the `packaged/opera/raw/` directory
58
58
 
59
+ ### Brave
60
+ 1. Go to `brave://extensions`
61
+ 2. Enable "Developer mode"
62
+ 3. Click "Load unpacked"
63
+ 4. Select the `packaged/chromium/raw/` directory
64
+
65
+ > **Note:** Brave is Chromium-based and uses the same build as Chrome/Edge. Extensions published to the Chrome Web Store are automatically available in Brave.
66
+
59
67
  ## Questions
60
68
 
61
69
  If you have any questions about the build process, please contact the developer.
@@ -112,7 +112,7 @@ Affiliatizer.get = function () {
112
112
  Affiliatizer.initialize = async function (Manager) {
113
113
  // Shortcuts
114
114
  const { extension, logger } = Manager;
115
- const { storage } = extension;
115
+ const storage = extension.storage.local;
116
116
 
117
117
  // Parse the URL
118
118
  const url = new URL(window.location.href);
@@ -29,7 +29,7 @@ async function signInWithStoredToken(context, authState) {
29
29
  // If token is invalid/expired, clear the auth state
30
30
  if (error.code === 'auth/invalid-custom-token' || error.code === 'auth/custom-token-expired') {
31
31
  logger.log('[AUTH-SYNC] Token expired, clearing auth state');
32
- context.extension.storage.remove('bxm:authState');
32
+ context.extension.storage.local.remove('bxm:authState');
33
33
  }
34
34
  }
35
35
  }
@@ -43,7 +43,7 @@ export function setupAuthStorageListener(context) {
43
43
  const { extension, webManager, logger } = context;
44
44
 
45
45
  // Check existing auth state on load and sign in
46
- extension.storage.get('bxm:authState', (result) => {
46
+ extension.storage.local.get('bxm:authState', (result) => {
47
47
  const authState = result['bxm:authState'];
48
48
 
49
49
  if (authState?.token) {
@@ -58,7 +58,7 @@ export function setupAuthStorageListener(context) {
58
58
  if (!state.user) {
59
59
  // User signed out - clear storage so all contexts sync
60
60
  logger.log('[AUTH-SYNC] WM auth signed out, clearing storage...');
61
- extension.storage.remove('bxm:authState');
61
+ extension.storage.local.remove('bxm:authState');
62
62
  }
63
63
  });
64
64
 
@@ -111,15 +111,6 @@ function Extension () {
111
111
  }
112
112
  } catch (e) {}
113
113
 
114
- // Fix storage
115
- if (self.storage) {
116
- if (self.storage.sync) {
117
- self.storage = self.storage.sync
118
- } else if (self.storage.local) {
119
- self.storage = self.storage.local
120
- }
121
- }
122
-
123
114
  // Return the object
124
115
  return self;
125
116
  }
@@ -1160,3 +1160,59 @@
1160
1160
  [debug] [2025-12-15T21:36:33.065Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1161
1161
  [debug] [2025-12-15T21:36:33.065Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1162
1162
  [debug] [2025-12-15T21:36:33.066Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1163
+ [debug] [2025-12-17T08:07:07.466Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1164
+ [debug] [2025-12-17T08:07:07.466Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1165
+ [debug] [2025-12-17T08:07:07.469Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1166
+ [debug] [2025-12-17T08:07:07.469Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1167
+ [debug] [2025-12-17T08:07:07.469Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1168
+ [debug] [2025-12-17T08:07:07.479Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1169
+ [debug] [2025-12-17T08:07:07.479Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1170
+ [debug] [2025-12-17T08:07:07.469Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1171
+ [debug] [2025-12-17T08:07:07.469Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1172
+ [debug] [2025-12-17T08:07:07.469Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1173
+ [debug] [2025-12-17T08:07:07.479Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1174
+ [debug] [2025-12-17T08:07:07.479Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1175
+ [debug] [2025-12-17T08:07:07.506Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1176
+ [debug] [2025-12-17T08:07:07.509Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1177
+ [debug] [2025-12-17T08:07:07.506Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1178
+ [debug] [2025-12-17T08:07:07.507Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1179
+ [debug] [2025-12-17T08:07:07.507Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1180
+ [debug] [2025-12-17T08:07:07.509Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1181
+ [debug] [2025-12-17T08:07:07.509Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1182
+ [debug] [2025-12-17T08:07:07.510Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1183
+ [debug] [2025-12-17T08:07:07.510Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1184
+ [debug] [2025-12-17T08:07:07.509Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1185
+ [debug] [2025-12-17T08:07:07.511Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1186
+ [debug] [2025-12-17T08:07:07.511Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1187
+ [debug] [2025-12-17T08:07:07.514Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1188
+ [debug] [2025-12-17T08:07:07.514Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1189
+ [debug] [2025-12-17T08:07:07.515Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1190
+ [debug] [2025-12-17T08:07:07.515Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1191
+ [debug] [2025-12-17T08:07:10.923Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1192
+ [debug] [2025-12-17T08:07:10.925Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1193
+ [debug] [2025-12-17T08:07:10.925Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1194
+ [debug] [2025-12-17T08:07:10.926Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1195
+ [debug] [2025-12-17T08:07:10.938Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1196
+ [debug] [2025-12-17T08:07:10.938Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1197
+ [debug] [2025-12-17T08:07:10.945Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1198
+ [debug] [2025-12-17T08:07:10.947Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1199
+ [debug] [2025-12-17T08:07:10.948Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1200
+ [debug] [2025-12-17T08:07:10.948Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1201
+ [debug] [2025-12-17T08:07:10.960Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1202
+ [debug] [2025-12-17T08:07:10.960Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1203
+ [debug] [2025-12-17T08:07:10.966Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1204
+ [debug] [2025-12-17T08:07:10.966Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1205
+ [debug] [2025-12-17T08:07:10.967Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1206
+ [debug] [2025-12-17T08:07:10.967Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1207
+ [debug] [2025-12-17T08:07:10.969Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1208
+ [debug] [2025-12-17T08:07:10.969Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1209
+ [debug] [2025-12-17T08:07:10.969Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1210
+ [debug] [2025-12-17T08:07:10.969Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1211
+ [debug] [2025-12-17T08:07:10.990Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1212
+ [debug] [2025-12-17T08:07:10.990Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1213
+ [debug] [2025-12-17T08:07:10.991Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1214
+ [debug] [2025-12-17T08:07:10.991Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1215
+ [debug] [2025-12-17T08:07:10.992Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1216
+ [debug] [2025-12-17T08:07:10.992Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
1217
+ [debug] [2025-12-17T08:07:10.993Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
1218
+ [debug] [2025-12-17T08:07:10.993Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-manager",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Browser Extension Manager dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {