@profullstack/dbml 0.1.0 → 0.2.0
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/bin/dbml.js +5 -1
- package/package.json +1 -1
package/bin/dbml.js
CHANGED
|
@@ -195,7 +195,11 @@ async function main() {
|
|
|
195
195
|
}
|
|
196
196
|
case 'from-sql': {
|
|
197
197
|
const r = await call('POST', '/api/v1/sql-to-dbml', { sql: await readSource(file), dialect });
|
|
198
|
-
if (!r.ok)
|
|
198
|
+
if (!r.ok) {
|
|
199
|
+
printErrors(r.errors, file);
|
|
200
|
+
if (r.hint) console.error(`hint: that file looks like DBML, not SQL. Use: dbml to-sql ${file || '-'}`);
|
|
201
|
+
return 1;
|
|
202
|
+
}
|
|
199
203
|
process.stdout.write(json ? JSON.stringify(r, null, 2) + '\n' : r.dbml);
|
|
200
204
|
return 0;
|
|
201
205
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@profullstack/dbml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "CLI and MCP stdio bridge for dbml.db: validate, review and convert DBML database schemas (DBML to SQL and back) from the terminal or an AI agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|