Mirror of https://github.com/improsocial/impro An extensible Bluesky client for web impro.social
6

Configure Feed

Select the types of activity you want to include in your feed.

Use github user content API

Grace Kind (Jun 9, 2026, 4:40 PM -0500) 2f97ae44 187969fd

+42 -38
+1 -1
package.json
··· 1 1 { 2 2 "name": "impro", 3 - "version": "0.16.12", 3 + "version": "0.16.13", 4 4 "type": "module", 5 5 "scripts": { 6 6 "start": "rm -rf \"${BUILD_DIR:-build}\" && NODE_ENV=development eleventy --serve",
+2 -4
src/js/plugins/sourceProvider.js
··· 15 15 } 16 16 17 17 function remoteAssetUrl({ repo, file, release = null }) { 18 - if (release) { 19 - return `https://cdn.jsdelivr.net/gh/${repo}@${release}/${file}`; 20 - } 21 - return `https://raw.githubusercontent.com/${repo}/refs/heads/main/${file}`; 18 + const ref = release ? `refs/tags/${release}` : "refs/heads/main"; 19 + return `https://raw.githubusercontent.com/${repo}/${ref}/${file}`; 22 20 } 23 21 24 22 export class SourceProvider {
+31 -25
tests/e2e/mockServer.js
··· 280 280 body: JSON.stringify(this.registryEntries), 281 281 }), 282 282 ); 283 - await page.route("**/cdn.jsdelivr.net/gh/*/*@*/manifest.json", (route) => { 284 - const match = route 285 - .request() 286 - .url() 287 - .match(/@([^/]+)\/manifest\.json$/); 288 - const version = match?.[1] ?? "0.0.0"; 289 - const id = this.registryEntries[0]?.id ?? "remote-plugin"; 290 - route.fulfill({ 291 - status: 200, 292 - contentType: "application/json", 293 - body: JSON.stringify({ 294 - id, 295 - name: this.registryEntries[0]?.name ?? "Remote Plugin", 296 - version, 297 - description: this.registryEntries[0]?.description, 283 + await page.route( 284 + "**/raw.githubusercontent.com/*/*/refs/tags/*/manifest.json", 285 + (route) => { 286 + const match = route 287 + .request() 288 + .url() 289 + .match(/refs\/tags\/([^/]+)\/manifest\.json$/); 290 + const version = match?.[1] ?? "0.0.0"; 291 + const id = this.registryEntries[0]?.id ?? "remote-plugin"; 292 + route.fulfill({ 293 + status: 200, 294 + contentType: "application/json", 295 + body: JSON.stringify({ 296 + id, 297 + name: this.registryEntries[0]?.name ?? "Remote Plugin", 298 + version, 299 + description: this.registryEntries[0]?.description, 300 + }), 301 + }); 302 + }, 303 + ); 304 + await page.route( 305 + "**/raw.githubusercontent.com/*/*/refs/tags/*/main.js", 306 + (route) => 307 + route.fulfill({ 308 + status: 200, 309 + contentType: "text/javascript", 310 + body: getTestPluginSource(), 298 311 }), 299 - }); 300 - }); 301 - await page.route("**/cdn.jsdelivr.net/gh/*/*@*/main.js", (route) => 302 - route.fulfill({ 303 - status: 200, 304 - contentType: "text/javascript", 305 - body: getTestPluginSource(), 306 - }), 307 312 ); 308 - await page.route("**/cdn.jsdelivr.net/gh/*/*@*/styles.css", (route) => 309 - route.fulfill({ status: 404, body: "Not Found" }), 313 + await page.route( 314 + "**/raw.githubusercontent.com/*/*/refs/tags/*/styles.css", 315 + (route) => route.fulfill({ status: 404, body: "Not Found" }), 310 316 ); 311 317 await page.route( 312 318 "**/raw.githubusercontent.com/*/*/refs/heads/main/manifest.json",
+1 -1
tests/e2e/specs/flows/installUnregisteredPlugin.test.js
··· 24 24 // the registry is empty; override it so the load step gets a manifest 25 25 // whose id matches what we installed. 26 26 await page.route( 27 - "**/cdn.jsdelivr.net/gh/alice/unregistered-themes@1.0.0/manifest.json", 27 + "**/raw.githubusercontent.com/alice/unregistered-themes/refs/tags/1.0.0/manifest.json", 28 28 (route) => 29 29 route.fulfill({ 30 30 status: 200,
+7 -7
tests/unit/specs/sourceProvider.test.js
··· 159 159 const manifest = await provider.getManifest("alpha", "1.0.0", "ow/alpha"); 160 160 assertEquals( 161 161 pluginCache.calls[0], 162 - "https://cdn.jsdelivr.net/gh/ow/alpha@1.0.0/manifest.json", 162 + "https://raw.githubusercontent.com/ow/alpha/refs/tags/1.0.0/manifest.json", 163 163 ); 164 164 assertEquals(manifest.id, "alpha"); 165 165 }); ··· 176 176 const source = await provider.getSource("alpha", "2.5.0", "ow/alpha"); 177 177 assertEquals( 178 178 pluginCache.calls[0], 179 - "https://cdn.jsdelivr.net/gh/ow/alpha@2.5.0/main.js", 179 + "https://raw.githubusercontent.com/ow/alpha/refs/tags/2.5.0/main.js", 180 180 ); 181 181 assertEquals(source, "alert(1)"); 182 182 }); ··· 218 218 const provider = new SourceProvider(null); 219 219 const urls = await provider.getCacheUrls("alpha", "1.2.3", "ow/alpha"); 220 220 assertEquals(urls, [ 221 - "https://cdn.jsdelivr.net/gh/ow/alpha@1.2.3/manifest.json", 222 - "https://cdn.jsdelivr.net/gh/ow/alpha@1.2.3/main.js", 223 - "https://cdn.jsdelivr.net/gh/ow/alpha@1.2.3/styles.css", 221 + "https://raw.githubusercontent.com/ow/alpha/refs/tags/1.2.3/manifest.json", 222 + "https://raw.githubusercontent.com/ow/alpha/refs/tags/1.2.3/main.js", 223 + "https://raw.githubusercontent.com/ow/alpha/refs/tags/1.2.3/styles.css", 224 224 ]); 225 225 }); 226 226 ··· 236 236 const styles = await provider.getStyles("alpha", "1.0.0", "ow/alpha"); 237 237 assertEquals( 238 238 pluginCache.calls[0], 239 - "https://cdn.jsdelivr.net/gh/ow/alpha@1.0.0/styles.css", 239 + "https://raw.githubusercontent.com/ow/alpha/refs/tags/1.0.0/styles.css", 240 240 ); 241 241 assertEquals(styles, "body{color:blue}"); 242 242 }); ··· 279 279 it("getStyles returns null when remote styles.css 404s", async () => { 280 280 const pluginCache = fakePluginCache(async () => { 281 281 const error = new Error( 282 - "HTTP 404 https://cdn.jsdelivr.net/gh/ow/alpha@1.0.0/styles.css", 282 + "HTTP 404 https://raw.githubusercontent.com/ow/alpha/refs/tags/1.0.0/styles.css", 283 283 ); 284 284 error.status = 404; 285 285 throw error;