Skip to content

Develop - #18

Merged
ShadowDara merged 64 commits into
mainfrom
develop
Sep 15, 2026
Merged

ShadowDara merged 64 commits into
mainfrom
develop

Conversation

@ShadowDara

Copy link
Copy Markdown
Owner

📌 Summary

Describe the change in a few sentences

🔍 Related Issue

Closes #

🛠 Proposed Changes

  • Change 1
  • Change 2
  • ...

🧪 Testing

📸 Screenshots (if applicable)

✅ Checklist

  • PR title is descriptive
  • Changes are tested
  • Updates to documentation (if applicable)
  • No unrelated changes

ShadowDara and others added 30 commits September 13, 2026 22:31
Use execFileSync for safer git command execution and wrap generated changelog output in a collapsible details block. This avoids shell quoting issues, keeps the output cleaner, and makes recent commit history easier to read in the generated changelog.
Refreshes the repo's GitHub issue and PR templates to cover bug reports, feature requests, and new Finder templates with clearer validation guidance. It also adds a dedicated template issue form, updates the language metadata in .gitattributes, and extends the Windows build script to compile and report the CSF binary.
Add a new CLI command 'validate' (alias 'val') to validate a single Finder template by path or by template name. Implements Validate(args []string) which loads a file or resolves built-in/custom templates, runs JSON5 preprocessing when needed, unmarshals into the template structure, validates the schema, prints a tabular result with warnings for JSON5-only templates, and exits non-zero on failures. Update README, npm site docs, and CUSTOM_TEMPLATES.md to document the new command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This change hardens template validation by parsing templates manually, checking file validation rules, and surfacing template-specific errors without aborting the whole check. It also adds JSON output support to `finder validate` while preserving non-zero exit codes for failed validations. The Jaeger template metadata was fixed to use a proper `tags` array instead of a single string.
This change adds build-time Liquid page support to the SSG plugin, including render-time data loading and JS injection for static HTML pages. It also adds a lightweight install script, updates the docs for template validation, and fixes template tag metadata to ensure tag arrays are valid JSON5-compatible structures.
Introduce a removeConsole option to pages-ssg-plugin to strip console.* calls from production builds (uses esbuild.drop). Refactor config() to conditionally merge esbuild and build settings (preserving singleBundle behavior). Enable removeConsole in npm/site/vite.config.ts. Add a simple Jekyll header (pages/jekyll/header.html). Update generated npm/site/data/backend.json (timestamps and size stats).
Make markdown rendering async and resilient: renderMarkdown now returns early for non-markdown, dynamically loads chunked markdown via page.load() when available, and injects the loaded HTML. main.ts now awaits renderMarkdown. Vite config enables splitMarkdown so markdown is emitted as separate JS chunks. Regenerated backend.json with updated asset list and file size/stats.
This commit reorganizes the install test Dockerfiles, adds Liquid template root support and minification to the site SSG pipeline, and updates the Jekyll page templates to use the shared header include. It also removes the generated install script from the published site assets and refreshes the generated backend metadata to match the new build output.
Move large generated page payloads out of the main bundle and load them via virtual imports when a page is opened. Liquid pages are treated as static and skipped in the client-side pages map, while page modules support an optional `loadData()` hook. This reduces bundle size and keeps the page API stable. A root `stats` script was also added for bundle analysis.
This change adds EJS page rendering support alongside Liquid in the site SSG plugin and updates the template root to src/templates. It also introduces a new npm/vfs package with an in-memory filesystem API, ZIP import/export, persistence helpers, and TypeScript build configuration.

