Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
1.3 kB ยท 32 lines
TypeScript
123456789101112131415161718192021222324252627282930313233// Writes slack-manifest.dev.json (gitignored) for the local `openstatus-dev`// app: the production manifest renamed, with every api.openstatus.dev URL// pointed at your tunnel. The tunnel origin comes from SLACK_REDIRECT_URI in// .env, so the manifest and the OAuth callback the server sends can't disagree.// Also prints it, so it can be piped straight to the clipboard.//// pnpm slack:manifest:dev | pbcopy # then App Manifest โ JSON โ pasteimport manifest from "../slack-manifest.json" with { type: "json" };
const PROD_ORIGIN = "https://api.openstatus.dev";const DEV_NAME = "openstatus-dev";
const redirectUri = Deno.env.get("SLACK_REDIRECT_URI");if (!redirectUri) { console.error( "SLACK_REDIRECT_URI is not set โ add https://<tunnel>/slack/oauth/callback to apps/server/.env", ); Deno.exit(1);}const devOrigin = new URL(redirectUri).origin;
const dev = structuredClone(manifest);dev.display_information.name = DEV_NAME;dev.features.bot_user.display_name = DEV_NAME;dev.oauth_config.redirect_urls = [redirectUri];
const output = `${JSON.stringify(dev, null, 2).replaceAll(PROD_ORIGIN, devOrigin)}\n`;await Deno.writeTextFile( new URL("../slack-manifest.dev.json", import.meta.url), output,);console.log(output);