-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathconstants.ts
More file actions
53 lines (46 loc) · 1.9 KB
/
constants.ts
File metadata and controls
53 lines (46 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { CodeHostType } from "@sourcebot/db";
import { ConfigSettings, IdentityProviderType } from "./types.js";
export const SOURCEBOT_SUPPORT_EMAIL = 'team@sourcebot.dev';
/**
* @deprecated Use API_KEY_PREFIX instead.
*/
export const LEGACY_API_KEY_PREFIX = 'sourcebot-';
export const API_KEY_PREFIX = 'sbk_';
export const OAUTH_ACCESS_TOKEN_PREFIX = 'sboa_';
export const OAUTH_REFRESH_TOKEN_PREFIX = 'sbor_';
export const SOURCEBOT_UNLIMITED_SEATS = -1;
/**
* Default settings.
*/
export const DEFAULT_CONFIG_SETTINGS: ConfigSettings = {
maxFileSize: 2 * 1024 * 1024, // 2MB in bytes
maxTrigramCount: 20000,
reindexIntervalMs: 1000 * 60 * 60, // 1 hour
resyncConnectionIntervalMs: 1000 * 60 * 60 * 24, // 24 hours
resyncConnectionPollingIntervalMs: 1000 * 1, // 1 second
reindexRepoPollingIntervalMs: 1000 * 1, // 1 second
maxConnectionSyncJobConcurrency: 8,
maxRepoIndexingJobConcurrency: 8,
maxRepoGarbageCollectionJobConcurrency: 8,
repoGarbageCollectionGracePeriodMs: 10 * 1000, // 10 seconds
repoIndexTimeoutMs: 1000 * 60 * 60 * 2, // 2 hours
enablePublicAccess: false, // deprecated, use FORCE_ENABLE_ANONYMOUS_ACCESS instead
repoDrivenPermissionSyncIntervalMs: 1000 * 60 * 60 * 24, // 24 hours
userDrivenPermissionSyncIntervalMs: 1000 * 60 * 60 * 24, // 24 hours
experiment_repoDrivenPermissionSyncIntervalMs: 1000 * 60 * 60 * 24, // 24 hours (deprecated)
experiment_userDrivenPermissionSyncIntervalMs: 1000 * 60 * 60 * 24, // 24 hours (deprecated)
maxAccountPermissionSyncJobConcurrency: 8,
maxRepoPermissionSyncJobConcurrency: 8,
}
export const PERMISSION_SYNC_SUPPORTED_CODE_HOST_TYPES: CodeHostType[] = [
'github',
'gitlab',
'bitbucketCloud',
'bitbucketServer',
];
export const PERMISSION_SYNC_SUPPORTED_IDENTITY_PROVIDERS: IdentityProviderType[] = [
'github',
'gitlab',
'bitbucket-cloud',
'bitbucket-server',
];