Skip to content

Conversation

@dswbx
Copy link
Contributor

@dswbx dswbx commented Jul 8, 2025

This PR adds a plugin that writes down diff entries to disk. Addresses #201

// bknd.config.ts
import type { BkndConfig } from "bknd";
import { writeFile } from "node:fs/promises";

export default {
  options: {
     plugins: [
        syncDiffs({
           enabled: true,
           write: async (name, diffs) => {
              await writeFile(`.diffs/${name}`, JSON.stringify(diffs, null, 2));
           },
        }),
     ],
  }
} as const satisfies BkndConfig;

Todo:

  • write down diffs on configuration changes
  • potentially adding a timestamp to the config to compare against
  • stress test
  • add a migration command to apply diffs

dswbx added 17 commits June 21, 2025 13:35
# Conflicts:
#	app/build.ts
#	app/package.json
#	app/src/App.ts
#	app/src/adapter/cloudflare/storage/StorageR2Adapter.ts
#	app/src/auth/authenticate/Authenticator.ts
#	app/src/auth/authenticate/strategies/PasswordStrategy.ts
#	app/src/data/entities/Entity.ts
#	app/src/data/fields/DateField.ts
#	app/src/data/server/query.ts
#	app/src/flows/flows/triggers/EventTrigger.ts
#	app/src/flows/tasks/presets/LogTask.ts
#	app/src/media/AppMedia.ts
#	app/src/modules/server/AppServer.ts
#	app/src/modules/server/SystemController.ts
#	app/vite.dev.ts
#	bun.lock
@dswbx dswbx changed the base branch from main to release/0.16 July 8, 2025 07:58
Base automatically changed from release/0.16 to main August 1, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants