sourcebot/packages/shared
Brendan Kellam 8bc4f1e520
Some checks are pending
Publish to ghcr / build (linux/amd64, blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Publish to ghcr / build (linux/arm64, blacksmith-8vcpu-ubuntu-2204-arm) (push) Waiting to run
Publish to ghcr / merge (push) Blocked by required conditions
Update Roadmap Released / update (push) Waiting to run
feat(worker): Add ALWAYS_INDEX_FILE_PATTERNS env var to specify files that should always be indexed (#631)
2025-11-25 23:38:30 -08:00
..
src feat(worker): Add ALWAYS_INDEX_FILE_PATTERNS env var to specify files that should always be indexed (#631) 2025-11-25 23:38:30 -08:00
tools feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
.gitignore fix(search-contexts): Fix issue where a repository would not appear in a search context if it was created after the search context was created (#354) 2025-06-17 14:04:25 -07:00
package.json feat(web,worker): Environment overrides (#597) 2025-11-04 21:22:31 -08:00
README.md chore: Misc typos (UI, docs, code...), Makefile PATH with spaces (#369) 2025-07-16 11:59:01 -07:00
tsconfig.json fix(search-contexts): Fix issue where a repository would not appear in a search context if it was created after the search context was created (#354) 2025-06-17 14:04:25 -07:00

This package contains shared code between the backend & webapp packages.

Why two index files?

This package contains two index files: index.server.ts and index.client.ts. There is some code in this package that will only work in a Node.JS runtime (e.g., because it depends on the fs package. Entitlements are a good example of this), and other code that is runtime agnostic (e.g., constants.ts). To deal with this, we these two index files export server code and client code, respectively.

For package consumers, the usage would look like the following:

  • Server: import { ... } from @sourcebot/shared
  • Client: import { ... } from @sourcebot/shared/client