aiex-cli 0.0.4-beta.4 → 0.0.4-beta.5
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/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as formatDoctorDiagnosticsJson, C as seedConfig, D as version, E as package_default, S as createConfig, T as name, _ as DEFAULT_MINERU_CONFIG, a as parseJsonSchema, b as PLACEHOLDER_TEXT, c as recognizeImageText, d as t, f as getDefaultAIConfig, g as DEFAULT_MARKITDOWN_CONFIG, h as DEFAULT_MARKER_CONFIG, i as JsonSchemaDefinitionSchema, k as doctorDiagnosticsTableRows, l as shouldUseImageOcrFallback, m as writeAIConfig, n as createMigrationConfig, o as toSnakeCase, p as readAIConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics, u as initI18n, v as DEFAULT_PROMPT_CONFIG, w as description, x as AIConfigSchema, y as PLACEHOLDER_SCHEMA } from "./doctor-collector-
|
|
1
|
+
import { A as formatDoctorDiagnosticsJson, C as seedConfig, D as version, E as package_default, S as createConfig, T as name, _ as DEFAULT_MINERU_CONFIG, a as parseJsonSchema, b as PLACEHOLDER_TEXT, c as recognizeImageText, d as t, f as getDefaultAIConfig, g as DEFAULT_MARKITDOWN_CONFIG, h as DEFAULT_MARKER_CONFIG, i as JsonSchemaDefinitionSchema, k as doctorDiagnosticsTableRows, l as shouldUseImageOcrFallback, m as writeAIConfig, n as createMigrationConfig, o as toSnakeCase, p as readAIConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics, u as initI18n, v as DEFAULT_PROMPT_CONFIG, w as description, x as AIConfigSchema, y as PLACEHOLDER_SCHEMA } from "./doctor-collector-BtEPFDoa.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import os from "node:os";
|
|
@@ -12,7 +12,7 @@ import { consola } from "consola";
|
|
|
12
12
|
import updateNotifier from "update-notifier";
|
|
13
13
|
import CliTable3 from "cli-table3";
|
|
14
14
|
import fs$1 from "node:fs";
|
|
15
|
-
import { intro, isCancel, outro, select, spinner, text } from "@clack/prompts";
|
|
15
|
+
import { confirm, intro, isCancel, outro, select, spinner, text } from "@clack/prompts";
|
|
16
16
|
import Database from "better-sqlite3";
|
|
17
17
|
import pc from "picocolors";
|
|
18
18
|
import { Buffer } from "node:buffer";
|
|
@@ -15144,6 +15144,15 @@ async function runInteractive(aiexDir, config, aiConfig, modelOverride) {
|
|
|
15144
15144
|
cancel(t("common.cancelled"));
|
|
15145
15145
|
return false;
|
|
15146
15146
|
}
|
|
15147
|
+
const fp = filePathStr;
|
|
15148
|
+
const force = await confirm({
|
|
15149
|
+
message: t("command.extract.interactive.askForce"),
|
|
15150
|
+
initialValue: false
|
|
15151
|
+
});
|
|
15152
|
+
if (isCancel(force)) {
|
|
15153
|
+
cancel(t("common.cancelled"));
|
|
15154
|
+
return false;
|
|
15155
|
+
}
|
|
15147
15156
|
return (await runAuditedExtraction({
|
|
15148
15157
|
aiexDir,
|
|
15149
15158
|
config,
|
|
@@ -15151,9 +15160,10 @@ async function runInteractive(aiexDir, config, aiConfig, modelOverride) {
|
|
|
15151
15160
|
schemaName,
|
|
15152
15161
|
source: {
|
|
15153
15162
|
type: "file",
|
|
15154
|
-
filePath:
|
|
15163
|
+
filePath: fp
|
|
15155
15164
|
},
|
|
15156
|
-
modelOverride
|
|
15165
|
+
modelOverride,
|
|
15166
|
+
force
|
|
15157
15167
|
})).success;
|
|
15158
15168
|
} else if (inputSource === "dir") {
|
|
15159
15169
|
const dirPath = await text({
|
|
@@ -15166,7 +15176,15 @@ async function runInteractive(aiexDir, config, aiConfig, modelOverride) {
|
|
|
15166
15176
|
cancel(t("common.cancelled"));
|
|
15167
15177
|
return false;
|
|
15168
15178
|
}
|
|
15169
|
-
const
|
|
15179
|
+
const force = await confirm({
|
|
15180
|
+
message: t("command.extract.interactive.askForce"),
|
|
15181
|
+
initialValue: false
|
|
15182
|
+
});
|
|
15183
|
+
if (isCancel(force)) {
|
|
15184
|
+
cancel(t("common.cancelled"));
|
|
15185
|
+
return false;
|
|
15186
|
+
}
|
|
15187
|
+
const result = await runBatchExtraction(aiexDir, config, aiConfig, schemaName, dirPath, void 0, modelOverride, { force });
|
|
15170
15188
|
if (!result.ok) failCommand(result.error);
|
|
15171
15189
|
return result.ok && result.failCount === 0;
|
|
15172
15190
|
}
|
|
@@ -74,7 +74,7 @@ function doctorDiagnosticsTableRows(d) {
|
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region package.json
|
|
76
76
|
var name = "aiex-cli";
|
|
77
|
-
var version = "0.0.4-beta.
|
|
77
|
+
var version = "0.0.4-beta.5";
|
|
78
78
|
var description = "JSON Schema → SQLite with AI-powered data extraction";
|
|
79
79
|
var package_default = {
|
|
80
80
|
name,
|
|
@@ -490,7 +490,8 @@ const en = {
|
|
|
490
490
|
enterFilePath: "Enter file path:",
|
|
491
491
|
enterDirPath: "Enter directory path:",
|
|
492
492
|
filePathRequired: "Please enter a file path",
|
|
493
|
-
dirPathRequired: "Please enter a directory path"
|
|
493
|
+
dirPathRequired: "Please enter a directory path",
|
|
494
|
+
askForce: "Force re-extraction of already processed files?"
|
|
494
495
|
},
|
|
495
496
|
errors: {
|
|
496
497
|
noAIConfig: "AI configuration not found. Please run \"{{cmd}}\" to configure AI settings first",
|
|
@@ -939,7 +940,7 @@ async function initI18n(lng) {
|
|
|
939
940
|
fallbackLng: "en",
|
|
940
941
|
resources: {
|
|
941
942
|
"en": { translation: en },
|
|
942
|
-
"zh-CN": { translation: await import("./zh-CN-
|
|
943
|
+
"zh-CN": { translation: await import("./zh-CN-BZihcLn3.mjs").then((m) => m.zhCN) }
|
|
943
944
|
},
|
|
944
945
|
interpolation: { escapeValue: false },
|
|
945
946
|
returnNull: false
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as formatDoctorDiagnosticsJson, O as buildDoctorDiagnostics, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, k as doctorDiagnosticsTableRows, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics } from "./doctor-collector-
|
|
1
|
+
import { A as formatDoctorDiagnosticsJson, O as buildDoctorDiagnostics, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, k as doctorDiagnosticsTableRows, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics } from "./doctor-collector-BtEPFDoa.mjs";
|
|
2
2
|
|
|
3
3
|
export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
|
|
@@ -64,7 +64,8 @@ const zhCN = {
|
|
|
64
64
|
enterFilePath: "输入文件路径:",
|
|
65
65
|
enterDirPath: "输入目录路径:",
|
|
66
66
|
filePathRequired: "请输入文件路径",
|
|
67
|
-
dirPathRequired: "请输入目录路径"
|
|
67
|
+
dirPathRequired: "请输入目录路径",
|
|
68
|
+
askForce: "是否强制重新抽取已成功处理过的文件?"
|
|
68
69
|
},
|
|
69
70
|
errors: {
|
|
70
71
|
noAIConfig: "未找到 AI 配置,请运行 \"{{cmd}}\" 先配置 AI 设置",
|