aiex-cli 0.1.1-beta.2 → 0.1.1-beta.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/cli.mjs +2 -2
- package/dist/{generate-drizzle-schema-sZ01QiYJ.mjs → generate-drizzle-schema-BZ2FvHyR.mjs} +14 -10
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -1
- package/dist/table-schema.json +5 -5
- package/dist/web/assets/JsonSchemaEditor-3RNZpMrN.js +570 -0
- package/dist/web/assets/index-BPjoJ1T3.css +2 -0
- package/dist/web/assets/{index-7jWPnI_e.js → index-CaO28Qd9.js} +3 -3
- package/dist/web/assets/object-utils-DsuRi0p9.js +1 -0
- package/dist/web/index.html +3 -3
- package/package.json +1 -1
- package/dist/web/assets/JsonSchemaEditor-BywWmkGm.js +0 -571
- package/dist/web/assets/index-BiNFY3ky.css +0 -2
- package/dist/web/assets/object-utils-OmJ-hFrY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ft as e}from"./vue-i18n-Du42D0vb.js";var t={$schema:`http://json-schema.org/draft-07/schema#`,$id:`https://raw.githubusercontent.com/OSpoon/aiex-cli/main/app/cli/schemas/table-schema.json`,title:`aiex Table Schema`,description:`Defines an AIEX Drizzle-backed schema dialect file for schema-to-SQLite migration.`,type:`object`,required:[`title`,`type`,`table`,`properties`],additionalProperties:!1,properties:{$schema:{type:`string`,description:`Pointer to this schema file for IDE validation.`,format:`uri`,default:`https://raw.githubusercontent.com/OSpoon/aiex-cli/main/app/cli/schemas/table-schema.json`},title:{type:`string`,minLength:1,description:`Human-readable table title (e.g. 'User', 'OrderItem').`},description:{type:`string`,description:`Optional table description.`},type:{type:`string`,const:`object`,description:`Must be 'object' — each file defines one table.`},table:{$ref:`#/$defs/tableConfig`,description:`Table-level configuration.`},properties:{$ref:`#/$defs/properties`,description:`Column definitions keyed by property name (camelCase).`},required:{type:`array`,items:{type:`string`},description:`List of property names that are NOT NULL.`,default:[]},examples:{type:`array`,description:`Few-shot examples used by AI extraction prompts.`,items:{$ref:`#/$defs/examplePair`},default:[]}},$defs:{tableConfig:{type:`object`,required:[`name`],additionalProperties:!1,properties:{name:{type:`string`,minLength:1,pattern:`^[a-z][a-z0-9_]*$`,description:`SQLite table name in snake_case (lowercase letters, digits, underscores).`,examples:[`users`,`order_items`,`blog_posts`]},timestamps:{type:`boolean`,default:!1,description:`Automatically add created_at and updated_at TIMESTAMP columns.`},softDelete:{type:`boolean`,default:!1,description:`Automatically add deleted_at nullable TIMESTAMP column.`}}},properties:{type:`object`,minProperties:1,propertyNames:{type:`string`,pattern:`^[A-Za-z][A-Za-z0-9_]*$`},additionalProperties:{$ref:`#/$defs/property`},description:`Column definitions. Keys must start with a letter and contain only letters, digits, or underscores.`},property:{type:`object`,required:[`type`],additionalProperties:!1,properties:{description:{type:`string`,description:`Description of the column.`},type:{$ref:`#/$defs/columnType`,description:`Column data type.`},format:{$ref:`#/$defs/formatType`,description:`Semantic format hint that influences the SQLite column type.`},primary:{type:`boolean`,default:!1,description:`Mark this column as PRIMARY KEY. Only one per table.`},autoIncrement:{type:`boolean`,default:!1,description:`AUTO_INCREMENT for integer primary keys.`},unique:{type:`boolean`,default:!1,description:`Add UNIQUE constraint.`},default:{description:`Default value for the column. Type should match the column type.`},pattern:{type:`string`,description:`Regular expression guidance for extraction and validation. Not emitted as a SQLite constraint because SQLite has no portable built-in REGEXP support.`},enum:{type:`array`,items:{oneOf:[{type:`string`},{type:`number`}]},description:`Enumeration of allowed values for this field. Emitted as a SQLite CHECK constraint.`},examples:{type:`array`,description:`Example values for this field (injected into AI prompt).`,items:{}},xPrompt:{type:`string`,description:`Custom extraction instruction for this field, overrides the default AI prompt (prefixed with 'x-' to stay valid JSON Schema).`},minLength:{type:`integer`,minimum:0,description:`Minimum string length. Emitted as a SQLite CHECK constraint.`},maxLength:{type:`integer`,minimum:1,description:`Maximum string length. Emitted as a SQLite CHECK constraint.`},minimum:{type:`number`,description:`Minimum numeric value. Emitted as a SQLite CHECK constraint.`},maximum:{type:`number`,description:`Maximum numeric value. Emitted as a SQLite CHECK constraint.`},drizzle:{$ref:`#/$defs/drizzleConfig`,description:`Drizzle ORM specific overrides.`},nested:{$ref:`#/$defs/nestedConfig`,description:`Create a separate related table instead of embedding as JSON.`},foreignKey:{$ref:`#/$defs/foreignKeyRef`,description:`Foreign key reference to another table.`},properties:{$ref:`#/$defs/properties`,description:`Sub-properties when type is 'object'. Ignored unless nested.enabled or drizzle.mode='json'.`},items:{$ref:`#/$defs/property`,description:`Item schema when type is 'array'. Ignored unless items.nested.enabled.`},required:{type:`array`,items:{type:`string`},description:`Required sub-properties for nested objects.`}}},columnType:{type:`string`,enum:[`string`,`integer`,`number`,`boolean`,`object`,`array`,`null`],description:`Data type. Maps to SQLite as: string→TEXT, integer→INTEGER, number→REAL, boolean→INTEGER(boolean), object→TEXT(json), array→TEXT(json), null→TEXT.`},formatType:{type:`string`,enum:[`date-time`,`email`,`uri`,`json`],description:`Format hints: 'date-time' → INTEGER(timestamp), 'json' → TEXT(json), 'email'/'uri' → TEXT (no special mapping).`},drizzleConfig:{type:`object`,additionalProperties:!1,properties:{mode:{type:`string`,enum:[`json`,`timestamp`,`timestamp_ms`,`boolean`,`bigint`],description:`Override Drizzle column mode. 'json' stores as TEXT(json), 'timestamp'/'timestamp_ms' as INTEGER, 'boolean' as INTEGER(boolean), 'bigint' as INTEGER(bigint).`}}},examplePair:{type:`object`,required:[`text`,`output`],additionalProperties:!1,properties:{text:{type:`string`,minLength:1,description:`Source text example.`},output:{type:`object`,description:`Expected extracted output for the source text example.`}}},nestedConfig:{type:`object`,required:[`enabled`,`relation`],additionalProperties:!1,properties:{enabled:{type:`boolean`,const:!0,description:`Must be true to activate nested table creation.`},relation:{type:`string`,enum:[`has-one`,`has-many`],description:`'has-one' → one() relation, 'has-many' → many() relation. Only one level of nesting is supported.`}}},foreignKeyRef:{type:`object`,required:[`table`,`column`],additionalProperties:!1,properties:{table:{type:`string`,minLength:1,description:`Target table name (snake_case).`},column:{type:`string`,minLength:1,description:`Target column name in the referenced table.`}}}}},n=Object.prototype.hasOwnProperty;function r(e,t,n){for(n of e.keys())if(i(n,t))return n}function i(e,t){var a,o,s;if(e===t)return!0;if(e&&t&&(a=e.constructor)===t.constructor){if(a===Date)return e.getTime()===t.getTime();if(a===RegExp)return e.toString()===t.toString();if(a===Array){if((o=e.length)===t.length)for(;o--&&i(e[o],t[o]););return o===-1}if(a===Set){if(e.size!==t.size)return!1;for(o of e)if(s=o,s&&typeof s==`object`&&(s=r(t,s),!s)||!t.has(s))return!1;return!0}if(a===Map){if(e.size!==t.size)return!1;for(o of e)if(s=o[0],s&&typeof s==`object`&&(s=r(t,s),!s)||!i(o[1],t.get(s)))return!1;return!0}if(a===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(a===DataView){if((o=e.byteLength)===t.byteLength)for(;o--&&e.getInt8(o)===t.getInt8(o););return o===-1}if(ArrayBuffer.isView(e)){if((o=e.byteLength)===t.byteLength)for(;o--&&e[o]===t[o];);return o===-1}if(!a||typeof e==`object`){for(a in o=0,e)if(n.call(e,a)&&++o&&!n.call(t,a)||!(a in t)||!i(e[a],t[a]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}function a(t){let n=e(t);try{return structuredClone(n)}catch{return JSON.parse(JSON.stringify(n))}}function o(e,t){return i(e,t)}export{o as n,t as r,a as t};
|
package/dist/web/index.html
CHANGED
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
if (dark) document.documentElement.classList.add("jscb-dark")
|
|
17
17
|
})()
|
|
18
18
|
</script>
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
19
|
+
<script type="module" crossorigin src="/assets/index-CaO28Qd9.js"></script>
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-DWTEM3RW.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/chunk-DtRyYLXJ.js">
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/vue-i18n-Du42D0vb.js">
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/assets/object-utils-
|
|
23
|
+
<link rel="modulepreload" crossorigin href="/assets/object-utils-DsuRi0p9.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/api-client-CpqFbcyH.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/dialog-CnZ7jH1l.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/dist-CElVIpns.js">
|
|
27
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
27
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BPjoJ1T3.css">
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
|
30
30
|
<div id="app"></div>
|