Run oxfmt across repo, add format script and docs

Add .oxfmtignore to skip generated bindings and wasm-pack output.
Add npm format script, update DEVELOPMENT.md for Vite+ toolchain,
and format all non-generated files with oxfmt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-03-13 10:15:49 -07:00
parent 45262edfbd
commit b4a1c418bb
664 changed files with 13638 additions and 13492 deletions

View File

@@ -1,10 +1,10 @@
import { debounce } from '@yaakapp-internal/lib';
import type { AnyModel, ModelPayload } from '@yaakapp-internal/models';
import { watchWorkspaceFiles } from '@yaakapp-internal/sync';
import { syncWorkspace } from '../commands/commands';
import { activeWorkspaceIdAtom, activeWorkspaceMetaAtom } from '../hooks/useActiveWorkspace';
import { listenToTauriEvent } from '../hooks/useListenToTauriEvent';
import { jotaiStore } from '../lib/jotai';
import { debounce } from "@yaakapp-internal/lib";
import type { AnyModel, ModelPayload } from "@yaakapp-internal/models";
import { watchWorkspaceFiles } from "@yaakapp-internal/sync";
import { syncWorkspace } from "../commands/commands";
import { activeWorkspaceIdAtom, activeWorkspaceMetaAtom } from "../hooks/useActiveWorkspace";
import { listenToTauriEvent } from "../hooks/useListenToTauriEvent";
import { jotaiStore } from "../lib/jotai";
export function initSync() {
initModelListeners();
@@ -34,7 +34,7 @@ const debouncedSync = debounce(async () => {
* simply add long-lived subscribers for the lifetime of the app.
*/
function initModelListeners() {
listenToTauriEvent<ModelPayload>('model_write', (p) => {
listenToTauriEvent<ModelPayload>("model_write", (p) => {
if (isModelRelevant(p.payload.model)) debouncedSync();
});
}
@@ -63,16 +63,16 @@ function isModelRelevant(m: AnyModel) {
const workspaceId = jotaiStore.get(activeWorkspaceIdAtom);
if (
m.model !== 'workspace' &&
m.model !== 'folder' &&
m.model !== 'environment' &&
m.model !== 'http_request' &&
m.model !== 'grpc_request' &&
m.model !== 'websocket_request'
m.model !== "workspace" &&
m.model !== "folder" &&
m.model !== "environment" &&
m.model !== "http_request" &&
m.model !== "grpc_request" &&
m.model !== "websocket_request"
) {
return false;
}
if (m.model === 'workspace') {
if (m.model === "workspace") {
return m.id === workspaceId;
}
return m.workspaceId === workspaceId;