mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
fix(db): fast-fail Indexer::init on non-SQLite files via magic-header preflight
This commit is contained in:
parent
946cb6a9bc
commit
8abb023dd0
11 changed files with 648 additions and 17 deletions
9
tests/dynamic_fixtures/lang_detect/build.gradle.kts
Normal file
9
tests/dynamic_fixtures/lang_detect/build.gradle.kts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Kotlin build script — `.kts` extension. JVM family; spec layer treats as Java.
|
||||
plugins {
|
||||
java
|
||||
application
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("com.example.Main")
|
||||
}
|
||||
4
tests/dynamic_fixtures/lang_detect/cli_node
Normal file
4
tests/dynamic_fixtures/lang_detect/cli_node
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env node
|
||||
// Extensionless CLI entry point. Shebang identifies the interpreter.
|
||||
const url = process.argv[2];
|
||||
require("child_process").execSync("curl " + url);
|
||||
10
tests/dynamic_fixtures/lang_detect/cli_python
Normal file
10
tests/dynamic_fixtures/lang_detect/cli_python
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
# Extensionless CLI entry point. Shebang-only language identification.
|
||||
import os
|
||||
import sys
|
||||
|
||||
def handle_request(payload: str) -> None:
|
||||
os.system("echo " + payload)
|
||||
|
||||
if __name__ == "__main__":
|
||||
handle_request(sys.argv[1])
|
||||
8
tests/dynamic_fixtures/lang_detect/module.cjs
Normal file
8
tests/dynamic_fixtures/lang_detect/module.cjs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// CommonJS module — `.cjs` extension. Identifies as JavaScript.
|
||||
const { exec } = require("child_process");
|
||||
|
||||
function runCommand(payload) {
|
||||
exec("ls " + payload);
|
||||
}
|
||||
|
||||
module.exports = { runCommand };
|
||||
3
tests/dynamic_fixtures/lang_detect/script.pyi
Normal file
3
tests/dynamic_fixtures/lang_detect/script.pyi
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from typing import Optional
|
||||
|
||||
def handle_request(payload: str) -> Optional[str]: ...
|
||||
Loading…
Add table
Add a link
Reference in a new issue