@dbml/cli 8.0.0-alpha.3 → 8.0.0-alpha.5

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.
Files changed (28) hide show
  1. package/__tests__/db2dbml/mssql/dbml-error.log +10 -0
  2. package/__tests__/db2dbml/mysql/dbml-error.log +13 -0
  3. package/__tests__/db2dbml/oracle/dbml-error.log +14 -0
  4. package/__tests__/db2dbml/postgres/dbml-error.log +14 -0
  5. package/__tests__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +1 -1
  6. package/__tests__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +1 -1
  7. package/__tests__/dbml2sql/filename --out-file/out-files/schema.sql +1 -1
  8. package/__tests__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +1 -1
  9. package/__tests__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +1 -1
  10. package/__tests__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +1 -1
  11. package/__tests__/dbml2sql/filenames --out-file/out-files/schema.sql +1 -1
  12. package/__tests__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +1 -1
  13. package/__tests__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +1 -1
  14. package/__tests__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +1 -1
  15. package/__tests__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +1 -1
  16. package/__tests__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +1 -1
  17. package/__tests__/dbml2sql/syntax-error/dbml-error.log +5 -0
  18. package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log +4 -0
  19. package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/dbml-error.log +4 -0
  20. package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log +4 -0
  21. package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log +4 -0
  22. package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log +4 -0
  23. package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log +4 -0
  24. package/__tests__/sql2dbml/syntax-error/dbml-error.log +4 -0
  25. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +4 -0
  26. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +4 -0
  27. package/lib/index.js +4 -4
  28. package/package.json +4 -4
@@ -358,3 +358,13 @@ ConnectionError: Login failed for user 'SA'.
358
358
  at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
359
359
  at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
360
360
 
361
+ 2026-05-06T10:17:43.520Z
362
+ ConnectionError: Login failed for user 'SA'.
363
+ at /home/huydna/projects/dbml/node_modules/mssql/lib/tedious/connection-pool.js:85:17
364
+ at Connection.onConnect (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:849:9)
365
+ at Object.onceWrapper (node:events:634:26)
366
+ at Connection.emit (node:events:519:28)
367
+ at Connection.emit (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:970:18)
368
+ at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
369
+ at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
370
+
@@ -466,3 +466,16 @@ Error: Unknown database 'dbml_test'
466
466
  at Object..js (node:internal/modules/cjs/loader:1839:10)
467
467
  at Module.load (node:internal/modules/cjs/loader:1441:32)
468
468
 
469
+ 2026-05-06T10:17:44.739Z
470
+ Error: Unknown database 'dbml_test'
471
+ at c (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:47740)
472
+ at Fr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:52036)
473
+ at Xr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3360:500)
474
+ at Module.Hi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3739:1082)
475
+ at connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:55)
476
+ at Module.db2dbml (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1394:2)
477
+ at Object.<anonymous> (/home/huydna/projects/dbml/packages/dbml-cli/bin/db2dbml.js:3:19)
478
+ at Module._compile (node:internal/modules/cjs/loader:1706:14)
479
+ at Object..js (node:internal/modules/cjs/loader:1839:10)
480
+ at Module.load (node:internal/modules/cjs/loader:1441:32)
481
+
@@ -502,3 +502,17 @@ connect ECONNREFUSED 127.0.0.1:1521
502
502
  at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
503
503
  at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
504
504
 
505
+ 2026-05-06T10:17:45.991Z
506
+ Error: NJS-503: connection to host 127.0.0.1 port 1521 could not be established. (CONNECTION_ID=KhaaLMFAF4Xr6LtuRWS10w==)
507
+ connect ECONNREFUSED 127.0.0.1:1521
508
+ at Object.throwErr (/home/huydna/projects/dbml/node_modules/oracledb/lib/errors.js:776:10)
509
+ at NTTCP.ntConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:206:16)
510
+ at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
511
+ at async NTTCP.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:222:7)
512
+ at async NetworkSession.transportConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:182:5)
513
+ at async NetworkSession.connect2 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:222:7)
514
+ at async NetworkSession.connect1 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:336:23)
515
+ at async NetworkSession.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:623:5)
516
+ at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
517
+ at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
518
+
@@ -250,3 +250,17 @@ Error: PostgreSQL connection error: error: role "dbml" does not exist
250
250
  at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
251
251
  at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1168:22)
