@dbml/cli 8.0.0-alpha.0 → 8.0.0-alpha.1
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/__tests__/db2dbml/mssql/dbml-error.log +30 -0
- package/__tests__/db2dbml/mysql/dbml-error.log +39 -0
- package/__tests__/db2dbml/oracle/dbml-error.log +42 -0
- package/__tests__/db2dbml/postgres/dbml-error.log +21 -0
- package/__tests__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filename --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/syntax-error/dbml-error.log +21 -0
- package/__tests__/dbml2sql/syntax-error/stdout.txt +2 -2
- package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log +18 -0
- package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/dbml-error.log +18 -0
- package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log +18 -0
- package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log +18 -0
- package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log +18 -0
- package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log +18 -0
- package/__tests__/sql2dbml/syntax-error/dbml-error.log +11 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +11 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +11 -0
- package/lib/index.js +3 -4
- package/package.json +2 -2
- package/src/cli/export.ts +3 -4
- package/src/helpers/logger.ts +2 -4
|
@@ -328,3 +328,33 @@ ConnectionError: Login failed for user 'SA'.
|
|
|
328
328
|
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
329
329
|
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
330
330
|
|
|
331
|
+
2026-05-06T08:11:36.669Z
|
|
332
|
+
ConnectionError: Login failed for user 'SA'.
|
|
333
|
+
at /home/huydna/projects/dbml/node_modules/mssql/lib/tedious/connection-pool.js:85:17
|
|
334
|
+
at Connection.onConnect (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:849:9)
|
|
335
|
+
at Object.onceWrapper (node:events:623:26)
|
|
336
|
+
at Connection.emit (node:events:508:28)
|
|
337
|
+
at Connection.emit (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:970:18)
|
|
338
|
+
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
339
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
340
|
+
|
|
341
|
+
2026-05-06T08:14:33.007Z
|
|
342
|
+
ConnectionError: Login failed for user 'SA'.
|
|
343
|
+
at /home/huydna/projects/dbml/node_modules/mssql/lib/tedious/connection-pool.js:85:17
|
|
344
|
+
at Connection.onConnect (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:849:9)
|
|
345
|
+
at Object.onceWrapper (node:events:634:26)
|
|
346
|
+
at Connection.emit (node:events:519:28)
|
|
347
|
+
at Connection.emit (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:970:18)
|
|
348
|
+
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
349
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
350
|
+
|
|
351
|
+
2026-05-06T08:18:07.404Z
|
|
352
|
+
ConnectionError: Login failed for user 'SA'.
|
|
353
|
+
at /home/huydna/projects/dbml/node_modules/mssql/lib/tedious/connection-pool.js:85:17
|
|
354
|
+
at Connection.onConnect (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:849:9)
|
|
355
|
+
at Object.onceWrapper (node:events:634:26)
|
|
356
|
+
at Connection.emit (node:events:519:28)
|
|
357
|
+
at Connection.emit (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:970:18)
|
|
358
|
+
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
359
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
360
|
+
|
|
@@ -427,3 +427,42 @@ Error: Unknown database 'dbml_test'
|
|
|
427
427
|
at Object..js (node:internal/modules/cjs/loader:1893:10)
|
|
428
428
|
at Module.load (node:internal/modules/cjs/loader:1481:32)
|
|
429
429
|
|
|
430
|
+
2026-05-06T08:11:37.806Z
|
|
431
|
+
Error: Unknown database 'dbml_test'
|
|
432
|
+
at c (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:47740)
|
|
433
|
+
at Fr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:52036)
|
|
434
|
+
at Xr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3360:500)
|
|
435
|
+
at Module.Hi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3739:1082)
|
|
436
|
+
at connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:55)
|
|
437
|
+
at Module.db2dbml (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1396:2)
|
|
438
|
+
at Object.<anonymous> (/home/huydna/projects/dbml/packages/dbml-cli/bin/db2dbml.js:3:19)
|
|
439
|
+
at Module._compile (node:internal/modules/cjs/loader:1761:14)
|
|
440
|
+
at Object..js (node:internal/modules/cjs/loader:1893:10)
|
|
441
|
+
at Module.load (node:internal/modules/cjs/loader:1481:32)
|
|
442
|
+
|
|
443
|
+
2026-05-06T08:14:34.165Z
|
|
444
|
+
Error: Unknown database 'dbml_test'
|
|
445
|
+
at c (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:47740)
|
|
446
|
+
at Fr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:52036)
|
|
447
|
+
at Xr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3360:500)
|
|
448
|
+
at Module.Hi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3739:1082)
|
|
449
|
+
at connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:55)
|
|
450
|
+
at Module.db2dbml (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1394:2)
|
|
451
|
+
at Object.<anonymous> (/home/huydna/projects/dbml/packages/dbml-cli/bin/db2dbml.js:3:19)
|
|
452
|
+
at Module._compile (node:internal/modules/cjs/loader:1706:14)
|
|
453
|
+
at Object..js (node:internal/modules/cjs/loader:1839:10)
|
|
454
|
+
at Module.load (node:internal/modules/cjs/loader:1441:32)
|
|
455
|
+
|
|
456
|
+
2026-05-06T08:18:08.591Z
|
|
457
|
+
Error: Unknown database 'dbml_test'
|
|
458
|
+
at c (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:47740)
|
|
459
|
+
at Fr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:52036)
|
|
460
|
+
at Xr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3360:500)
|
|
461
|
+
at Module.Hi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3739:1082)
|
|
462
|
+
at connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1168:55)
|
|
463
|
+
at Module.db2dbml (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1392:2)
|
|
464
|
+
at Object.<anonymous> (/home/huydna/projects/dbml/packages/dbml-cli/bin/db2dbml.js:3:19)
|
|
465
|
+
at Module._compile (node:internal/modules/cjs/loader:1706:14)
|
|
466
|
+
at Object..js (node:internal/modules/cjs/loader:1839:10)
|
|
467
|
+
at Module.load (node:internal/modules/cjs/loader:1441:32)
|
|
468
|
+
|
|
@@ -460,3 +460,45 @@ connect ECONNREFUSED 127.0.0.1:1521
|
|
|
460
460
|
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
461
461
|
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
462
462
|
|
|
463
|
+
2026-05-06T08:11:39.015Z
|
|
464
|
+
Error: NJS-503: connection to host 127.0.0.1 port 1521 could not be established. (CONNECTION_ID=1PgmNfi7ao5V4sMPe+LGwA==)
|
|
465
|
+
connect ECONNREFUSED 127.0.0.1:1521
|
|
466
|
+
at Object.throwErr (/home/huydna/projects/dbml/node_modules/oracledb/lib/errors.js:776:10)
|
|
467
|
+
at NTTCP.ntConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:206:16)
|
|
468
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
469
|
+
at async NTTCP.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:222:7)
|
|
470
|
+
at async NetworkSession.transportConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:182:5)
|
|
471
|
+
at async NetworkSession.connect2 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:222:7)
|
|
472
|
+
at async NetworkSession.connect1 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:336:23)
|
|
473
|
+
at async NetworkSession.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:623:5)
|
|
474
|
+
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
475
|
+
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
476
|
+
|
|
477
|
+
2026-05-06T08:14:35.329Z
|
|
478
|
+
Error: NJS-503: connection to host 127.0.0.1 port 1521 could not be established. (CONNECTION_ID=g65tB2p9Tu0dZmQHLQ4ckA==)
|
|
479
|
+
connect ECONNREFUSED 127.0.0.1:1521
|
|
480
|
+
at Object.throwErr (/home/huydna/projects/dbml/node_modules/oracledb/lib/errors.js:776:10)
|
|
481
|
+
at NTTCP.ntConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:206:16)
|
|
482
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
483
|
+
at async NTTCP.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:222:7)
|
|
484
|
+
at async NetworkSession.transportConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:182:5)
|
|
485
|
+
at async NetworkSession.connect2 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:222:7)
|
|
486
|
+
at async NetworkSession.connect1 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:336:23)
|
|
487
|
+
at async NetworkSession.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:623:5)
|
|
488
|
+
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
489
|
+
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
490
|
+
|
|
491
|
+
2026-05-06T08:18:09.760Z
|
|
492
|
+
Error: NJS-503: connection to host 127.0.0.1 port 1521 could not be established. (CONNECTION_ID=4lgiAlunfRIkmHSJUH/yAg==)
|
|
493
|
+
connect ECONNREFUSED 127.0.0.1:1521
|
|
494
|
+
at Object.throwErr (/home/huydna/projects/dbml/node_modules/oracledb/lib/errors.js:776:10)
|
|
495
|
+
at NTTCP.ntConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:206:16)
|
|
496
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
497
|
+
at async NTTCP.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:222:7)
|
|
498
|
+
at async NetworkSession.transportConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:182:5)
|
|
499
|
+
at async NetworkSession.connect2 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:222:7)
|
|
500
|
+
at async NetworkSession.connect1 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:336:23)
|
|
501
|
+
at async NetworkSession.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:623:5)
|
|
502
|
+
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
503
|
+
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
504
|
+
|
|
@@ -229,3 +229,24 @@ Error: PostgreSQL connection error: error: role "dbml" does not exist
|
|
|
229
229
|
at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
230
230
|
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1168:22)
|
|
231
231
|
|
|
232
|
+
2026-05-06T08:11:40.136Z
|
|
233
|
+
Error: PostgreSQL connection error: error: role "dbml" does not exist
|
|
234
|
+
at vi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
|
|
235
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
236
|
+
at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
237
|
+
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:22)
|
|
238
|
+
|
|
239
|
+
2026-05-06T08:14:36.467Z
|
|
240
|
+
Error: PostgreSQL connection error: error: role "dbml" does not exist
|
|
241
|
+
at vi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
|
|
242
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
243
|
+
at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
244
|
+
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:22)
|
|
245
|
+
|
|
246
|
+
2026-05-06T08:18:10.912Z
|
|
247
|
+
Error: PostgreSQL connection error: error: role "dbml" does not exist
|
|
248
|
+
at vi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
|
|
249
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
250
|
+
at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
251
|
+
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1168:22)
|
|
252
|
+
|
|
@@ -100,3 +100,24 @@ undefined
|
|
|
100
100
|
2026-05-04T17:07:43.156Z
|
|
101
101
|
undefined
|
|
102
102
|
|
|
103
|
+
2026-05-06T08:10:56.542Z
|
|
104
|
+
|
|
105
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
106
|
+
ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
|
|
107
|
+
|
|
108
|
+
2026-05-06T08:13:50.647Z
|
|
109
|
+
|
|
110
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
111
|
+
ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:16:15.497Z
|
|
114
|
+
|
|
115
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
116
|
+
ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
|
|
117
|
+
|
|
118
|
+
2026-05-06T08:17:23.525Z
|
|
119
|
+
undefined
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:18:39.956Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
ERROR:
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
3
|
+
ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
|
|
4
4
|
|
|
5
5
|
A complete log can be found in:
|
package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log
CHANGED
|
@@ -106,3 +106,21 @@ undefined
|
|
|
106
106
|
2026-05-04T17:07:44.529Z
|
|
107
107
|
undefined
|
|
108
108
|
|
|
109
|
+
2026-05-06T08:10:57.871Z
|
|
110
|
+
|
|
111
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:13:52.010Z
|
|
114
|
+
|
|
115
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
116
|
+
|
|
117
|
+
2026-05-06T08:16:16.922Z
|
|
118
|
+
|
|
119
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:17:24.977Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
124
|
+
2026-05-06T08:18:41.350Z
|
|
125
|
+
undefined
|
|
126
|
+
|
|
@@ -106,3 +106,21 @@ undefined
|
|
|
106
106
|
2026-05-04T17:07:45.891Z
|
|
107
107
|
undefined
|
|
108
108
|
|
|
109
|
+
2026-05-06T08:10:59.190Z
|
|
110
|
+
|
|
111
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:13:53.393Z
|
|
114
|
+
|
|
115
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
116
|
+
|
|
117
|
+
2026-05-06T08:16:18.290Z
|
|
118
|
+
|
|
119
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:17:26.368Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
124
|
+
2026-05-06T08:18:42.669Z
|
|
125
|
+
undefined
|
|
126
|
+
|
package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log
CHANGED
|
@@ -106,3 +106,21 @@ undefined
|
|
|
106
106
|
2026-05-04T17:07:47.280Z
|
|
107
107
|
undefined
|
|
108
108
|
|
|
109
|
+
2026-05-06T08:11:00.558Z
|
|
110
|
+
|
|
111
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:13:54.748Z
|
|
114
|
+
|
|
115
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
116
|
+
|
|
117
|
+
2026-05-06T08:16:19.649Z
|
|
118
|
+
|
|
119
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:17:27.721Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
124
|
+
2026-05-06T08:18:44.046Z
|
|
125
|
+
undefined
|
|
126
|
+
|
package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log
CHANGED
|
@@ -106,3 +106,21 @@ undefined
|
|
|
106
106
|
2026-05-04T17:07:48.660Z
|
|
107
107
|
undefined
|
|
108
108
|
|
|
109
|
+
2026-05-06T08:11:01.868Z
|
|
110
|
+
|
|
111
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:13:56.089Z
|
|
114
|
+
|
|
115
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
116
|
+
|
|
117
|
+
2026-05-06T08:16:21.046Z
|
|
118
|
+
|
|
119
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:17:29.142Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
124
|
+
2026-05-06T08:18:45.383Z
|
|
125
|
+
undefined
|
|
126
|
+
|
package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log
CHANGED
|
@@ -106,3 +106,21 @@ undefined
|
|
|
106
106
|
2026-05-04T17:07:49.994Z
|
|
107
107
|
undefined
|
|
108
108
|
|
|
109
|
+
2026-05-06T08:11:03.157Z
|
|
110
|
+
|
|
111
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:13:57.435Z
|
|
114
|
+
|
|
115
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
116
|
+
|
|
117
|
+
2026-05-06T08:16:22.365Z
|
|
118
|
+
|
|
119
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:17:30.519Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
124
|
+
2026-05-06T08:18:46.726Z
|
|
125
|
+
undefined
|
|
126
|
+
|
package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log
CHANGED
|
@@ -106,3 +106,21 @@ undefined
|
|
|
106
106
|
2026-05-04T17:07:51.317Z
|
|
107
107
|
undefined
|
|
108
108
|
|
|
109
|
+
2026-05-06T08:11:04.457Z
|
|
110
|
+
|
|
111
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
112
|
+
|
|
113
|
+
2026-05-06T08:13:58.756Z
|
|
114
|
+
|
|
115
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
116
|
+
|
|
117
|
+
2026-05-06T08:16:23.709Z
|
|
118
|
+
|
|
119
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
120
|
+
|
|
121
|
+
2026-05-06T08:17:31.997Z
|
|
122
|
+
undefined
|
|
123
|
+
|
|
124
|
+
2026-05-06T08:18:48.105Z
|
|
125
|
+
undefined
|
|
126
|
+
|
|
@@ -100,3 +100,14 @@ undefined
|
|
|
100
100
|
2026-05-04T17:08:20.676Z
|
|
101
101
|
undefined
|
|
102
102
|
|
|
103
|
+
2026-05-06T08:11:32.725Z
|
|
104
|
+
|
|
105
|
+
You have a syntax error at "business.sql" line 6 column 2. no viable alternative at input 'CREATE TABLE `staff` (\n `id` int PRIMARY KEY,\n `first_name` varchar(255),\n `last_name` varchar(255),\n `address_id` int\n `picture`'
|
|
106
|
+
|
|
107
|
+
2026-05-06T08:14:29.008Z
|
|
108
|
+
|
|
109
|
+
You have a syntax error at "business.sql" line 6 column 2. no viable alternative at input 'CREATE TABLE `staff` (\n `id` int PRIMARY KEY,\n `first_name` varchar(255),\n `last_name` varchar(255),\n `address_id` int\n `picture`'
|
|
110
|
+
|
|
111
|
+
2026-05-06T08:18:03.492Z
|
|
112
|
+
undefined
|
|
113
|
+
|
|
@@ -97,3 +97,14 @@ undefined
|
|
|
97
97
|
2026-05-04T17:07:07.077Z
|
|
98
98
|
undefined
|
|
99
99
|
|
|
100
|
+
2026-05-06T08:11:34.178Z
|
|
101
|
+
|
|
102
|
+
You have a syntax error at "schema.sql" line 1 column 1. Reference with the same endpoints already exists: "student"("subject_id", "score_id") references "score_subject"("subject_id", "score_id")
|
|
103
|
+
|
|
104
|
+
2026-05-06T08:14:30.449Z
|
|
105
|
+
|
|
106
|
+
You have a syntax error at "schema.sql" line 1 column 1. Reference with the same endpoints already exists: "student"("subject_id", "score_id") references "score_subject"("subject_id", "score_id")
|
|
107
|
+
|
|
108
|
+
2026-05-06T08:18:04.905Z
|
|
109
|
+
undefined
|
|
110
|
+
|
|
@@ -97,3 +97,14 @@ undefined
|
|
|
97
97
|
2026-05-04T17:07:08.426Z
|
|
98
98
|
undefined
|
|
99
99
|
|
|
100
|
+
2026-05-06T08:11:35.478Z
|
|
101
|
+
|
|
102
|
+
You have a syntax error at "schema.sql" line 1 column 1. Reference with the same endpoints already exists: "student"("subject_id", "score_id") references "score_subject"("subject_id", "score_id")
|
|
103
|
+
|
|
104
|
+
2026-05-06T08:14:31.766Z
|
|
105
|
+
|
|
106
|
+
You have a syntax error at "schema.sql" line 1 column 1. Reference with the same endpoints already exists: "student"("subject_id", "score_id") references "score_subject"("subject_id", "score_id")
|
|
107
|
+
|
|
108
|
+
2026-05-06T08:18:06.210Z
|
|
109
|
+
undefined
|
|
110
|
+
|
package/lib/index.js
CHANGED
|
@@ -36,7 +36,7 @@ let __dbml_parse = require("@dbml/parse");
|
|
|
36
36
|
let node_fs = require("node:fs");
|
|
37
37
|
const $schema = "https://json.schemastore.org/package";
|
|
38
38
|
const name = "@dbml/cli";
|
|
39
|
-
const version = "8.0.0-alpha.
|
|
39
|
+
const version = "8.0.0-alpha.1";
|
|
40
40
|
const description = "";
|
|
41
41
|
const main = "lib/index.js";
|
|
42
42
|
const license = "Apache-2.0";
|
|
@@ -75,7 +75,7 @@ const dependencies = {
|
|
|
75
75
|
"strip-ansi": "^5.2.0",
|
|
76
76
|
"winston": "^3.2.1"
|
|
77
77
|
};
|
|
78
|
-
const gitHead = "
|
|
78
|
+
const gitHead = "9c741ec1eb685be6f319c263a9a86628b241b2c4";
|
|
79
79
|
const engines = { "node": ">=18" };
|
|
80
80
|
var package_default = {
|
|
81
81
|
$schema,
|
|
@@ -1285,8 +1285,7 @@ async function exportHandler(program$1) {
|
|
|
1285
1285
|
const pos = e.nodeOrToken.startPos;
|
|
1286
1286
|
const line = pos.line + 1;
|
|
1287
1287
|
const col = pos.column + 1;
|
|
1288
|
-
|
|
1289
|
-
return `You have a syntax error at "${e.filepath.basename}" line ${line} column ${col}. ${e.message}`;
|
|
1288
|
+
return `${chalk.default.cyan(isMultifile ? e.filepath.relativeTo(process.cwd()) : e.filepath.basename)}${chalk.default.yellow(`(${line},${col})`)}: ${e.message}`;
|
|
1290
1289
|
}).join("\n ")}`);
|
|
1291
1290
|
continue;
|
|
1292
1291
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/cli",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.1",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"strip-ansi": "^5.2.0",
|
|
46
46
|
"winston": "^3.2.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9c741ec1eb685be6f319c263a9a86628b241b2c4",
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=18"
|
|
51
51
|
}
|
package/src/cli/export.ts
CHANGED
|
@@ -62,10 +62,9 @@ export default async function exportHandler (program: Command): Promise<void> {
|
|
|
62
62
|
const pos = e.nodeOrToken.startPos;
|
|
63
63
|
const line = pos.line + 1;
|
|
64
64
|
const col = pos.column + 1;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
return `You have a syntax error at "${e.filepath.basename}" line ${line} column ${col}. ${e.message}`;
|
|
65
|
+
const location = chalk.cyan(isMultifile ? e.filepath.relativeTo(process.cwd()) : e.filepath.basename);
|
|
66
|
+
const position = chalk.yellow(`(${line},${col})`);
|
|
67
|
+
return `${location}${position}: ${e.message}`;
|
|
69
68
|
})
|
|
70
69
|
.join('\n ')}`,
|
|
71
70
|
);
|
package/src/helpers/logger.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
+
import stripAnsi from 'strip-ansi';
|
|
3
4
|
import {
|
|
4
5
|
createLogger, format, transports,
|
|
5
6
|
} from 'winston';
|
|
@@ -20,10 +21,7 @@ const consoleFormat = printf((info) => {
|
|
|
20
21
|
const fileFormat = printf((info) => {
|
|
21
22
|
const {
|
|
22
23
|
timestamp: ts, stack, rootError,
|
|
23
|
-
} = info as
|
|
24
|
-
stack?: string;
|
|
25
|
-
rootError?: { stack?: string;
|
|
26
|
-
location?: unknown; }; };
|
|
24
|
+
} = info as any;
|
|
27
25
|
let logContent = `${ts}\n${stack}\n`;
|
|
28
26
|
if (rootError) {
|
|
29
27
|
logContent += '\nROOT_ERROR:';
|