loophole-im 0.1.0 → 0.1.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.
@@ -121,19 +121,19 @@ async function downloadBinary(suffix) {
121
121
  await downloadFile(binaryUrl, dest, { ...headers, Accept: "application/octet-stream" });
122
122
  await downloadFile(shaUrl, shaDest, headers);
123
123
  } else {
124
- // public mode — direct download (will 404 while repo private)
124
+ // public mode — R2 (releases.loophole.im) — no GH_TOKEN needed, repo can stay private
125
+ const r2Base = "https://releases.loophole.im";
125
126
  const base = version && version !== "0.0.0" && version !== "0.0.0-dev"
126
- ? `https://github.com/${REPO}/releases/download/v${version}`
127
- : `https://github.com/${REPO}/releases/latest/download`;
127
+ ? `${r2Base}/v${version}`
128
+ : `${r2Base}/v0.1.0`;
128
129
  binaryUrl = `${base}/${name}`;
129
130
  shaUrl = `${base}/SHA256SUMS`;
130
131
  try {
131
132
  await downloadFile(binaryUrl, dest, {});
132
133
  await downloadFile(shaUrl, shaDest, {});
133
134
  } catch (e) {
134
- console.error(`could not download ${name} — repo is private, set GH_TOKEN to download`);
135
- console.error(` export GH_TOKEN=ghp_...`);
136
- console.error(` npx loophole-im link # then tunnel`);
135
+ console.error(`could not download ${name} from ${binaryUrl}: ${e.message}`);
136
+ console.error(` check https://releases.loophole.im/v${version}/ — or set GH_TOKEN to fallback to GitHub API`);
137
137
  process.exit(1);
138
138
  }
139
139
  }
package/bin/loophole.js CHANGED
@@ -121,19 +121,19 @@ async function downloadBinary(suffix) {
121
121
  await downloadFile(binaryUrl, dest, { ...headers, Accept: "application/octet-stream" });
122
122
  await downloadFile(shaUrl, shaDest, headers);
123
123
  } else {
124
- // public mode — direct download (will 404 while repo private)
124
+ // public mode — R2 (releases.loophole.im) — no GH_TOKEN needed, repo can stay private
125
+ const r2Base = "https://releases.loophole.im";
125
126
  const base = version && version !== "0.0.0" && version !== "0.0.0-dev"
126
- ? `https://github.com/${REPO}/releases/download/v${version}`
127
- : `https://github.com/${REPO}/releases/latest/download`;
127
+ ? `${r2Base}/v${version}`
128
+ : `${r2Base}/v0.1.0`;
128
129
  binaryUrl = `${base}/${name}`;
129
130
  shaUrl = `${base}/SHA256SUMS`;
130
131
  try {
131
132
  await downloadFile(binaryUrl, dest, {});
132
133
  await downloadFile(shaUrl, shaDest, {});
133
134
  } catch (e) {
134
- console.error(`could not download ${name} — repo is private, set GH_TOKEN to download`);
135
- console.error(` export GH_TOKEN=ghp_...`);
136
- console.error(` npx loophole-im link # then tunnel`);
135
+ console.error(`could not download ${name} from ${binaryUrl}: ${e.message}`);
136
+ console.error(` check https://releases.loophole.im/v${version}/ — or set GH_TOKEN to fallback to GitHub API`);
137
137
  process.exit(1);
138
138
  }
139
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loophole-im",
3
- "version": "0.1.0",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "description": "Tunnel local web apps so they're reachable from any signed-in instance — private Cloudflare Tunnels",
6
6
  "license": "MIT",
@@ -26,9 +26,7 @@
26
26
  "dev": "bun run src/index.ts",
27
27
  "typecheck": "tsc --noEmit"
28
28
  },
29
- "dependencies": {},
30
29
  "devDependencies": {
31
- "@loophole/contracts": "workspace:*",
32
30
  "@types/bun": "latest",
33
31
  "jose": "^5.9.6",
34
32
  "typescript": "^5.7.2",