252
252
 
253
+ 2026-05-06T08:32:33.059Z
254
+ Error: PostgreSQL connection error: error: role "dbml" does not exist
255
+ at vi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
256
+ at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
257
+ at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
258
+ at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:22)
259
+
260
+ 2026-05-06T10:17:47.199Z
261
+ Error: PostgreSQL connection error: error: role "dbml" does not exist
262
+ at vi (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
263
+ at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
264
+ at async Di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
265
+ at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:1170:22)
266
+
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: MySQL
3
- -- Generated at: 2026-05-06T08:31:23.581Z
3
+ -- Generated at: 2026-05-06T10:16:33.450Z
4
4
 
5
5
  CREATE TABLE `orders` (
6
6
  `id` int PRIMARY KEY AUTO_INCREMENT,
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: Oracle
3
- -- Generated at: 2026-05-06T08:31:26.282Z
3
+ -- Generated at: 2026-05-06T10:16:35.997Z
4
4
 
5
5
  CREATE TABLE "orders" (
6
6
  "id" int GENERATED AS IDENTITY PRIMARY KEY,
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: PostgreSQL
3
- -- Generated at: 2026-05-06T08:31:29.132Z
3
+ -- Generated at: 2026-05-06T10:16:38.485Z
4
4
 
5
5
  CREATE TYPE "orders_status" AS ENUM (
6
6
  'created',
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: PostgreSQL
3
- -- Generated at: 2026-05-06T08:31:30.402Z
3
+ -- Generated at: 2026-05-06T10:16:39.793Z
4
4
 
5
5
  CREATE TYPE "orders_status" AS ENUM (
6
6
  'created',
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: MySQL
3
- -- Generated at: 2026-05-06T08:31:34.430Z
3
+ -- Generated at: 2026-05-06T10:16:43.575Z
4
4
 
5
5
  CREATE TABLE `staff` (
6
6
  `id` int PRIMARY KEY,
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: Oracle
3
- -- Generated at: 2026-05-06T08:31:36.960Z
3
+ -- Generated at: 2026-05-06T10:16:45.999Z
4
4
 
5
5
  CREATE TABLE "staff" (
6
6
  "id" int PRIMARY KEY,
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: PostgreSQL
3
- -- Generated at: 2026-05-06T08:31:39.551Z
3
+ -- Generated at: 2026-05-06T10:16:48.454Z
4
4
 
5
5
  CREATE TABLE "staff" (
6
6
  "id" int PRIMARY KEY,
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: PostgreSQL
3
- -- Generated at: 2026-05-06T08:31:40.820Z
3
+ -- Generated at: 2026-05-06T10:16:49.698Z
4
4
 
5
5
  CREATE TABLE "staff" (
6
6
  "id" int PRIMARY KEY,
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: SQL Server
3
- -- Generated at: 2026-05-06T08:31:45.929Z
3
+ -- Generated at: 2026-05-06T10:16:55.732Z
4
4
 
5
5
  CREATE SCHEMA [schemaB]
6
6
  GO
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: MySQL
3
- -- Generated at: 2026-05-06T08:31:47.173Z
3
+ -- Generated at: 2026-05-06T10:16:56.929Z
4
4
 
5
5
  CREATE SCHEMA `schemaB`;
6
6
 
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: Oracle
3
- -- Generated at: 2026-05-06T08:31:48.501Z
3
+ -- Generated at: 2026-05-06T10:16:58.141Z
4
4
 
5
5
  CREATE USER "C##test01"
6
6
  NO AUTHENTICATION
@@ -1,6 +1,6 @@
1
1
  -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
2
  -- Database: PostgreSQL
3
- -- Generated at: 2026-05-06T08:31:49.885Z
3
+ -- Generated at: 2026-05-06T10:16:59.320Z
4
4
 
5
5
  CREATE SCHEMA "schemaB";
6
6
 
@@ -126,3 +126,8 @@ undefined
126
126
  ecommerce.dbml(17,24): Expect an identifier
127
127
  ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
128
128
 
129
+ 2026-05-06T10:17:00.549Z
130
+
131
+ ecommerce.dbml(17,24): Expect an identifier
132
+ ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
133
+
@@ -128,3 +128,7 @@ undefined
128
128
 
129
129
  You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
130
130
 
131
+ 2026-05-06T10:17:02.003Z
132
+
133
+ You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
134
+
@@ -128,3 +128,7 @@ undefined
128
128
 
129
129
  You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
130
130
 
131
+ 2026-05-06T10:17:03.429Z
132
+
133
+ You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
134
+
@@ -128,3 +128,7 @@ undefined
128
128
 
129
129
  You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
130
130
 
131
+ 2026-05-06T10:17:04.922Z
132
+
133
+ You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
134
+
@@ -128,3 +128,7 @@ undefined
128
128
 
129
129
  You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
130
130
 
131
+ 2026-05-06T10:17:06.468Z
132
+
133
+ You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
134
+
@@ -128,3 +128,7 @@ undefined
128
128
 
129
129
  You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
130
130
 
131
+ 2026-05-06T10:17:07.902Z
132
+
133
+ You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
134
+
@@ -128,3 +128,7 @@ undefined
128
128
 
129
129
  You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
130
130
 
131
+ 2026-05-06T10:17:09.292Z
132
+
133
+ You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
134
+
@@ -115,3 +115,7 @@ undefined
115
115
 
116
116
  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`'
117
117
 
118
+ 2026-05-06T10:17:39.447Z
119
+
120
+ 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`'
121
+
@@ -112,3 +112,7 @@ undefined
112
112
 
113
113
  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")
114
114
 
115
+ 2026-05-06T10:17:40.917Z
116
+
117
+ 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")
118
+
@@ -108,3 +108,7 @@ undefined
108
108
  2026-05-06T08:18:06.210Z
109
109
  undefined
110
110
 
111
+ 2026-05-06T10:17:42.282Z
112
+
113
+ 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")
114
+
package/lib/index.js CHANGED
@@ -38,7 +38,7 @@ let __dbml_parse = require("@dbml/parse");
38
38
  let node_fs = require("node:fs");
39
39
  const $schema = "https://json.schemastore.org/package";
40
40
  const name = "@dbml/cli";
41
- const version = "8.0.0-alpha.3";
41
+ const version = "8.0.0-alpha.5";
42
42
  const description = "";
43
43
  const main = "lib/index.js";
44
44
  const license = "Apache-2.0";
@@ -65,8 +65,8 @@ const keywords = ["dbml", "dbml-cli"];
65
65
  const dependencies = {
66
66
  "@babel/cli": "^7.21.0",
67
67
  "@dbml/connector": "^8.0.0-alpha.0",
68
- "@dbml/core": "^8.0.0-alpha.0",
69
- "@dbml/parse": "^8.0.0-alpha.0",
68
+ "@dbml/core": "^8.0.0-alpha.5",
69
+ "@dbml/parse": "^8.0.0-alpha.5",
70
70
  "bluebird": "^3.5.5",
71
71
  "chalk": "^2.4.2",
72
72
  "commander": "^2.20.0",
@@ -77,7 +77,7 @@ const dependencies = {
77
77
  "strip-ansi": "^5.2.0",
78
78
  "winston": "^3.2.1"
79
79
  };
80
- const gitHead = "55f87cb7b6c94255df93d5f486b4630b4cff9542";
80
+ const gitHead = "2e6795b120c2ca4f16bb542295b2152f091d6ed9";
81
81
  const engines = { "node": ">=18" };
82
82
  var package_default = {
83
83
  $schema,
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.3",
4
+ "version": "8.0.0-alpha.5",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "license": "Apache-2.0",
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@babel/cli": "^7.21.0",
35
35
  "@dbml/connector": "^8.0.0-alpha.0",
36
- "@dbml/core": "^8.0.0-alpha.0",
37
- "@dbml/parse": "^8.0.0-alpha.0",
36
+ "@dbml/core": "^8.0.0-alpha.5",
37
+ "@dbml/parse": "^8.0.0-alpha.5",
38
38
  "bluebird": "^3.5.5",
39
39
  "chalk": "^2.4.2",
40
40
  "commander": "^2.20.0",
@@ -45,7 +45,7 @@
45
45
  "strip-ansi": "^5.2.0",
46
46
  "winston": "^3.2.1"
47
47
  },
48
- "gitHead": "55f87cb7b6c94255df93d5f486b4630b4cff9542",
48
+ "gitHead": "2e6795b120c2ca4f16bb542295b2152f091d6ed9",
49
49
  "engines": {
50
50
  "node": ">=18"
51
51
  }