Skip to main content

VS Code Extension (Dev)

Build the Subscriberbot VS Code extension from source.

Repository

git clone https://github.com/algoshred/subscriberbot-code-extension.git
cd subscriberbot-code-extension

Development

bun install
bun run lint # eslint, zero warnings
bun run typecheck # tsc --noEmit
bun run compile # tsc -> out/ (test harness)
bun run build # webpack (extension host + webview UI)
bun run compile:test
bun run test # @vscode/test-electron (needs a display / xvfb)
bun run test:smoke # force extension-host tests (CI-style)
bun run smoke # production build + artifact smoke check
bun run package # vsce package -> .vsix
bun run sanity # all of the above

The build is dual-target webpack: the extension host bundle (dist/extension.js, Node) and the webview UI bundles (webview-ui/dist/*.js, browser).

Running tests

Extension-host tests need a display. On Linux without a display, run them under Xvfb:

xvfb-run -a env SUBSCRIBERBOT_FORCE_EXTENSION_TESTS=true bun run test:extension-host

Mock-based unit tests cover all backend GraphQL calls using sinon to stub axios.

Installation from source

bun install
bun run build
bun run package

Then install the generated .vsix via VS Code → Extensions → ...Install from VSIX....

Release

Tag pushes (v*) build + test + package a VSIX and attach it to a GitHub Release — they never auto-publish. Marketplace / OpenVSX publishing is a deliberate, human-gated workflow_dispatch with the relevant PAT secret. See RELEASE.md.

Environment selection

The extension targets production by default. To use local or alpha Burdenoff infrastructure, set the environment variable before launching VS Code:

# Alpha
BURDENOFF_ENV=alpha code

# Local dev
BURDENOFF_ENV=local code
EnvironmentWorkspace gatewayGlobal gatewayWeb app
prod (default)https://graphqlworkspaces.burdenoff.com/workspaces/graphqlhttps://graphql.burdenoff.com/global/graphqlhttps://app.subscriberbot.com
alphahttps://alphagraphqlworkspaces.burdenoff.com/workspaces/graphqlhttps://alphagraphql.burdenoff.com/global/graphqlhttps://alphaapp.subscriberbot.com
localhttp://127.0.0.1:4003/workspaces/graphqlhttp://127.0.0.1:4000/global/graphqlhttps://app.local.subscriberbot.com

Endpoints are resolved in a single helper (src/env.ts). You can still override individual values through VS Code settings if needed.