(options: SyncEngineOptions)
| 231 | private conflictStore: ConflictStore; |
| 232 | |
| 233 | constructor(options: SyncEngineOptions) { |
| 234 | this.projectDir = options.projectDir; |
| 235 | this.contentDir = options.contentDir; |
| 236 | this.contentFilter = options.contentFilter; |
| 237 | this.contentRoot = options.contentRoot ?? ''; |
| 238 | this.pullIntervalSeconds = options.pullIntervalSeconds ?? 30; |
| 239 | this.pushIntervalSeconds = options.pushIntervalSeconds ?? 60; |
| 240 | this.syncEnabled = options.syncEnabled; |
| 241 | this.credentialArgs = options.credentialArgs ?? []; |
| 242 | this.cc1Broadcaster = options.cc1Broadcaster ?? null; |
| 243 | this.onStateChange = options.onStateChange; |
| 244 | this.onContentConflictsDetected = options.onContentConflictsDetected; |
| 245 | this.setBatchInProgress = options.setBatchInProgress; |
| 246 | this.onAutoDisable = options.onAutoDisable; |
| 247 | this.detectGh = options.detectGh; |
| 248 | this.ghTokenSource = createGhTokenSource(options.detectGh); |
| 249 | this.tokenStore = options.tokenStore; |
| 250 | this.checkPushPermissionFn = options.checkPushPermissionFn ?? defaultCheckPushPermission; |
| 251 | this.statePath = resolve(getLocalDir(this.projectDir), 'sync-state.json'); |
| 252 | this.conflictStore = new ConflictStore(this.projectDir, this.currentBranch); |
| 253 | } |
| 254 | |
| 255 | private gitHandle(gitIndexFile?: string): GitHandle { |
| 256 | return createGitInstance(this.projectDir, { |
nothing calls this directly
no test coverage detected