alternative tangled frontend (extremely wip)
at main 80 lines 2.8 kB view raw
1const __DEV__oAuthCallbackUrl = "http://127.0.0.1:3000/oauth/callback"; 2 3const oAuthScopes = [ 4 "atproto", 5 6 "repo:sh.tangled.publicKey", 7 "repo:sh.tangled.repo", 8 "repo:sh.tangled.repo.pull", 9 "repo:sh.tangled.repo.pull.comment", 10 "repo:sh.tangled.repo.artifact", 11 "repo:sh.tangled.repo.issue", 12 "repo:sh.tangled.repo.issue.comment", 13 "repo:sh.tangled.repo.collaborator", 14 "repo:sh.tangled.knot", 15 "repo:sh.tangled.knot.member", 16 "repo:sh.tangled.spindle", 17 "repo:sh.tangled.spindle.member", 18 "repo:sh.tangled.graph.follow", 19 "repo:sh.tangled.feed.star", 20 "repo:sh.tangled.feed.reaction", 21 "repo:sh.tangled.label.definition", 22 "repo:sh.tangled.label.op", 23 "repo:sh.tangled.string", 24 "repo:sh.tangled.actor.profile", 25 26 "blob:*/*", 27 28 "rpc:sh.tangled.repo.create?aud=*", 29 "rpc:sh.tangled.repo.delete?aud=*", 30 "rpc:sh.tangled.repo.merge?aud=*", 31 "rpc:sh.tangled.repo.hiddenRef?aud=*", 32 "rpc:sh.tangled.repo.deleteBranch?aud=*", 33 "rpc:sh.tangled.repo.setDefaultBranch?aud=*", 34 "rpc:sh.tangled.repo.forkSync?aud=*", 35 "rpc:sh.tangled.repo.forkStatus?aud=*", 36 "rpc:sh.tangled.repo.mergeCheck?aud=*", 37 "rpc:sh.tangled.pipeline.cancelPipeline?aud=*", 38 "rpc:sh.tangled.repo.addSecret?aud=*", 39 "rpc:sh.tangled.repo.removeSecret?aud=*", 40 "rpc:sh.tangled.repo.listSecrets?aud=*", 41]; 42 43const oAuthScopesString = oAuthScopes 44 .reduce((prev, curr) => `${prev} ${curr}`) 45 .trim(); 46 47export const __DEV__loopbackOAuthMetadata = { 48 client_id: `http://localhost?redirect_uri=${encodeURIComponent(__DEV__oAuthCallbackUrl)}&scope=${encodeURIComponent(oAuthScopesString)}`, 49 redirect_uris: [__DEV__oAuthCallbackUrl], 50 scope: oAuthScopesString, 51 token_endpoint_auth_method: "none", 52 response_types: ["code"], 53 grant_types: ["authorization_code", "refresh_token"], 54 application_type: "web", 55 dpop_bound_access_tokens: true, 56 subject_type: "public", 57 client_name: "Strand Localhost", 58}; 59 60export const DEFAULT_STALE_TIME = 5 * 60 * 1000; 61 62export const CONSTELLATION_URL = new URL( 63 "https://constellation.microcosm.blue/", 64); 65 66export const HANDLE_RESOLVER_URL = new URL("https://slingshot.microcosm.blue/"); 67 68export const SLINGSHOT_URL = new URL("https://slingshot.microcosm.blue/"); 69 70/** 71 * Default Bluesky client URL. Use the base route, e.g. https://catsky.social/ or https://bsky.app/ or https://witchsky.app/ 72 * Configurable by client in the future. 73 */ 74export const DEFAULT_BSKY_CLIENT_URL = new URL("https://catsky.social/"); 75 76/** 77 * Lodestone is a lightweight universal AT-URI resolver service. 78 * See more here: https://github.com/gemstone-systems/lodestone/ 79 */ 80export const LODESTONE_URL = new URL("https://lodestone.gmstn.systems/");