From bae85385630c6f6dbdb7f3244052e628d61b395c Mon Sep 17 00:00:00 2001 From: Umar Adilov <99314948+adilovcode@users.noreply.github.com> Date: Wed, 3 Dec 2025 19:28:48 +0500 Subject: [PATCH] Added some protection layers --- .opencode/plugin/file-protection.ts | 5 +++-- tsconfig.app.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.opencode/plugin/file-protection.ts b/.opencode/plugin/file-protection.ts index 86cccba..f511cd7 100644 --- a/.opencode/plugin/file-protection.ts +++ b/.opencode/plugin/file-protection.ts @@ -6,11 +6,12 @@ const uneditableFiles = [ ".env.local", ".env.development", ".env.production", - "src/lib/*.ts", + "**/src/lib/**.ts", "opencode.json", + "**/.opencode/**", ]; -export const FileProtectionPlugin: Plugin = async ({ client, $ }) => { +export const FileProtectionPlugin: Plugin = async () => { return { "tool.execute.before": async (input, output) => { if ( diff --git a/tsconfig.app.json b/tsconfig.app.json index 8f8c44f..7e4294d 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -24,5 +24,6 @@ "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true }, - "include": ["src"] + "include": ["src"], + "exclude": ["src/lib"] }