The site fixtures were updated to include an EJS example page and move Jekyll test assets under the test folder, while .gitignore was adjusted for the new package artifacts.
Update pages-ssg-plugin to treat EJS pages like liquid pages (skip creating a client entry) and emit the already-rendered page.html as a build asset, optionally minifying it. Minor code/comment cleanup around script emission logic. Also update generated backend.json (timestamps and file size/statistics adjustments, including test/ejs/index.html byte count).
Add new generator tool pages (line_formatter, line_extender, picture-mode-maker) with HTML, scripts and styles; introduce client components (extend, format, main, settings) and CSS. Add ejs type declaration and @types/ejs dependency (package.json, dependencies.txt, pnpm-lock.yaml). Update pages-ssg-plugin: loosen .build exclusion regex, cast EJS data to any, and treat Liquid/EJS scriptSource as a component entry. Regenerate backend.json to include new assets.
Raise the project version to 0.3.18 across the codebase (check.py, internal/finderversion/version.go, npm packages and root package.json). Add Author and Authors fields to the Folder struct and initialize them in NewFolder. Add a TypeScript v0_3_18 namespace in finder-lib including author/authors and related template types. Prepares repository for the 0.3.18 release and adds template author metadata support.
This change prevents *.build.* modules from being treated as client pages or injected script sources, avoiding accidental bundling in Liquid/EJS pages. It also adds the lucide dependency and refreshes generated site metadata and dependency snapshots.
Introduce pub/filepkg: a small library to manage single files by URL with a Lockfile. Provides Manager, File and Lockfile types plus operations: Add, Remove, Install, Sync, Pull, Check, Verify, Diff and IsLocked. Implements HTTP downloads, SHA-256 verification, atomic lockfile writes and path validation. Adds unit tests covering download, hash verification, sync/pull, diff, check and error cases. Files added: download.go, filepkg.go, manage.go, filepkg_test.go.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds `finder install`, `list-installed`, and `uninstall` commands to fetch and manage templates from URLs or the built-in registry. Installed templates are stored under `~/.finder/installed/templates/`, loaded recursively with path-aware names, and included in template discovery and listing while keeping custom templates separated. This also updates template validation output, adds a web test fixture, and refreshes related dependency/package metadata.
Validate() now uses the full template lookup name (instead of filepath.Base) and strips a trailing .json5 so installed templates with subpaths (e.g. localhost_8765/test/template) are resolved correctly. LoadAll() was extended to include templates installed via `finder install`, with deduplication against existing builtin/user templates to avoid duplicates.
Adds support for template aliases stored in ~/.finder/aliases.json, including add/remove/list commands and alias resolution during template lookup and validation. This makes shorthand names work for installed templates while keeping `finder alias`, `finder unalias`, and `finder aliases` available. Also removes obsolete registry and test template fixtures.
Enhance check.py to count and report templates missing the "description" field (adds nodesc counter and a dedicated validation loop). Update several template files (internal/templates and templates): cmake, flax, go, and steamlib now include descriptive "description" fields and appropriate "tags"; steamlib.json5 also received minor JSON formatting adjustments.
This change adds a lightweight static template registry behind nginx for serving Finder template JSON5 files over HTTP. It wires a new `registry` service into docker-compose, adds a Dockerfile and nginx configuration to expose only JSON5 templates, and includes documentation plus a sample registry entry to demonstrate usage.
Update Dockerfiles to use pnpm workspace builds and enable corepack for better caching and consistent installs. static-site and template-site now copy workspace manifest and package.jsons, run pnpm install --frozen-lockfile, and run filtered pnpm build tasks; outputs copied from npm/site/dist. uploadpage uses pnpx for prisma generate and pnpm run build. Add yaml dependency to npm/hub package.json and update pnpm lock entries. Add an (initial) template-hub.config.yaml file. These changes standardize builds on pnpm and improve Docker layer caching.
Adjust docker-compose and Dockerfiles so images build reliably: set uploadpage build context to repo root and use docker/uploadpage/Dockerfile; disable package postinstall scripts in static/template images (pnpm install --ignore-scripts) to avoid prisma generate where schema is absent; make uploadpage Dockerfile handle pnpm workspace files and copy hub prisma schema into a temporary prisma dir so postinstall can run, switch prisma generate and build to pnpm --filter my-project invocations, and update runtime COPY paths to use npm/hub output. These changes prevent build-time prisma failures and fix workspace handling.
ShadowDara and others added 26 commits September 15, 2026 01:44
This change syncs the repository AGENTS guide with the site copy, adds frontend dependencies for image handling, Comlink, ky, and the i18next Vite loader, and updates the Vite config and lockfile to match those additions.
This updates the site package to include Vitest for test execution and Zod for schema validation. The lockfile was refreshed to include the new direct dependencies and their transitive packages needed by the workspace.
Precompile and cache regex patterns before directory scans to speed template matching, and add regression tests covering exact, glob, and regex behavior. Also update the changelog and Finder docs for installed templates, template validation, and author/authors metadata, and refresh generated frontend/site assets and dependency metadata.
Adds three experimental sample projects under .github/temp-stuff-idk:

