MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / seedUserData

Function seedUserData

tooling/scripts/perf-desktop-runtime.mjs:243–268  ·  view source on GitHub ↗
(userDataRoot, vaultRoot)

Source from the content-addressed store, hash-verified

241}
242
243async 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
270function appendBounded(buffer, chunk, maxLength = 20000) {
271 const next = `${buffer}${chunk}`

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected