| 241 | } |
| 242 | |
| 243 | async function seedUserData(userDataRoot, vaultRoot) { |
| 244 | await mkdir(userDataRoot, { recursive: true }) |
| 245 | await writeFile( |
| 246 | join(userDataRoot, 'zennotes.config.json'), |
| 247 | `${JSON.stringify( |
| 248 | { |
| 249 | workspaceMode: 'local', |
| 250 | vaultRoot, |
| 251 | remoteWorkspace: null, |
| 252 | remoteWorkspaceProfileId: null, |
| 253 | remoteWorkspaceProfiles: [], |
| 254 | windowState: { |
| 255 | x: 80, |
| 256 | y: 80, |
| 257 | width: 1280, |
| 258 | height: 820, |
| 259 | isMaximized: false |
| 260 | }, |
| 261 | zoomFactor: 1, |
| 262 | quickCaptureHotkey: '' |
| 263 | }, |
| 264 | null, |
| 265 | 2 |
| 266 | )}\n` |
| 267 | ) |
| 268 | } |
| 269 | |
| 270 | function appendBounded(buffer, chunk, maxLength = 20000) { |
| 271 | const next = `${buffer}${chunk}` |