Fix build/lint issues and support cross-repo dispatch trigger

This commit is contained in:
codecolorist
2026-04-14 11:40:15 +00:00
parent 0f0a3ab28e
commit 656ec39dc9
5 changed files with 11519 additions and 5 deletions
+13 -1
View File
@@ -22,6 +22,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Show dispatch context
if: github.event_name == 'repository_dispatch'
run: |
echo "Triggered by repository_dispatch"
echo "event_type=${{ github.event.action }}"
echo "source_repo=${{ github.event.client_payload.source_repo }}"
echo "source_sha=${{ github.event.client_payload.source_sha }}"
echo "source_ref=${{ github.event.client_payload.source_ref }}"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
@@ -67,7 +76,10 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
github.event_name == 'repository_dispatch'
steps:
- name: Deploy to GitHub Pages
+19 -1
View File
@@ -1 +1,19 @@
import rootConfig from "../../eslint.config.mjs";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const config = [
{
ignores: [".next/**", "out/**", "build/**", "dist/**", "next-env.d.ts"],
},
...compat.extends("next/core-web-vitals", "next/typescript"),
];
export default config;
+11485
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -5,7 +5,6 @@ import { useSearchParams } from "next/navigation";
import { useDebounce } from "use-debounce";
import Link from "next/link";
import { addBasePath } from "@/lib/env";
import { Input } from "@/components/ui/input";
import { Badge } from "@/components/ui/badge";
+2 -2
View File
@@ -22,8 +22,8 @@ let dbReady = false;
async function loadSQLite(): Promise<SQLite3API> {
if (sqlite3Module) return sqlite3Module;
const module = await import("@sqlite.org/sqlite-wasm");
sqlite3Module = module.default || module;
const sqliteModule = await import("@sqlite.org/sqlite-wasm");
sqlite3Module = (sqliteModule.default || sqliteModule) as unknown as SQLite3API;
return sqlite3Module;
}