aiex-cli 0.0.1-beta.3 → 0.0.1-beta.30
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/README.md +58 -26
- package/dist/cli.mjs +7301 -2816
- package/dist/completions-C3rmTwXZ.mjs +90 -0
- package/dist/core/schema-sqlite/migrate-helper.mjs +49 -42
- package/dist/{doctor-BhNd6jt6.mjs → doctor-collector-DhiJrVw5.mjs} +280 -219
- package/dist/index.d.mts +15 -15
- package/dist/index.mjs +1 -1
- package/dist/table-schema.json +4 -0
- package/dist/web/assets/AISettings-BjXxD5Ts.js +339 -0
- package/dist/web/assets/DataBrowser-CwcTG80-.js +6 -0
- package/dist/web/assets/DataBrowser-DZT0kGQE.css +1 -0
- package/dist/web/assets/ExtractionViewer-CsdK1kKK.js +1 -0
- package/dist/web/assets/JsonSchemaEditor-BhY9BNOn.js +570 -0
- package/dist/web/assets/api-client-D2Y_-4JM.js +1 -0
- package/dist/web/assets/button-Cdgr9Igy.js +927 -0
- package/dist/web/assets/chunk-DtRyYLXJ.js +1 -0
- package/dist/web/assets/{cssMode-BloHqzZF.js → cssMode-CPThwItX.js} +1 -1
- package/dist/web/assets/dialog-CUkPLPNP.js +109 -0
- package/dist/web/assets/dist-9yHVMqQ0.js +1 -0
- package/dist/web/assets/{editor.api-BG499EJF.js → editor.api-C8BHpRhn.js} +1 -1
- package/dist/web/assets/{editor.main-BhEWG0_P.js → editor.main-BnOkwRFv.js} +2 -2
- package/dist/web/assets/{freemarker2-DOHaFATh.js → freemarker2-DWDTYVJR.js} +1 -1
- package/dist/web/assets/{handlebars-BIFWety9.js → handlebars-D4DzjGQ7.js} +1 -1
- package/dist/web/assets/{html-YGaqGZNd.js → html-DnzhKSoD.js} +1 -1
- package/dist/web/assets/{htmlMode-Bu3PyHjq.js → htmlMode-CR7UKfEH.js} +1 -1
- package/dist/web/assets/iconfont.1776926463538-BllfKX1O.ttf +0 -0
- package/dist/web/assets/iconfont.1776926463538-D9epzWxu.woff +0 -0
- package/dist/web/assets/index-C9N8oWt4.css +2 -0
- package/dist/web/assets/index-DCAKotsV.js +882 -0
- package/dist/web/assets/{javascript-N0gZqDK0.js → javascript-D2srszZ8.js} +1 -1
- package/dist/web/assets/{jsonMode-z5YscjcG.js → jsonMode-B4jaPYEr.js} +1 -1
- package/dist/web/assets/{liquid-BHfNNVLs.js → liquid-CIT2Wl_l.js} +1 -1
- package/dist/web/assets/{mdx-Dqu2t0et.js → mdx-CWLaEOFy.js} +1 -1
- package/dist/web/assets/{monaco.contribution-ByQ3yI-W.js → monaco.contribution-DDv5ldfS.js} +2 -2
- package/dist/web/assets/object-utils-DPPzLQjH.js +1 -0
- package/dist/web/assets/{python-icfse9Ji.js → python-6CGfpCNq.js} +1 -1
- package/dist/web/assets/{razor-DwVkryG9.js → razor-DEMMh3TD.js} +1 -1
- package/dist/web/assets/runtime-dom.esm-bundler-ei_N7Xjw.js +1 -0
- package/dist/web/assets/select-BGex2SPs.js +439 -0
- package/dist/web/assets/{tsMode-CLrI3bdf.js → tsMode-Cm1NtjPs.js} +1 -1
- package/dist/web/assets/{typescript-BzuZVF7m.js → typescript-BM9aPEFg.js} +1 -1
- package/dist/web/assets/{xml-Cr85kdqA.js → xml-CoSbvcg5.js} +1 -1
- package/dist/web/assets/{yaml-D3RbJnnO.js → yaml-56GOgy8k.js} +1 -1
- package/dist/web/index.html +10 -4
- package/package.json +19 -2
- package/src/core/schema-sqlite/migrate-helper.ts +41 -50
- package/src/core/schema-sqlite/migration-name.ts +14 -0
- package/dist/web/assets/chunk-BEqpzyXh.js +0 -1
- package/dist/web/assets/index-Bi376XVf.css +0 -2
- package/dist/web/assets/index-c6KB-9C-.js +0 -3262
- /package/dist/web/assets/{abap-Cry0R76c.js → abap-Bgec7Keq.js} +0 -0
- /package/dist/web/assets/{apex-xqbJ58nJ.js → apex-VBlPwEoQ.js} +0 -0
- /package/dist/web/assets/{azcli-D7JTNGKs.js → azcli-DKqrEFBx.js} +0 -0
- /package/dist/web/assets/{bat-Cuq6hn0K.js → bat-DdgQWy_0.js} +0 -0
- /package/dist/web/assets/{bicep-eTuQjz9F.js → bicep-CRMM43EB.js} +0 -0
- /package/dist/web/assets/{cameligo-DKgCRl36.js → cameligo-UatALtML.js} +0 -0
- /package/dist/web/assets/{clojure-B_aTBtVh.js → clojure-D8JU08RA.js} +0 -0
- /package/dist/web/assets/{coffee-BWAYpIPu.js → coffee-C56wu358.js} +0 -0
- /package/dist/web/assets/{cpp-BduBQE8d.js → cpp-CyZLvhJG.js} +0 -0
- /package/dist/web/assets/{csharp-CMqOVYKK.js → csharp-BJl3ixva.js} +0 -0
- /package/dist/web/assets/{csp-6cGliXw2.js → csp-CxEKxmO-.js} +0 -0
- /package/dist/web/assets/{css-CHnKqS9Q.js → css-B0t_muXd.js} +0 -0
- /package/dist/web/assets/{cypher-DMzZBj2L.js → cypher-D1hqiMFD.js} +0 -0
- /package/dist/web/assets/{dart-7hYfJ1Dv.js → dart-Bz550Pyv.js} +0 -0
- /package/dist/web/assets/{dockerfile-BflvjnJW.js → dockerfile-CIXgVAuA.js} +0 -0
- /package/dist/web/assets/{ecl-BEt6xb2p.js → ecl-D9qbvZoA.js} +0 -0
- /package/dist/web/assets/{elixir-CnrQCt6o.js → elixir-b2M38fAy.js} +0 -0
- /package/dist/web/assets/{flow9-CfLCoUuB.js → flow9-Dq1UYMkt.js} +0 -0
- /package/dist/web/assets/{fsharp-BQqR9uQ6.js → fsharp-BaeLhgfq.js} +0 -0
- /package/dist/web/assets/{go-C3AlMVwy.js → go-Bd-NFKIC.js} +0 -0
- /package/dist/web/assets/{graphql-O_-hDldf.js → graphql-DZVerJfy.js} +0 -0
- /package/dist/web/assets/{hcl-BQQD6Mtj.js → hcl-CAVzrZfH.js} +0 -0
- /package/dist/web/assets/{ini-Bf0RDfP_.js → ini-CyXdX58t.js} +0 -0
- /package/dist/web/assets/{java-nqX2KEDD.js → java-B5pNgvhy.js} +0 -0
- /package/dist/web/assets/{julia-B6P9U5er.js → julia-XRhmV3AN.js} +0 -0
- /package/dist/web/assets/{kotlin-B-LRk09-.js → kotlin-DOd3J5vr.js} +0 -0
- /package/dist/web/assets/{less-CEaIdW1f.js → less-veZSnyw6.js} +0 -0
- /package/dist/web/assets/{lexon-Qv4pvFSW.js → lexon-QWGkuK0H.js} +0 -0
- /package/dist/web/assets/{lua-CFpyR7YN.js → lua-CYGpjuO5.js} +0 -0
- /package/dist/web/assets/{m3-CvKhVPQn.js → m3-yNnrZkdc.js} +0 -0
- /package/dist/web/assets/{markdown-qldG3Vc4.js → markdown-BCSWEPSX.js} +0 -0
- /package/dist/web/assets/{mips-0D8PRyHq.js → mips-OpYmcC30.js} +0 -0
- /package/dist/web/assets/{msdax-DwZXSC5M.js → msdax-2oxoTO9Z.js} +0 -0
- /package/dist/web/assets/{mysql-BWq85KY4.js → mysql-5KlC-K_9.js} +0 -0
- /package/dist/web/assets/{objective-c-D653JUMG.js → objective-c-CcDCgtLx.js} +0 -0
- /package/dist/web/assets/{pascal-rWjRDdnR.js → pascal-BZGsbaEV.js} +0 -0
- /package/dist/web/assets/{pascaligo-Db8EehaF.js → pascaligo-DtD5qU3G.js} +0 -0
- /package/dist/web/assets/{perl-C68oq8-D.js → perl-C1jNNS3E.js} +0 -0
- /package/dist/web/assets/{pgsql-BXeHe33s.js → pgsql-CT0fhiZa.js} +0 -0
- /package/dist/web/assets/{php-CDVsAbfl.js → php-D6DrXoPM.js} +0 -0
- /package/dist/web/assets/{pla-DnryFT0q.js → pla-b3-HN2pF.js} +0 -0
- /package/dist/web/assets/{postiats-CDg_4Ev-.js → postiats-Bin2ApVS.js} +0 -0
- /package/dist/web/assets/{powerquery-CWPi8ROz.js → powerquery-7ASnn-ZG.js} +0 -0
- /package/dist/web/assets/{powershell-C5A0QX3-.js → powershell-t4p7sU1H.js} +0 -0
- /package/dist/web/assets/{preload-helper-DSXbuxSR.js → preload-helper-Dd-HcVz_.js} +0 -0
- /package/dist/web/assets/{protobuf-Cgt-BQbL.js → protobuf-BUGeWa_j.js} +0 -0
- /package/dist/web/assets/{pug-RPYJC9QB.js → pug-BuKcgC9s.js} +0 -0
- /package/dist/web/assets/{qsharp-BZ3S7fu_.js → qsharp-DxLLX8mo.js} +0 -0
- /package/dist/web/assets/{r-CN875f1X.js → r-DMlFgn7A.js} +0 -0
- /package/dist/web/assets/{redis-BLesvTwR.js → redis-cXItkC5u.js} +0 -0
- /package/dist/web/assets/{redshift-Byf_0XqD.js → redshift-BZVbW7HE.js} +0 -0
- /package/dist/web/assets/{restructuredtext-DYg_6BiZ.js → restructuredtext-BzjxwS8h.js} +0 -0
- /package/dist/web/assets/{ruby-C4OkxbC-.js → ruby-C5nyLV4l.js} +0 -0
- /package/dist/web/assets/{rust-xAoaEFMh.js → rust-BcmMsHdf.js} +0 -0
- /package/dist/web/assets/{sb-C8dHOW_y.js → sb-Dnb1iy6B.js} +0 -0
- /package/dist/web/assets/{scala-Spx0wP1o.js → scala-anMIFYpA.js} +0 -0
- /package/dist/web/assets/{scheme-D2mZlAUz.js → scheme-BItQTe08.js} +0 -0
- /package/dist/web/assets/{scss-DDCn3Ylu.js → scss-BOv51BJ5.js} +0 -0
- /package/dist/web/assets/{shell-M6px0EWn.js → shell-BsRYRTNN.js} +0 -0
- /package/dist/web/assets/{solidity-DUWMJi-f.js → solidity-BtuLgGDx.js} +0 -0
- /package/dist/web/assets/{sophia-DwJbUG-2.js → sophia-B0Vkc5MF.js} +0 -0
- /package/dist/web/assets/{sparql-ClQxbRPI.js → sparql-B7lvkZQM.js} +0 -0
- /package/dist/web/assets/{sql-BQdjW7Vy.js → sql-DvP5MpA3.js} +0 -0
- /package/dist/web/assets/{st-BpISyZ_v.js → st-GVUeyB3U.js} +0 -0
- /package/dist/web/assets/{swift-CMbl5gM4.js → swift-DSPIoCjm.js} +0 -0
- /package/dist/web/assets/{systemverilog-jx2Xs7uO.js → systemverilog-Icj2-k23.js} +0 -0
- /package/dist/web/assets/{tcl-GIGnfs89.js → tcl-Cd8KQcm-.js} +0 -0
- /package/dist/web/assets/{twig-Bc0mxc_m.js → twig-CBHmt8z3.js} +0 -0
- /package/dist/web/assets/{typespec-CEioAsEm.js → typespec-Ckc037mq.js} +0 -0
- /package/dist/web/assets/{vb-BPk67J-d.js → vb-B97GW9Wb.js} +0 -0
- /package/dist/web/assets/{wgsl-DOnyt8_J.js → wgsl-DIKmb3YH.js} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import process from "node:process";
|
|
3
|
-
import { z } from "zod";
|
|
4
1
|
import fs from "node:fs/promises";
|
|
5
2
|
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
6
5
|
import Conf from "conf";
|
|
6
|
+
import { readFile, writeFile } from "jsonfile";
|
|
7
|
+
import { z } from "zod";
|
|
7
8
|
|
|
8
9
|
//#region src/core/doctor.ts
|
|
9
10
|
function buildDoctorDiagnostics(input) {
|
|
@@ -61,6 +62,278 @@ function doctorDiagnosticsTableRows(d) {
|
|
|
61
62
|
return rows;
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region package.json
|
|
67
|
+
var name = "aiex-cli";
|
|
68
|
+
var version = "0.0.1-beta.30";
|
|
69
|
+
var description = "JSON Schema → SQLite with AI-powered data extraction";
|
|
70
|
+
var package_default = {
|
|
71
|
+
name,
|
|
72
|
+
type: "module",
|
|
73
|
+
version,
|
|
74
|
+
description,
|
|
75
|
+
author: "OSpoon <zxin088@gmail.com>",
|
|
76
|
+
license: "MIT",
|
|
77
|
+
homepage: "https://github.com/OSpoon/aiex-cli#readme",
|
|
78
|
+
repository: {
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "git+https://github.com/OSpoon/aiex-cli.git"
|
|
81
|
+
},
|
|
82
|
+
bugs: "https://github.com/OSpoon/aiex-cli/issues",
|
|
83
|
+
keywords: [
|
|
84
|
+
"json-schema",
|
|
85
|
+
"sqlite",
|
|
86
|
+
"drizzle",
|
|
87
|
+
"orm",
|
|
88
|
+
"ai-extraction",
|
|
89
|
+
"cli",
|
|
90
|
+
"database-migration",
|
|
91
|
+
"schema-editor",
|
|
92
|
+
"code-generation",
|
|
93
|
+
"structured-output"
|
|
94
|
+
],
|
|
95
|
+
sideEffects: false,
|
|
96
|
+
exports: {
|
|
97
|
+
".": "./dist/index.mjs",
|
|
98
|
+
"./cli": "./dist/cli.mjs",
|
|
99
|
+
"./core/schema-sqlite/migrate-helper": "./dist/core/schema-sqlite/migrate-helper.mjs",
|
|
100
|
+
"./package.json": "./package.json"
|
|
101
|
+
},
|
|
102
|
+
main: "./dist/index.mjs",
|
|
103
|
+
module: "./dist/index.mjs",
|
|
104
|
+
types: "./dist/index.d.mts",
|
|
105
|
+
bin: { "aiex": "./bin/cli.mjs" },
|
|
106
|
+
files: [
|
|
107
|
+
"bin",
|
|
108
|
+
"dist",
|
|
109
|
+
"src/core/schema-sqlite/migrate-helper.ts",
|
|
110
|
+
"src/core/schema-sqlite/migration-name.ts"
|
|
111
|
+
],
|
|
112
|
+
scripts: {
|
|
113
|
+
"build": "tsdown && pnpm --filter aiex-web build",
|
|
114
|
+
"dev": "tsdown --watch",
|
|
115
|
+
"start": "tsx src/index.ts",
|
|
116
|
+
"test": "vitest",
|
|
117
|
+
"coverage": "vitest --coverage",
|
|
118
|
+
"typecheck": "tsc",
|
|
119
|
+
"lint": "eslint .",
|
|
120
|
+
"prepack": "cp ../../README.md .",
|
|
121
|
+
"postpack": "rm -f README.md",
|
|
122
|
+
"prepublishOnly": "pnpm run build"
|
|
123
|
+
},
|
|
124
|
+
dependencies: {
|
|
125
|
+
"@ai-sdk/openai-compatible": "catalog:",
|
|
126
|
+
"@clack/prompts": "catalog:",
|
|
127
|
+
"@hono/node-server": "catalog:",
|
|
128
|
+
"@hono/zod-validator": "catalog:",
|
|
129
|
+
"@langfuse/otel": "catalog:",
|
|
130
|
+
"@opentelemetry/sdk-trace-node": "catalog:",
|
|
131
|
+
"ai": "catalog:",
|
|
132
|
+
"better-sqlite3": "catalog:",
|
|
133
|
+
"citty": "catalog:",
|
|
134
|
+
"cli-table3": "catalog:",
|
|
135
|
+
"conf": "catalog:",
|
|
136
|
+
"consola": "catalog:",
|
|
137
|
+
"date-fns": "catalog:",
|
|
138
|
+
"drizzle-kit": "catalog:cli",
|
|
139
|
+
"drizzle-orm": "catalog:",
|
|
140
|
+
"es-toolkit": "catalog:",
|
|
141
|
+
"esbuild": "catalog:",
|
|
142
|
+
"execa": "catalog:",
|
|
143
|
+
"hono": "catalog:",
|
|
144
|
+
"jsonfile": "catalog:",
|
|
145
|
+
"jsonrepair": "catalog:",
|
|
146
|
+
"mime": "catalog:",
|
|
147
|
+
"open": "catalog:",
|
|
148
|
+
"p-retry": "catalog:",
|
|
149
|
+
"picocolors": "catalog:",
|
|
150
|
+
"proper-lockfile": "catalog:",
|
|
151
|
+
"tinyglobby": "catalog:",
|
|
152
|
+
"tsx": "catalog:cli",
|
|
153
|
+
"unpdf": "catalog:",
|
|
154
|
+
"update-notifier": "catalog:",
|
|
155
|
+
"zod": "catalog:"
|
|
156
|
+
},
|
|
157
|
+
devDependencies: {
|
|
158
|
+
"@antfu/eslint-config": "catalog:cli",
|
|
159
|
+
"@antfu/ni": "catalog:cli",
|
|
160
|
+
"@types/better-sqlite3": "catalog:types",
|
|
161
|
+
"@types/jsonfile": "catalog:",
|
|
162
|
+
"@types/node": "catalog:types",
|
|
163
|
+
"@types/proper-lockfile": "catalog:",
|
|
164
|
+
"@types/update-notifier": "catalog:",
|
|
165
|
+
"@vitest/coverage-v8": "catalog:testing",
|
|
166
|
+
"eslint": "catalog:cli",
|
|
167
|
+
"publint": "catalog:cli",
|
|
168
|
+
"tsdown": "catalog:cli",
|
|
169
|
+
"tsnapi": "catalog:testing",
|
|
170
|
+
"typescript": "catalog:cli",
|
|
171
|
+
"vitest": "catalog:testing"
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/config.ts
|
|
177
|
+
function createConfig() {
|
|
178
|
+
return new Conf({
|
|
179
|
+
cwd: process.env.CLI_CONFIG_DIR,
|
|
180
|
+
projectName: process.env.CLI_CONFIG_PROJECT_NAME || name
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function seedConfig(config = createConfig()) {
|
|
184
|
+
if (!config.has("name")) config.set("name", name);
|
|
185
|
+
if (!config.has("version")) config.set("version", version);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/core/ai-extraction/schemas.ts
|
|
190
|
+
const ModelCapabilitiesSchema = z.object({
|
|
191
|
+
vision: z.boolean(),
|
|
192
|
+
structuredOutput: z.boolean(),
|
|
193
|
+
maxTokens: z.number().int().positive().optional(),
|
|
194
|
+
maxOutputTokens: z.number().int().positive().optional()
|
|
195
|
+
});
|
|
196
|
+
const AIModelConfigSchema = z.object({
|
|
197
|
+
name: z.string().min(1),
|
|
198
|
+
capabilities: ModelCapabilitiesSchema
|
|
199
|
+
});
|
|
200
|
+
const AIProviderConfigSchema = z.object({
|
|
201
|
+
baseURL: z.string().min(1),
|
|
202
|
+
apiKey: z.string(),
|
|
203
|
+
models: z.array(AIModelConfigSchema).min(1),
|
|
204
|
+
timeout: z.number().int().positive().default(300).optional()
|
|
205
|
+
});
|
|
206
|
+
const PromptConfigSchema = z.object({
|
|
207
|
+
systemTemplate: z.string().min(1),
|
|
208
|
+
userTemplate: z.string().min(1)
|
|
209
|
+
});
|
|
210
|
+
const ExtractionConfigSchema = z.object({ outputDir: z.string().min(1) });
|
|
211
|
+
const ExternalPdfConverterConfigSchema = z.object({
|
|
212
|
+
command: z.string().min(1),
|
|
213
|
+
args: z.array(z.string()),
|
|
214
|
+
outputFile: z.string().min(1).optional(),
|
|
215
|
+
timeout: z.number().int().positive().default(600).optional(),
|
|
216
|
+
fallbackToUnpdf: z.boolean().optional()
|
|
217
|
+
});
|
|
218
|
+
const PdfConfigSchema = z.object({
|
|
219
|
+
converter: z.enum([
|
|
220
|
+
"unpdf",
|
|
221
|
+
"mineru",
|
|
222
|
+
"external"
|
|
223
|
+
]),
|
|
224
|
+
mineru: ExternalPdfConverterConfigSchema.optional(),
|
|
225
|
+
external: ExternalPdfConverterConfigSchema.optional()
|
|
226
|
+
});
|
|
227
|
+
const LangfuseConfigSchema = z.object({
|
|
228
|
+
publicKey: z.string(),
|
|
229
|
+
secretKey: z.string(),
|
|
230
|
+
host: z.string().optional()
|
|
231
|
+
});
|
|
232
|
+
const AIConfigSchema = z.object({
|
|
233
|
+
provider: AIProviderConfigSchema,
|
|
234
|
+
prompt: PromptConfigSchema,
|
|
235
|
+
extraction: ExtractionConfigSchema,
|
|
236
|
+
pdf: PdfConfigSchema.optional(),
|
|
237
|
+
langfuse: LangfuseConfigSchema.optional()
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/core/ai-extraction/types.ts
|
|
242
|
+
const PLACEHOLDER_SCHEMA = "{schema}";
|
|
243
|
+
const PLACEHOLDER_TEXT = "{text}";
|
|
244
|
+
const DEFAULT_MODELS = [{
|
|
245
|
+
name: "qwen-plus",
|
|
246
|
+
capabilities: {
|
|
247
|
+
vision: false,
|
|
248
|
+
structuredOutput: true
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
name: "qwen-vl-plus",
|
|
252
|
+
capabilities: {
|
|
253
|
+
vision: true,
|
|
254
|
+
structuredOutput: true
|
|
255
|
+
}
|
|
256
|
+
}];
|
|
257
|
+
const DEFAULT_PROVIDER_CONFIG = {
|
|
258
|
+
baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
259
|
+
apiKey: "",
|
|
260
|
+
models: [...DEFAULT_MODELS],
|
|
261
|
+
timeout: 300
|
|
262
|
+
};
|
|
263
|
+
const DEFAULT_PROMPT_CONFIG = {
|
|
264
|
+
systemTemplate: `You are a professional data extraction assistant. Your task is to extract structured data from text and return a JSON object based on the data structure definition provided below.
|
|
265
|
+
|
|
266
|
+
{schema}
|
|
267
|
+
|
|
268
|
+
Extraction requirements:
|
|
269
|
+
1. Extract strictly according to the field names and types defined in the structure
|
|
270
|
+
2. If the text lacks information for a field, set that field to null
|
|
271
|
+
3. Do not add fields that do not exist in the structure definition
|
|
272
|
+
4. Maintain data accuracy and completeness`,
|
|
273
|
+
userTemplate: `Please extract data from the following text:
|
|
274
|
+
{text}`
|
|
275
|
+
};
|
|
276
|
+
const DEFAULT_EXTRACTION_CONFIG = { outputDir: ".aiex/extracted" };
|
|
277
|
+
const DEFAULT_MINERU_CONFIG = {
|
|
278
|
+
command: "mineru",
|
|
279
|
+
args: [
|
|
280
|
+
"-p",
|
|
281
|
+
"{input}",
|
|
282
|
+
"-o",
|
|
283
|
+
"{outputDir}"
|
|
284
|
+
],
|
|
285
|
+
timeout: 600,
|
|
286
|
+
fallbackToUnpdf: true
|
|
287
|
+
};
|
|
288
|
+
const DEFAULT_PDF_CONFIG = {
|
|
289
|
+
converter: "unpdf",
|
|
290
|
+
mineru: DEFAULT_MINERU_CONFIG
|
|
291
|
+
};
|
|
292
|
+
const DEFAULT_AI_CONFIG = {
|
|
293
|
+
provider: DEFAULT_PROVIDER_CONFIG,
|
|
294
|
+
prompt: DEFAULT_PROMPT_CONFIG,
|
|
295
|
+
extraction: DEFAULT_EXTRACTION_CONFIG,
|
|
296
|
+
pdf: DEFAULT_PDF_CONFIG
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/core/ai-extraction/config.ts
|
|
301
|
+
const CONFIG_FILE_NAME = "ai-config.json";
|
|
302
|
+
const GITIGNORE_FILE = ".gitignore";
|
|
303
|
+
async function readAIConfig(aiexDir) {
|
|
304
|
+
const configPath = path.join(aiexDir, CONFIG_FILE_NAME);
|
|
305
|
+
try {
|
|
306
|
+
const parsed = await readFile(configPath);
|
|
307
|
+
return AIConfigSchema.parse(parsed);
|
|
308
|
+
} catch {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
async function writeAIConfig(aiexDir, config) {
|
|
313
|
+
const configPath = path.join(aiexDir, CONFIG_FILE_NAME);
|
|
314
|
+
await fs.mkdir(aiexDir, { recursive: true });
|
|
315
|
+
await writeFile(configPath, config, {
|
|
316
|
+
spaces: 2,
|
|
317
|
+
EOL: "\n"
|
|
318
|
+
});
|
|
319
|
+
await addToGitignore(aiexDir, CONFIG_FILE_NAME);
|
|
320
|
+
}
|
|
321
|
+
function getDefaultAIConfig() {
|
|
322
|
+
return structuredClone(DEFAULT_AI_CONFIG);
|
|
323
|
+
}
|
|
324
|
+
async function addToGitignore(aiexDir, fileName) {
|
|
325
|
+
const projectRoot = path.dirname(aiexDir);
|
|
326
|
+
const gitignorePath = path.join(projectRoot, GITIGNORE_FILE);
|
|
327
|
+
try {
|
|
328
|
+
const content = await fs.readFile(gitignorePath, "utf-8");
|
|
329
|
+
if (content.split("\n").some((line) => line.trim() === fileName || line.includes(".aiex/"))) return;
|
|
330
|
+
const newContent = content.endsWith("\n") ? `${content}${fileName}\n` : `${content}\n${fileName}\n`;
|
|
331
|
+
await fs.writeFile(gitignorePath, newContent);
|
|
332
|
+
} catch {
|
|
333
|
+
await fs.writeFile(gitignorePath, `${fileName}\n`);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
64
337
|
//#endregion
|
|
65
338
|
//#region src/core/schema-sqlite/generator.ts
|
|
66
339
|
function generateColumnDefinition(column) {
|
|
@@ -103,7 +376,7 @@ function generateRelationDefinitions(relations, reverseRelations) {
|
|
|
103
376
|
if (needsMany) imports.push("many");
|
|
104
377
|
const importStr = imports.join(", ");
|
|
105
378
|
const relDefs = [];
|
|
106
|
-
for (const rel of childRels) relDefs.push(` ${rel.name}: one(${rel.toTable}, {\n fields: [${rel.fromColumn}],\n references: [
|
|
379
|
+
for (const rel of childRels) relDefs.push(` ${rel.name}: one(${rel.toTable}, {\n fields: [${rel.fromTable}.${rel.fromColumn}],\n references: [${rel.toTable}.${rel.toColumn}],\n })`);
|
|
107
380
|
for (const rel of parentRels) if (rel.type === "has-many") relDefs.push(` ${rel.name}: many(${rel.toTable})`);
|
|
108
381
|
else relDefs.push(` ${rel.name}: one(${rel.toTable})`);
|
|
109
382
|
definitions.push(`export const ${tableName}Relations = relations(${tableName}, ({ ${importStr} }) => ({\n${relDefs.join(",\n")}\n}))`);
|
|
@@ -334,6 +607,7 @@ const ForeignKeyRefSchema = z.object({
|
|
|
334
607
|
column: z.string().min(1)
|
|
335
608
|
});
|
|
336
609
|
const JsonSchemaPropertySchema = z.lazy(() => z.object({
|
|
610
|
+
description: z.string().optional(),
|
|
337
611
|
type: z.enum([
|
|
338
612
|
"string",
|
|
339
613
|
"integer",
|
|
@@ -409,220 +683,7 @@ function generateDrizzleConfig() {
|
|
|
409
683
|
}
|
|
410
684
|
|
|
411
685
|
//#endregion
|
|
412
|
-
//#region
|
|
413
|
-
var name = "aiex-cli";
|
|
414
|
-
var version = "0.0.1-beta.3";
|
|
415
|
-
var description = "JSON Schema → SQLite with AI-powered data extraction";
|
|
416
|
-
var package_default = {
|
|
417
|
-
name,
|
|
418
|
-
type: "module",
|
|
419
|
-
version,
|
|
420
|
-
description,
|
|
421
|
-
author: "OSpoon <zxin088@gmail.com>",
|
|
422
|
-
license: "MIT",
|
|
423
|
-
homepage: "https://github.com/OSpoon/aiex-cli#readme",
|
|
424
|
-
repository: {
|
|
425
|
-
"type": "git",
|
|
426
|
-
"url": "git+https://github.com/OSpoon/aiex-cli.git"
|
|
427
|
-
},
|
|
428
|
-
bugs: "https://github.com/OSpoon/aiex-cli/issues",
|
|
429
|
-
keywords: [
|
|
430
|
-
"json-schema",
|
|
431
|
-
"sqlite",
|
|
432
|
-
"drizzle",
|
|
433
|
-
"orm",
|
|
434
|
-
"ai-extraction",
|
|
435
|
-
"cli",
|
|
436
|
-
"database-migration",
|
|
437
|
-
"schema-editor",
|
|
438
|
-
"code-generation",
|
|
439
|
-
"structured-output"
|
|
440
|
-
],
|
|
441
|
-
sideEffects: false,
|
|
442
|
-
exports: {
|
|
443
|
-
".": "./dist/index.mjs",
|
|
444
|
-
"./cli": "./dist/cli.mjs",
|
|
445
|
-
"./core/schema-sqlite/migrate-helper": "./dist/core/schema-sqlite/migrate-helper.mjs",
|
|
446
|
-
"./package.json": "./package.json"
|
|
447
|
-
},
|
|
448
|
-
main: "./dist/index.mjs",
|
|
449
|
-
module: "./dist/index.mjs",
|
|
450
|
-
types: "./dist/index.d.mts",
|
|
451
|
-
bin: { "aiex": "./bin/cli.mjs" },
|
|
452
|
-
files: [
|
|
453
|
-
"bin",
|
|
454
|
-
"dist",
|
|
455
|
-
"src/core/schema-sqlite/migrate-helper.ts"
|
|
456
|
-
],
|
|
457
|
-
scripts: {
|
|
458
|
-
"build": "tsdown && pnpm --filter aiex-web build",
|
|
459
|
-
"dev": "tsdown --watch",
|
|
460
|
-
"start": "tsx src/index.ts",
|
|
461
|
-
"test": "vitest",
|
|
462
|
-
"typecheck": "tsc",
|
|
463
|
-
"lint": "eslint .",
|
|
464
|
-
"prepublishOnly": "cp ../../README.md . && pnpm run build",
|
|
465
|
-
"postpublish": "rm -f README.md"
|
|
466
|
-
},
|
|
467
|
-
dependencies: {
|
|
468
|
-
"@ai-sdk/openai-compatible": "catalog:",
|
|
469
|
-
"@clack/prompts": "catalog:",
|
|
470
|
-
"@hono/node-server": "catalog:",
|
|
471
|
-
"ai": "catalog:",
|
|
472
|
-
"better-sqlite3": "catalog:",
|
|
473
|
-
"citty": "catalog:",
|
|
474
|
-
"cli-table3": "catalog:",
|
|
475
|
-
"conf": "catalog:",
|
|
476
|
-
"consola": "catalog:",
|
|
477
|
-
"date-fns": "catalog:",
|
|
478
|
-
"drizzle-kit": "catalog:cli",
|
|
479
|
-
"drizzle-orm": "catalog:",
|
|
480
|
-
"es-toolkit": "catalog:",
|
|
481
|
-
"esbuild": "catalog:",
|
|
482
|
-
"hono": "catalog:",
|
|
483
|
-
"picocolors": "catalog:",
|
|
484
|
-
"tsx": "catalog:cli",
|
|
485
|
-
"update-notifier": "catalog:",
|
|
486
|
-
"zod": "catalog:"
|
|
487
|
-
},
|
|
488
|
-
devDependencies: {
|
|
489
|
-
"@antfu/eslint-config": "catalog:cli",
|
|
490
|
-
"@antfu/ni": "catalog:cli",
|
|
491
|
-
"@types/better-sqlite3": "catalog:types",
|
|
492
|
-
"@types/node": "catalog:types",
|
|
493
|
-
"@types/update-notifier": "catalog:",
|
|
494
|
-
"eslint": "catalog:cli",
|
|
495
|
-
"publint": "catalog:cli",
|
|
496
|
-
"tsdown": "catalog:cli",
|
|
497
|
-
"tsnapi": "catalog:testing",
|
|
498
|
-
"typescript": "catalog:cli",
|
|
499
|
-
"vitest": "catalog:testing"
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
//#endregion
|
|
504
|
-
//#region src/config.ts
|
|
505
|
-
function createConfig() {
|
|
506
|
-
return new Conf({
|
|
507
|
-
cwd: process.env.CLI_CONFIG_DIR,
|
|
508
|
-
projectName: process.env.CLI_CONFIG_PROJECT_NAME || name
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
function seedConfig(config = createConfig()) {
|
|
512
|
-
if (!config.has("name")) config.set("name", name);
|
|
513
|
-
if (!config.has("version")) config.set("version", version);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
//#endregion
|
|
517
|
-
//#region src/core/ai-extraction/schemas.ts
|
|
518
|
-
const ModelCapabilitiesSchema = z.object({
|
|
519
|
-
vision: z.boolean(),
|
|
520
|
-
structuredOutput: z.boolean()
|
|
521
|
-
});
|
|
522
|
-
const AIModelConfigSchema = z.object({
|
|
523
|
-
name: z.string().min(1),
|
|
524
|
-
capabilities: ModelCapabilitiesSchema
|
|
525
|
-
});
|
|
526
|
-
const AIProviderConfigSchema = z.object({
|
|
527
|
-
baseURL: z.string().min(1),
|
|
528
|
-
apiKey: z.string(),
|
|
529
|
-
models: z.array(AIModelConfigSchema).min(1)
|
|
530
|
-
});
|
|
531
|
-
const PromptConfigSchema = z.object({
|
|
532
|
-
systemTemplate: z.string().min(1),
|
|
533
|
-
userTemplate: z.string().min(1)
|
|
534
|
-
});
|
|
535
|
-
const ExtractionConfigSchema = z.object({ outputDir: z.string().min(1) });
|
|
536
|
-
const AIConfigSchema = z.object({
|
|
537
|
-
provider: AIProviderConfigSchema,
|
|
538
|
-
prompt: PromptConfigSchema,
|
|
539
|
-
extraction: ExtractionConfigSchema
|
|
540
|
-
});
|
|
541
|
-
|
|
542
|
-
//#endregion
|
|
543
|
-
//#region src/core/ai-extraction/types.ts
|
|
544
|
-
const PLACEHOLDER_SCHEMA = "{schema}";
|
|
545
|
-
const PLACEHOLDER_TEXT = "{text}";
|
|
546
|
-
const DEFAULT_MODELS = [{
|
|
547
|
-
name: "qwen-plus",
|
|
548
|
-
capabilities: {
|
|
549
|
-
vision: false,
|
|
550
|
-
structuredOutput: true
|
|
551
|
-
}
|
|
552
|
-
}, {
|
|
553
|
-
name: "qwen-vl-plus",
|
|
554
|
-
capabilities: {
|
|
555
|
-
vision: true,
|
|
556
|
-
structuredOutput: true
|
|
557
|
-
}
|
|
558
|
-
}];
|
|
559
|
-
const DEFAULT_PROVIDER_CONFIG = {
|
|
560
|
-
baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
561
|
-
apiKey: "",
|
|
562
|
-
models: [...DEFAULT_MODELS]
|
|
563
|
-
};
|
|
564
|
-
const DEFAULT_PROMPT_CONFIG = {
|
|
565
|
-
systemTemplate: `You are a professional data extraction assistant. Your task is to extract structured data from text based on the data structure definition provided below.
|
|
566
|
-
|
|
567
|
-
{schema}
|
|
568
|
-
|
|
569
|
-
Extraction requirements:
|
|
570
|
-
1. Extract strictly according to the field names and types defined in the structure
|
|
571
|
-
2. If the text lacks information for a field, set that field to null
|
|
572
|
-
3. Do not add fields that do not exist in the structure definition
|
|
573
|
-
4. Maintain data accuracy and completeness`,
|
|
574
|
-
userTemplate: `Please extract data from the following text:
|
|
575
|
-
{text}`
|
|
576
|
-
};
|
|
577
|
-
const DEFAULT_EXTRACTION_CONFIG = { outputDir: ".aiex/extracted" };
|
|
578
|
-
const DEFAULT_AI_CONFIG = {
|
|
579
|
-
provider: DEFAULT_PROVIDER_CONFIG,
|
|
580
|
-
prompt: DEFAULT_PROMPT_CONFIG,
|
|
581
|
-
extraction: DEFAULT_EXTRACTION_CONFIG
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
//#endregion
|
|
585
|
-
//#region src/core/ai-extraction/config.ts
|
|
586
|
-
const CONFIG_FILE_NAME = "ai-config.json";
|
|
587
|
-
const GITIGNORE_FILE = ".gitignore";
|
|
588
|
-
async function readAIConfig(aiexDir) {
|
|
589
|
-
const configPath = path.join(aiexDir, CONFIG_FILE_NAME);
|
|
590
|
-
try {
|
|
591
|
-
const content = await fs.readFile(configPath, "utf-8");
|
|
592
|
-
const parsed = JSON.parse(content);
|
|
593
|
-
return AIConfigSchema.parse(parsed);
|
|
594
|
-
} catch {
|
|
595
|
-
return null;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
async function writeAIConfig(aiexDir, config) {
|
|
599
|
-
const configPath = path.join(aiexDir, CONFIG_FILE_NAME);
|
|
600
|
-
await fs.mkdir(aiexDir, { recursive: true });
|
|
601
|
-
await fs.writeFile(configPath, `${JSON.stringify(config, null, 2)}\n`);
|
|
602
|
-
await addToGitignore(aiexDir, CONFIG_FILE_NAME);
|
|
603
|
-
}
|
|
604
|
-
function getDefaultAIConfig() {
|
|
605
|
-
return { ...DEFAULT_AI_CONFIG };
|
|
606
|
-
}
|
|
607
|
-
function maskApiKey(apiKey) {
|
|
608
|
-
if (apiKey.length <= 4) return "****";
|
|
609
|
-
return `sk-***${apiKey.slice(-4)}`;
|
|
610
|
-
}
|
|
611
|
-
async function addToGitignore(aiexDir, fileName) {
|
|
612
|
-
const projectRoot = path.dirname(aiexDir);
|
|
613
|
-
const gitignorePath = path.join(projectRoot, GITIGNORE_FILE);
|
|
614
|
-
try {
|
|
615
|
-
const content = await fs.readFile(gitignorePath, "utf-8");
|
|
616
|
-
if (content.split("\n").some((line) => line.trim() === fileName || line.includes(".aiex/"))) return;
|
|
617
|
-
const newContent = content.endsWith("\n") ? `${content}${fileName}\n` : `${content}\n${fileName}\n`;
|
|
618
|
-
await fs.writeFile(gitignorePath, newContent);
|
|
619
|
-
} catch {
|
|
620
|
-
await fs.writeFile(gitignorePath, `${fileName}\n`);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
//#endregion
|
|
625
|
-
//#region src/doctor.ts
|
|
686
|
+
//#region src/core/doctor-collector.ts
|
|
626
687
|
const V1_SUFFIX_RE = /\/v1\/?$/;
|
|
627
688
|
async function checkConnection(baseURL) {
|
|
628
689
|
try {
|
|
@@ -708,4 +769,4 @@ async function collectDoctorDiagnostics(options = {}) {
|
|
|
708
769
|
}
|
|
709
770
|
|
|
710
771
|
//#endregion
|
|
711
|
-
export { doctorDiagnosticsTableRows as C, buildDoctorDiagnostics as S,
|
|
772
|
+
export { doctorDiagnosticsTableRows as C, buildDoctorDiagnostics as S, seedConfig as _, parseJsonSchema as a, package_default as b, getDefaultAIConfig as c, DEFAULT_MINERU_CONFIG as d, DEFAULT_PROMPT_CONFIG as f, createConfig as g, AIConfigSchema as h, JsonSchemaDefinitionSchema as i, readAIConfig as l, PLACEHOLDER_TEXT as m, createMigrationConfig as n, toSnakeCase as o, PLACEHOLDER_SCHEMA as p, generateDrizzleConfig as r, generateDrizzleSchema as s, collectDoctorDiagnostics as t, writeAIConfig as u, description as v, formatDoctorDiagnosticsJson as w, version as x, name as y };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ZodError, z } from "zod";
|
|
2
1
|
import Conf from "conf";
|
|
2
|
+
import { ZodError, z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/core/doctor.d.ts
|
|
5
5
|
interface DoctorDiagnostics {
|
|
@@ -60,6 +60,19 @@ declare function buildDoctorDiagnostics(input: {
|
|
|
60
60
|
declare function formatDoctorDiagnosticsJson(d: DoctorDiagnostics): string;
|
|
61
61
|
declare function doctorDiagnosticsTableRows(d: DoctorDiagnostics): [string, string][];
|
|
62
62
|
//#endregion
|
|
63
|
+
//#region src/config.d.ts
|
|
64
|
+
interface AppConfig {
|
|
65
|
+
name?: string;
|
|
66
|
+
version?: string;
|
|
67
|
+
}
|
|
68
|
+
declare function createConfig(): Conf<AppConfig>;
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/core/doctor-collector.d.ts
|
|
71
|
+
interface CollectDoctorDiagnosticsOptions {
|
|
72
|
+
config?: ReturnType<typeof createConfig>;
|
|
73
|
+
}
|
|
74
|
+
declare function collectDoctorDiagnostics(options?: CollectDoctorDiagnosticsOptions): Promise<DoctorDiagnostics>;
|
|
75
|
+
//#endregion
|
|
63
76
|
//#region src/core/schema-sqlite/types.d.ts
|
|
64
77
|
interface ParsedColumn {
|
|
65
78
|
name: string;
|
|
@@ -114,7 +127,6 @@ declare function createMigrationConfig(cwd: string): MigrationConfig;
|
|
|
114
127
|
declare function generateDrizzleConfig(): string;
|
|
115
128
|
//#endregion
|
|
116
129
|
//#region src/core/schema-sqlite/schemas.d.ts
|
|
117
|
-
|
|
118
130
|
declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
119
131
|
$schema: z.ZodOptional<z.ZodString>;
|
|
120
132
|
title: z.ZodString;
|
|
@@ -237,6 +249,7 @@ interface ForeignKeyRef {
|
|
|
237
249
|
column: string;
|
|
238
250
|
}
|
|
239
251
|
interface JsonSchemaProperty {
|
|
252
|
+
description?: string;
|
|
240
253
|
type: 'string' | 'integer' | 'number' | 'boolean' | 'object' | 'array' | 'null';
|
|
241
254
|
format?: string;
|
|
242
255
|
primary?: boolean;
|
|
@@ -265,17 +278,4 @@ type JsonSchemaDefinition = z.infer<typeof JsonSchemaDefinitionSchema>;
|
|
|
265
278
|
//#region src/core/schema-sqlite/parser.d.ts
|
|
266
279
|
declare function parseJsonSchema(schema: JsonSchemaDefinition): ParseResult;
|
|
267
280
|
//#endregion
|
|
268
|
-
//#region src/config.d.ts
|
|
269
|
-
interface AppConfig {
|
|
270
|
-
name?: string;
|
|
271
|
-
version?: string;
|
|
272
|
-
}
|
|
273
|
-
declare function createConfig(): Conf<AppConfig>;
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region src/doctor.d.ts
|
|
276
|
-
interface CollectDoctorDiagnosticsOptions {
|
|
277
|
-
config?: ReturnType<typeof createConfig>;
|
|
278
|
-
}
|
|
279
|
-
declare function collectDoctorDiagnostics(options?: CollectDoctorDiagnosticsOptions): Promise<DoctorDiagnostics>;
|
|
280
|
-
//#endregion
|
|
281
281
|
export { type DoctorDiagnostics, type JsonSchemaDefinition, JsonSchemaDefinitionSchema, type JsonSchemaProperty, type MigrationConfig, type ParseResult, type ParsedColumn, type ParsedRelation, type ParsedTable, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as doctorDiagnosticsTableRows, S as buildDoctorDiagnostics,
|
|
1
|
+
import { C as doctorDiagnosticsTableRows, S as buildDoctorDiagnostics, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics, w as formatDoctorDiagnosticsJson } from "./doctor-collector-DhiJrVw5.mjs";
|
|
2
2
|
|
|
3
3
|
export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
|
package/dist/table-schema.json
CHANGED
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"required": ["type"],
|
|
82
82
|
"additionalProperties": false,
|
|
83
83
|
"properties": {
|
|
84
|
+
"description": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Description of the column."
|
|
87
|
+
},
|
|
84
88
|
"type": {
|
|
85
89
|
"$ref": "#/$defs/columnType",
|
|
86
90
|
"description": "Column data type."
|