- fling-compiler: TypeScript source-to-source compiler (CLI, transform, emitter, diagnostics, example, tsconfig, package.json)
- mini-vapor: small template compiler + runtime producing imperative DOM-updates (source, bundle script, demo HTML)
- sqlite-viewer-go: Go-based SQLite viewer with embedded web frontend (server, web assets, README)

Also updates pnpm workspace/lock metadata and adjusts .obsidian workspace state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a temporary farbtext package under .github/temp-stuff-idk (package.json, src/index.ts and tests). Mark the temp folder as vendored in .gitattributes and ignore its node_modules in .gitignore. Apply formatting/structural fixes in fling-compiler/src/toFling.ts (styling, trailing commas, multi-line objects). Change embed directive in cmd/findergen/main.go to 'all:frontend' and update pnpm-lock.yaml with the new farbtext deps / TypeScript 7 entries. Also include minor .obsidian workspace noise changes.
Add two Go utilities under .github/temp-stuff-idk: checkstaticfiles and csf.generate.

- checkstaticfiles: Go module (github.com/shadowdara/checkstaticfiles) with core/decode.go to unpack gzipped/base64-encoded static files at runtime, Checkfiles API, config, README, CHANGELOG, LICENSE, test app and sample assets. Supports a contentmode/settings bitmask for content checks.
- csf.generate: generator that reads checkstaticfiles.config.yaml, encodes files to base64, writes compressed gzip byte array into a Go source file, plus helper file_creator and go.mod/go.sum.

Also add .gitignore and .gitattributes for both projects and sample test files.
This change relocates the checkstaticfiles project under pub/checkstaticfiles, updates the Go package name to checkstaticfiles, and fixes the import path to the finder module. It also keeps the existing functionality intact while cleaning up minor formatting in the check function.
Finder now accepts .json and .jsonc template files in addition to .json5. This updates template detection, trimming, install/validate paths, and loader precedence so duplicate names resolve as jsonc > json > json5. The docs and tests were updated to reflect the new extension support and priority rules.
Adds a Monaco-based JSON editor to the site with a split-pane layout, live preview sync, sample/load controls, and copy-to-clipboard support. This also wires Monaco into the Vite config and updates the dependency metadata and lockfile for the new editor package.
Add and refine CLI features and documentation across the codebase: implement aliases, banner and expanded command tree; improve Search/TagSearch/Check/Validate/List flows and output formats (normal/json/clear); enhance install/uninstall logic for installed templates and lockfile handling; add helper utilities (fsd, binary search, checksum/size checks) and more robust Files/Folder structures (JSON5/JSON/JSONC support). Also update site metadata, .gitignore and postbuild script. Mostly documentation, refactors and small logic improvements to improve UX and cross-platform behavior.
Introduce a local js-to-fling compiler package (.github/temp-stuff-idk/fling-compiler): add .npmignore, src/index.ts, and enable declaration + exports in package.json/tsconfig. Wire the new package into the site (npm/site): add dependency, include in public/dependencies, update pnpm-lock and pnpm-workspace, and use jsToFling in the Monaco page to transpile editor input to Fling. Also update @types/node specifier and adjust a few workspace last-open entries. These changes expose a browser+Node-compatible entry and integrate the compiler into the site editor.
Upgrade js-to-fling from 0.1.0 → 0.1.1 across the repo (fling-compiler package.json, npm/site package.json, dependencies.txt, pnpm-lock.yaml, pnpm-workspace). Temporarily disable the fling-compiler CLI by commenting out src/cli.ts. Refresh generated site metadata and workspace snapshots (npm/site/data/backend.json, gh-pages.json) and update .obsidian/workspace.json entries. Updates include lockfile integrity, dependency specifier, and generatedAt/statistics adjustments.
Switch Monaco editor and badge from JSON to TypeScript for correct highlighting. Improve 404 error page to render Error.message and stack trace (or stringified error) for better diagnostics. Add a Vite define for process.env.NODE_ENV so libraries expecting that variable behave correctly in production vs development builds.
Relocate the fling-compiler package from .github/temp-stuff-idk/ into npm/fling-compiler/, add a proper CLI entry (src/cli.ts), and bump the package version 0.1.1 → 0.1.2. Update the site to depend on js-to-fling@^0.1.2 and replace the Monaco default sample with the expanded examples/example1.ts content. Keeps files, examples, and tsconfig moved under the new npm/ location.
Add TextMate-based syntax highlighting to the Monaco playground by wiring Oniguruma and Shiki language grammars into the editor. This enables richer highlighting for common languages such as TypeScript, JavaScript, JSON, and others while keeping a safe fallback if grammar setup fails.
Adds a VS Code extension for .fling files with TextMate grammar and language configuration, plus Monaco integration for the site so the language is highlighted in the browser. This also updates static grammar packaging, ignores local extension build artifacts, and refreshes workspace/dependency metadata for the new tooling.
Define a new "dark-modern" Monaco theme and apply it to both editors; update UI badges ("TypeScript / Javascript", "Fling Output Read Only"); run initial JS→Fling translation on startup. Add assets/onigasm.wasm and update asset sizes/counts and generatedAt timestamps in backend.json and gh-pages.json. Remove the obsolete npm/site/data/fling.tmLanguage.json file.
Add changelog and README notes explaining that Finder supports .json, .jsonc, and .json5 template files. The README also documents the upcoming warning for .json5-based templates.
Introduce a separate name_regex field (Go RE2) across schema, structures, templates and UI. Update search logic to treat name as exact-or-glob and apply name_regex as an additional anchored regex (matchesNamePattern / matchesRegex / matchFolderPattern). Precompilation, caching and matching helpers updated; file/folder matching and tests adjusted. Docs and site content updated (README, AGENTS.md, site docs) and min_version bumped to 0.3.18. UI, types and syntax highlighting updated; add test_name_regex template.
return
}

