add napi binding package for GitHub Packages publishing
Move the napi bridge from fire-pdf into pdf-inspector as `napi/`. Package name: @firecrawl/pdf-inspector-js, published to GitHub Packages (npm.pkg.github.com) as a public package on v* tags. Exposes two functions: - classifyPdf(buffer) → type, page count, pages needing OCR - extractTextInRegions(buffer, pageRegions) → per-region text with needsOcr quality flag (GID fonts, garbage, encoding issues) Includes publish workflow that builds linux-x64-gnu + darwin-arm64 binaries and publishes main + platform-specific packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
7d0e0b295b
commit
87d2bae0d9
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@firecrawl/pdf-inspector-js",
|
||||
"version": "0.2.0",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/firecrawl/pdf-inspector"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com",
|
||||
"access": "public"
|
||||
},
|
||||
"napi": {
|
||||
"binaryName": "pdf-inspector",
|
||||
"targets": [
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"aarch64-apple-darwin"
|
||||
],
|
||||
"package": {
|
||||
"name": "@firecrawl/pdf-inspector-js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "napi build --platform --release",
|
||||
"build:debug": "napi build --platform",
|
||||
"prepublishOnly": "napi prepublish -t npm",
|
||||
"artifacts": "napi artifacts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^3.4.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user