formatferry 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22557,13 +22557,13 @@ Supported formats: ${VALID_FORMATS.join(", ")}
|
|
|
22557
22557
|
process.exit(1);
|
|
22558
22558
|
}
|
|
22559
22559
|
function readStdin() {
|
|
22560
|
-
return new Promise((
|
|
22560
|
+
return new Promise((resolve2, reject) => {
|
|
22561
22561
|
let data = "";
|
|
22562
22562
|
process.stdin.setEncoding("utf8");
|
|
22563
22563
|
process.stdin.on("data", (chunk) => {
|
|
22564
22564
|
data += chunk;
|
|
22565
22565
|
});
|
|
22566
|
-
process.stdin.on("end", () =>
|
|
22566
|
+
process.stdin.on("end", () => resolve2(data));
|
|
22567
22567
|
process.stdin.on("error", reject);
|
|
22568
22568
|
});
|
|
22569
22569
|
}
|
|
@@ -23101,7 +23101,24 @@ function handleLogout() {
|
|
|
23101
23101
|
}
|
|
23102
23102
|
|
|
23103
23103
|
// src/index.ts
|
|
23104
|
-
|
|
23104
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
23105
|
+
import { resolve, dirname as dirname3 } from "path";
|
|
23106
|
+
import { fileURLToPath } from "url";
|
|
23107
|
+
var getVersion = () => {
|
|
23108
|
+
if ("0.1.4") {
|
|
23109
|
+
return "0.1.4";
|
|
23110
|
+
}
|
|
23111
|
+
try {
|
|
23112
|
+
const __dirname = dirname3(fileURLToPath(import.meta.url));
|
|
23113
|
+
const packageJson = JSON.parse(
|
|
23114
|
+
readFileSync4(resolve(__dirname, "..", "package.json"), "utf-8")
|
|
23115
|
+
);
|
|
23116
|
+
return packageJson.version || "0.0.0";
|
|
23117
|
+
} catch {
|
|
23118
|
+
return "0.0.0";
|
|
23119
|
+
}
|
|
23120
|
+
};
|
|
23121
|
+
var VERSION = getVersion();
|
|
23105
23122
|
program.name("formatferry").version(VERSION).description("Convert HTML, DOCX, PDF, XLSX, CSV to Markdown").option("-i, --input <path>", "Input file path").option("-o, --output <path>", "Output file path").option("-f, --format <format>", "Markdown format (github, commonmark, slack, discord, reddit, confluence, custom, rmarkdown)", "github").option("--url <url>", "Fetch article from URL").option("--batch <glob>", "Batch convert files (Premium)").option("--output-dir <dir>", "Output directory for batch").option("--toonify", "Compress output to TOON format (Premium)").option("--offline", "Skip entitlement check (use cached or free tier)").option("--timeout <ms>", "License server timeout in milliseconds (default: 2000)", "2000").action(async (options) => {
|
|
23106
23123
|
if (options.batch) {
|
|
23107
23124
|
await batchCommand(options);
|
|
@@ -23109,7 +23126,9 @@ program.name("formatferry").version(VERSION).description("Convert HTML, DOCX, PD
|
|
|
23109
23126
|
await convertCommand(options);
|
|
23110
23127
|
}
|
|
23111
23128
|
});
|
|
23112
|
-
program.command("auth").description("Manage license key and API key authentication").option("--license-key <key>", "Activate a license key").option("--api-key <key>", "Activate an API key").option("--status", "Show current license status").option("--logout", "Remove stored license key").action(
|
|
23129
|
+
program.command("auth").description("Manage license key and API key authentication").option("--license-key <key>", "Activate a license key").option("--api-key <key>", "Activate an API key").option("--status", "Show current license status").option("--logout", "Remove stored license key").action(async (options) => {
|
|
23130
|
+
await authCommand(options);
|
|
23131
|
+
});
|
|
23113
23132
|
program.parse();
|
|
23114
23133
|
/*! Bundled license information:
|
|
23115
23134
|
|