rows, err := a.db.Query(`PRAGMA table_info(` + quoteIdentifier(tableName) + `)`)

var total int
countSQL := `SELECT count(*) FROM ` + quoteIdentifier(tableName)
if err := a.db.QueryRow(countSQL).Scan(&total); err != nil {
dataSQL := `SELECT * FROM ` + quoteIdentifier(tableName) +
` LIMIT ? OFFSET ?`

rows, err := a.db.Query(dataSQL, pageSize, offset)

// Query supports SELECT/PRAGMA/EXPLAIN and, in write mode, statements
// whose result is still returned as a message.
rows, err := a.db.Query(sqlText)
if (mimeType.startsWith("image/")) {
const base64 = fs.readFileSync(filePath).toString("base64");
const url = `data:${mimeType};base64,${base64}`;
return `<img src="${url}" alt="${escapeHtml(asset.slug)}" style="max-width:100%;">`;
Comment on lines +773 to +775
: `loadData: () => import(${JSON.stringify(
DATA_PREFIX + page.id,
)}).then((m) => m.default),`;
}
const guardCode = guardLines.length ? guardLines.join(' ') + ' ' : '';
lines.push(
`h_on(${varName}, ${JSON.stringify(dir.event)}, function ($event) { ${guardCode}with (${ctxVar}) { (${invocation}); } });`
Comment on lines +105 to +107
`h_effect(() => { with (${ctxVar}) { h_setAttr(${varName}, ${JSON.stringify(
dir.name
)}, (${dir.expr})); } });`
.map((p) => (p.type === 'static' ? JSON.stringify(p.value) : `(${p.value})`))
.join(' + ');
lines.push(
`h_effect(() => { with (${ctxVar}) { h_setText(${varName}, ${exprCode}); } });`
}
const guardCode = guardLines.length ? guardLines.join(' ') + ' ' : '';
lines.push(
`h_on(${varName}, ${JSON.stringify(dir.event)}, function ($event) { ${guardCode}with (${ctxVar}) { (${invocation}); } });`
Comment on lines +567 to +569
`h_effect(() => { with (${ctxVar}) { h_setAttr(${varName}, ${JSON.stringify(
dir.name
)}, (${dir.expr})); } });`
.map((p) => (p.type === 'static' ? JSON.stringify(p.value) : `(${p.value})`))
.join(' + ');
lines.push(
`h_effect(() => { with (${ctxVar}) { h_setText(${varName}, ${exprCode}); } });`
@ShadowDara
ShadowDara merged commit 3a53653 into main Sep 15, 2026
7 of 8 checks passed
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