@obinexusltd/sqlite3-polycall
v1.0.0
Published
SQLite3 command/record adapter for libpolycall config validation.
Maintainers
Readme
sqlite3-polycall
@obinexusltd/sqlite3-polycall is the SQLite3 adapter for
libpolycall. It keeps the binding
thin: the package calls the local polycall.exe config validate command and
records the validation result in SQLite through the sqlite3 CLI.
The default local paths match this workspace:
- SQLite CLI:
C:\SQLite\sqlite3.exe - PolyCall CLI:
..\libpolycall\build\bin\polycall.exe - PolyCall config:
..\libpolycall\Polycallfile
Install
npm install @obinexusltd/sqlite3-polycallOr run with npx:
npx @obinexusltd/sqlite3-polycall --help
npm exec --package . -- sqlite3-polycall --help
npx .
npx @obinexusltd/sqlite3-polycall doctor
npx @obinexusltd/sqlite3-polycall validate ..\libpolycall\Polycallfile --db sqlite3-polycall.dbDuring local development, before the package exists on npmjs.org, run the same binary through the local package path:
npx . --help
npx file:. doctor
npm exec --package . -- sqlite3-polycall --help
npm run test:npx-localAfter publishing, these registry-backed forms are supported:
npx @obinexusltd/sqlite3-polycall --help
npm exec --package @obinexusltd/sqlite3-polycall -- sqlite3-polycall doctorThe npm package intentionally exposes a single bin command,
sqlite3-polycall, so scoped-package npx inference is deterministic on
Windows, macOS, and Linux.
JavaScript API
const {
recordValidation
} = require("@obinexusltd/sqlite3-polycall");
const result = recordValidation({
database: "sqlite3-polycall.db",
configPath: "../libpolycall/Polycallfile"
});
console.log(result.validation.status);SQLite schema
The adapter creates this table:
CREATE TABLE IF NOT EXISTS polycall_config_validation (
id INTEGER PRIMARY KEY AUTOINCREMENT,
config_path TEXT NOT NULL,
polycall_exe TEXT NOT NULL,
status_code INTEGER NOT NULL,
stdout TEXT NOT NULL,
stderr TEXT NOT NULL,
created_at TEXT NOT NULL DEFAULT (datetime('now'))
);Examples
node examples/run.js
C:\SQLite\sqlite3.exe example.db ".read examples/schema.sql"See examples/README.md.
Verification
npm test
npm pack --dry-run --jsonThe test suite verifies:
- npm metadata and source-directory indexing
C:\SQLite\sqlite3.exe..\libpolycall\build\bin\polycall.exepolycall.exe config validate ..\libpolycall\Polycallfile- npm
bincompatibility fornpx/npm exec
License
MIT © Nnamdi Michael Okpala
