mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
## Problem If a repository is added **after** a search context (e.g., a new repository is synced from the code host), then it will never be added to the context even if it should be included. The workaround is to restart the instance. ## Solution This PR adds a call to re-sync all search contexts whenever a connection is successfully synced. This PR adds the `@sourcebot/shared` package that contains `syncSearchContexts.ts` (previously in web) and it's dependencies (namely the entitlements system). ## Why another package? Because the `syncSearchContexts` call is now called from: 1. `initialize.ts` in **web** - handles syncing search contexts on startup and whenever the config is modified in watch mode. This is the same as before. 2. `connectionManager.ts` in **backend** - syncs the search contexts whenever a connection is successfully synced. ## Follow-up devex work Two things: 1. We have several very thin shared packages (i.e., `crypto`, `error`, and `logger`) that we can probably fold into this "general" shared package. `schemas` and `db` _feels_ like they should remain separate (mostly because they are "code-gen" packages). 2. When running `yarn dev`, any changes made to the shared package will only get picked if you `ctrl+c` and restart the instance. Would be nice if we have watch mode work across package dependencies in the monorepo.
35 lines
No EOL
1.4 KiB
TypeScript
35 lines
No EOL
1.4 KiB
TypeScript
|
|
// @note: Order is important here.
|
|
export enum OnboardingSteps {
|
|
CreateOrg = 'create-org',
|
|
ConnectCodeHost = 'connect-code-host',
|
|
InviteTeam = 'invite-team',
|
|
Checkout = 'checkout',
|
|
Complete = 'complete',
|
|
}
|
|
|
|
export const ENTERPRISE_FEATURES = [
|
|
"All Team features",
|
|
"Dedicated Slack support channel",
|
|
"Single tenant deployment",
|
|
"Advanced security features",
|
|
]
|
|
|
|
export const TEAM_FEATURES = [
|
|
"Index thousands of repos from multiple code hosts (GitHub, GitLab, Gerrit, Gitea, etc.). Self-hosted code hosts supported.",
|
|
"Public and private repos supported.",
|
|
"Create shareable links to code snippets.",
|
|
"Built on-top of zoekt, Google's code search engine. Blazingly fast and powerful (regex, symbol) code search.",
|
|
]
|
|
|
|
export const MOBILE_UNSUPPORTED_SPLASH_SCREEN_DISMISSED_COOKIE_NAME = 'sb.mobile-unsupported-splash-screen-dismissed';
|
|
|
|
// NOTE: changing SOURCEBOT_GUEST_USER_ID may break backwards compatibility since this value is used
|
|
// to detect old guest users in the DB. If you change this value ensure it doesn't break upgrade flows
|
|
export const SOURCEBOT_GUEST_USER_ID = '1';
|
|
export const SOURCEBOT_GUEST_USER_EMAIL = 'guest@sourcebot.dev';
|
|
export const SINGLE_TENANT_ORG_ID = 1;
|
|
export const SINGLE_TENANT_ORG_DOMAIN = '~';
|
|
export const SINGLE_TENANT_ORG_NAME = 'default';
|
|
|
|
export { SOURCEBOT_SUPPORT_EMAIL } from "@sourcebot/shared/client"; |