aiex-cli 0.0.2-beta.10 → 0.0.2-beta.11
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 +34 -1
- package/dist/{doctor-collector-DlG_mJKG.mjs → doctor-collector-BEyduuZS.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/web/assets/DataBrowser-BVXdTA8A.js +6 -0
- package/dist/web/assets/{index-CWSsEI38.js → index-CxdBxxXb.js} +6 -6
- package/dist/web/assets/index-D4eIQ8eU.css +2 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/DataBrowser-CwcTG80-.js +0 -6
- package/dist/web/assets/index-C2Nbrhs2.css +0 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as version, T as formatDoctorDiagnosticsJson, _ as createConfig, a as parseJsonSchema, b as name, c as getDefaultAIConfig, d as DEFAULT_MARKITDOWN_CONFIG, f as DEFAULT_MINERU_CONFIG, g as AIConfigSchema, h as PLACEHOLDER_TEXT, i as JsonSchemaDefinitionSchema, l as readAIConfig, m as PLACEHOLDER_SCHEMA, n as createMigrationConfig, o as toSnakeCase, p as DEFAULT_PROMPT_CONFIG, s as generateDrizzleSchema, t as collectDoctorDiagnostics, u as writeAIConfig, v as seedConfig, w as doctorDiagnosticsTableRows, x as package_default, y as description } from "./doctor-collector-
|
|
1
|
+
import { S as version, T as formatDoctorDiagnosticsJson, _ as createConfig, a as parseJsonSchema, b as name, c as getDefaultAIConfig, d as DEFAULT_MARKITDOWN_CONFIG, f as DEFAULT_MINERU_CONFIG, g as AIConfigSchema, h as PLACEHOLDER_TEXT, i as JsonSchemaDefinitionSchema, l as readAIConfig, m as PLACEHOLDER_SCHEMA, n as createMigrationConfig, o as toSnakeCase, p as DEFAULT_PROMPT_CONFIG, s as generateDrizzleSchema, t as collectDoctorDiagnostics, u as writeAIConfig, v as seedConfig, w as doctorDiagnosticsTableRows, x as package_default, y as description } from "./doctor-collector-BEyduuZS.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import os from "node:os";
|
|
@@ -14980,6 +14980,31 @@ function invalidParamResponse$1(message) {
|
|
|
14980
14980
|
if (!result.success) return c.json({ error: message }, 400);
|
|
14981
14981
|
};
|
|
14982
14982
|
}
|
|
14983
|
+
function getAuditNotionStatus(record) {
|
|
14984
|
+
if (record.notionPages?.length) return "synced";
|
|
14985
|
+
if (record.status === "failed") return "failed";
|
|
14986
|
+
return "not_synced";
|
|
14987
|
+
}
|
|
14988
|
+
async function getRowExtractionActions(aiexDir, tableName) {
|
|
14989
|
+
const actions = /* @__PURE__ */ new Map();
|
|
14990
|
+
const auditRecords = await listExtractionAuditRecords(aiexDir);
|
|
14991
|
+
for (const record of auditRecords) {
|
|
14992
|
+
if (!record.outputName) continue;
|
|
14993
|
+
for (const inserted of record.tablesInserted ?? []) {
|
|
14994
|
+
if (inserted.table !== tableName) continue;
|
|
14995
|
+
const key = String(inserted.rowId);
|
|
14996
|
+
if (actions.has(key)) continue;
|
|
14997
|
+
const notionPages = record.notionPages?.length ? record.notionPages : void 0;
|
|
14998
|
+
actions.set(key, {
|
|
14999
|
+
extractionName: record.outputName,
|
|
15000
|
+
notionStatus: getAuditNotionStatus(record),
|
|
15001
|
+
notionPages,
|
|
15002
|
+
notionError: !notionPages && record.status === "failed" ? record.error : void 0
|
|
15003
|
+
});
|
|
15004
|
+
}
|
|
15005
|
+
}
|
|
15006
|
+
return actions;
|
|
15007
|
+
}
|
|
14983
15008
|
function schemaNameFromExtractionFile(name$1) {
|
|
14984
15009
|
const stem = name$1.replace(FILE_REGEX, "");
|
|
14985
15010
|
const match = stem.match(EXTRACTION_TIMESTAMP_RE);
|
|
@@ -15111,9 +15136,17 @@ function dataRoutes(config) {
|
|
|
15111
15136
|
limit ${pageSize}
|
|
15112
15137
|
offset ${offset}
|
|
15113
15138
|
`.execute(db);
|
|
15139
|
+
const primaryKey = columns.find((column) => column.pk);
|
|
15140
|
+
const actionsByRowId = await getRowExtractionActions(aiexDir, tableName);
|
|
15141
|
+
const rowActions = primaryKey ? Object.fromEntries(result.rows.map((row, index) => {
|
|
15142
|
+
const rowId = row[primaryKey.name];
|
|
15143
|
+
const action = rowId === null || rowId === void 0 ? void 0 : actionsByRowId.get(String(rowId));
|
|
15144
|
+
return action ? [String(index), action] : null;
|
|
15145
|
+
}).filter((entry) => !!entry)) : {};
|
|
15114
15146
|
return c.json({
|
|
15115
15147
|
columns,
|
|
15116
15148
|
rows: result.rows,
|
|
15149
|
+
rowActions,
|
|
15117
15150
|
total,
|
|
15118
15151
|
page,
|
|
15119
15152
|
pageSize,
|
|
@@ -65,7 +65,7 @@ function doctorDiagnosticsTableRows(d) {
|
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region package.json
|
|
67
67
|
var name = "aiex-cli";
|
|
68
|
-
var version = "0.0.2-beta.
|
|
68
|
+
var version = "0.0.2-beta.11";
|
|
69
69
|
var description = "JSON Schema → SQLite with AI-powered data extraction";
|
|
70
70
|
var package_default = {
|
|
71
71
|
name,
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as buildDoctorDiagnostics, T as formatDoctorDiagnosticsJson, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics, w as doctorDiagnosticsTableRows } from "./doctor-collector-
|
|
1
|
+
import { C as buildDoctorDiagnostics, T as formatDoctorDiagnosticsJson, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics, w as doctorDiagnosticsTableRows } from "./doctor-collector-BEyduuZS.mjs";
|
|
2
2
|
|
|
3
3
|
export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
|