lumabrowser 1.0.6 → 1.0.8

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
@@ -8,7 +8,7 @@
8
8
  npx lumabrowser start
9
9
  ```
10
10
 
11
- That's it. The first run downloads the right build for your OS from the [official GitHub Releases](https://github.com/amurgola/notification2webhookbrowser/releases), caches it under `~/.lumabrowser/`, and launches it.
11
+ That's it. The first run downloads the right build for your OS from [lumabyte.com](https://lumabyte.com), caches it under `~/.lumabrowser/`, and launches it.
12
12
 
13
13
  Subsequent runs launch from cache — no re-download unless you ask for one.
14
14
 
@@ -53,7 +53,16 @@ lumabrowser start
53
53
  ## Learn more
54
54
 
55
55
  - Docs & downloads: [lumabyte.com](https://lumabyte.com)
56
- - Source & issues: [github.com/amurgola/notification2webhookbrowser](https://github.com/amurgola/notification2webhookbrowser)
56
+ - API docs: [lumabyte.com/apis](https://lumabyte.com/apis)
57
+ - Report issues: [github.com/amurgola/notification2webhookbrowser/issues](https://github.com/amurgola/notification2webhookbrowser/issues)
58
+
59
+ ## Advanced: custom manifest
60
+
61
+ By default the launcher reads `https://lumabyte.com/install/manifest.json`. To point at a staging or self-hosted mirror, set `LUMABROWSER_MANIFEST_URL`:
62
+
63
+ ```bash
64
+ LUMABROWSER_MANIFEST_URL=https://staging.lumabyte.com/install/manifest.json npx lumabrowser start
65
+ ```
57
66
 
58
67
  ## License
59
68
 
@@ -7,7 +7,10 @@ const path = require('path');
7
7
  const os = require('os');
8
8
  const { spawn, execSync } = require('child_process');
9
9
 
10
- const REPO = 'amurgola/notification2webhookbrowser';
10
+ // The LumaBrowser source repository is private, so we resolve downloads via
11
+ // lumabyte.com (not GitHub Releases). The site exposes a JSON manifest that
12
+ // lists the current installer for each platform.
13
+ const MANIFEST_URL = process.env.LUMABROWSER_MANIFEST_URL || 'https://lumabyte.com/install/manifest.json';
11
14
  const CACHE_DIR = path.join(os.homedir(), '.lumabrowser');
12
15
  const STATE_FILE = path.join(CACHE_DIR, 'install.json');
13
16
  const USER_AGENT = 'lumabrowser-cli';
@@ -66,7 +69,7 @@ function httpRequest(url, { json = false } = {}) {
66
69
  const req = https.get(url, {
67
70
  headers: {
68
71
  'User-Agent': USER_AGENT,
69
- 'Accept': json ? 'application/vnd.github+json' : '*/*'
72
+ 'Accept': json ? 'application/json' : '*/*'
70
73
  }
71
74
  }, (res) => {
72
75
  if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
@@ -141,68 +144,52 @@ function renderBar(pct) {
141
144
  return '[' + '#'.repeat(filled) + '-'.repeat(width - filled) + ']';
142
145
  }
143
146
 
144
- function pickAsset(assets) {
145
- const platform = process.platform;
146
- const arch = process.arch;
147
-
148
- const patterns = {
149
- win32: [
150
- /portable.*\.exe$/i,
151
- /win.*portable.*\.exe$/i,
152
- /lumabrowser[^/]*\.exe$/i
153
- ],
154
- darwin: [
155
- arch === 'arm64'
156
- ? /(mac|osx|darwin).*arm64.*\.zip$/i
157
- : /(mac|osx|darwin).*(x64|x86_64).*\.zip$/i,
158
- /(mac|osx|darwin).*\.zip$/i
159
- ],
160
- linux: [
161
- /\.AppImage$/i
162
- ]
163
- }[platform] || [];
164
-
165
- for (const pattern of patterns) {
166
- const match = assets.find((a) => pattern.test(a.name));
167
- if (match) return match;
168
- }
169
- return null;
147
+ function platformKey() {
148
+ const p = process.platform;
149
+ const a = process.arch;
150
+ if (p === 'win32') return 'win32-x64';
151
+ if (p === 'darwin') return a === 'arm64' ? 'darwin-arm64' : 'darwin-x64';
152
+ if (p === 'linux') return 'linux-x64';
153
+ return `${p}-${a}`;
170
154
  }
171
155
 
172
- async function fetchLatestRelease() {
173
- return httpRequest(`https://api.github.com/repos/${REPO}/releases/latest`, { json: true });
156
+ async function fetchManifest() {
157
+ return httpRequest(MANIFEST_URL, { json: true });
174
158
  }
175
159
 
176
160
  async function install({ force = false } = {}) {
177
- info('Checking GitHub for the latest LumaBrowser release…');
178
- const release = await fetchLatestRelease();
179
- const asset = pickAsset(release.assets || []);
180
- if (!asset) {
161
+ info(`Checking ${MANIFEST_URL.replace(/^https?:\/\//, '').split('/')[0]} for the latest LumaBrowser release…`);
162
+ const manifest = await fetchManifest();
163
+ const key = platformKey();
164
+ const asset = manifest && manifest.assets && manifest.assets[key];
165
+ if (!asset || !asset.url || !asset.filename) {
166
+ const available = (manifest && manifest.assets) ? Object.keys(manifest.assets).join(', ') : '(none)';
181
167
  throw new Error(
182
- `No compatible LumaBrowser asset found for ${process.platform}/${process.arch} in release ${release.tag_name}.\n` +
183
- `Available assets: ${(release.assets || []).map((a) => a.name).join(', ') || '(none)'}`
168
+ `No LumaBrowser build available for ${key}.\n` +
169
+ `Available platforms in manifest: ${available}\n` +
170
+ `If this is wrong, please open an issue at https://github.com/amurgola/notification2webhookbrowser/issues`
184
171
  );
185
172
  }
186
173
 
187
174
  const current = readState();
188
- if (!force && current && current.version === release.tag_name && current.executable && fs.existsSync(current.executable)) {
175
+ if (!force && current && current.version === manifest.version && current.executable && fs.existsSync(current.executable)) {
189
176
  return current;
190
177
  }
191
178
 
192
179
  fs.mkdirSync(CACHE_DIR, { recursive: true });
193
- const downloadPath = path.join(CACHE_DIR, asset.name);
194
- ok(`Downloading LumaBrowser ${release.tag_name} — ${asset.name}`);
195
- await downloadFile(asset.browser_download_url, downloadPath, 'Downloading');
180
+ const downloadPath = path.join(CACHE_DIR, asset.filename);
181
+ ok(`Downloading LumaBrowser ${manifest.version} — ${asset.filename}`);
182
+ await downloadFile(asset.url, downloadPath, 'Downloading');
196
183
 
197
184
  const executable = prepareExecutable(downloadPath);
198
185
  const record = {
199
- version: release.tag_name,
200
- asset: asset.name,
186
+ version: manifest.version,
187
+ asset: asset.filename,
201
188
  executable,
202
189
  installedAt: new Date().toISOString()
203
190
  };
204
191
  writeState(record);
205
- ok(`Installed LumaBrowser ${release.tag_name}`);
192
+ ok(`Installed LumaBrowser ${manifest.version}`);
206
193
  return record;
207
194
  }
208
195
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumabrowser",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "CLI launcher for LumaBrowser — a multi-tab browser with notification interception and AI-driven automation.",
5
5
  "bin": {
6
6
  "lumabrowser": "bin/lumabrowser.js"