Merge pull request #2 from FlatulentFowl/claude/replace-builtin-modules-RdH89

Claude/replace builtin modules rd h89
This commit is contained in:
Flatulent Fowl 2026-05-12 20:24:06 +02:00 committed by GitHub
commit e1f3803aea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 59 additions and 27 deletions

View file

@ -1,6 +1,55 @@
import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";
const builtins = [
"assert",
"async_hooks",
"buffer",
"child_process",
"cluster",
"console",
"constants",
"crypto",
"dgram",
"diagnostics_channel",
"dns",
"domain",
"events",
"fs",
"fs/promises",
"http",
"http2",
"https",
"inspector",
"module",
"net",
"os",
"path",
"perf_hooks",
"process",
"punycode",
"querystring",
"readline",
"repl",
"stream",
"stream/consumers",
"stream/promises",
"stream/web",
"string_decoder",
"sys",
"timers",
"timers/promises",
"tls",
"trace_events",
"tty",
"url",
"util",
"v8",
"vm",
"wasi",
"worker_threads",
"zlib",
];
const prod = process.argv[2] === "production";

View file

@ -3,7 +3,7 @@
"name": "DocDrop",
"version": "1.0.0",
"minAppVersion": "1.0.0",
"description": "Convert PDF files to Markdown using Microsofts markitdown CLI.",
"description": "Obsidian plugin: Convert PDF files to Markdown using Microsofts markitdown CLI.",
"author": "Rhys Gottwald",
"authorUrl": "",
"isDesktopOnly": true

14
package-lock.json generated
View file

@ -14,7 +14,6 @@
"devDependencies": {
"@types/node": "^22.0.0",
"@typescript-eslint/parser": "^8.59.1",
"builtin-modules": "^4.0.0",
"esbuild": "^0.25.5",
"eslint": "^9.39.4",
"eslint-plugin-obsidianmd": "^0.2.9",
@ -1410,19 +1409,6 @@
"node": "18 || 20 || >=22"
}
},
"node_modules/builtin-modules": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-4.0.0.tgz",
"integrity": "sha512-p1n8zyCkt1BVrKNFymOHjcDSAl7oq/gUvfgULv2EblgpPVQlQr9yHnWjg9IJ2MhfwPqiYqMMrr01OY7yQoK2yA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/call-bind": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz",

View file

@ -16,7 +16,6 @@
"devDependencies": {
"@types/node": "^22.0.0",
"@typescript-eslint/parser": "^8.59.1",
"builtin-modules": "^4.0.0",
"esbuild": "^0.25.5",
"eslint": "^9.39.4",
"eslint-plugin-obsidianmd": "^0.2.9",

View file

@ -225,14 +225,13 @@ class DocDropSettingTab extends PluginSettingTab {
.setName("markitdown-ocr plugin (optional)")
.setHeading();
containerEl.createEl("p", {
text:
new Setting(containerEl)
.setDesc(
"markitdown-ocr is a free, separately-installed plugin that uses an AI vision model (like " +
"OpenAI's GPT-4o) to read text from images inside PDFs — useful for scanned documents or " +
"PDFs that are just pictures of pages. Install it first with: pip install markitdown-ocr. " +
"You will need an OpenAI account (or a compatible service) to provide the AI.",
cls: "setting-item-description",
});
"You will need an OpenAI account (or a compatible service) to provide the AI."
);
new Setting(containerEl)
.setName("Enable markitdown-ocr")
@ -316,14 +315,13 @@ class DocDropSettingTab extends PluginSettingTab {
.setName("Azure Document Intelligence (optional)")
.setHeading();
containerEl.createEl("p", {
text:
new Setting(containerEl)
.setDesc(
"Document Intelligence is a paid Microsoft Azure cloud service that uses AI to read PDFs with " +
"much higher accuracy than offline conversion — especially for scanned documents, handwriting, " +
"tables, and complex layouts. Requires an Azure account. " +
"Leave these blank to use free offline conversion instead.",
cls: "setting-item-description",
});
"Leave these blank to use free offline conversion instead."
);
new Setting(containerEl)
// /skip -- "Document Intelligence" is a proper Microsoft product name