dbdocs 0.18.0 → 0.19.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/README.md CHANGED
@@ -65,7 +65,7 @@ USAGE
65
65
  $ dbdocs db2dbml [DATABASE-TYPE] [CONNECTION-STRING] [-o <value>]
66
66
 
67
67
  ARGUMENTS
68
- DATABASE-TYPE your database type (postgres, mysql, mssql, snowflake, bigquery)
68
+ DATABASE-TYPE your database type (postgres, mysql, mssql, oracle, snowflake, bigquery)
69
69
  CONNECTION-STRING your database connection string (See below examples for more details)
70
70
 
71
71
  FLAGS
@@ -81,6 +81,8 @@ EXAMPLES
81
81
  $ db2dbml mysql 'mysql://user:password@localhost:3306/dbname'
82
82
  MSSQL:
83
83
  $ db2dbml mssql 'Server=localhost,1433;Database=master;User Id=sa;Password=your_password;Encrypt=true;TrustServerCertificate=true;Schemas=schema1,schema2;'
84
+ Oracle:
85
+ $ db2dbml oracle 'your_username/your_password@localhost:1521/dbname' -o database.dbml
84
86
  Snowflake:
85
87
  $ db2dbml snowflake 'SERVER=<account_identifier>.<region>;UID=<your_username>;PWD=<your_password>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2;'
86
88
  BigQuery:
@@ -81,7 +81,7 @@
81
81
  "aliases": [],
82
82
  "args": {
83
83
  "database-type": {
84
- "description": "your database type (postgres, mysql, mssql, snowflake, bigquery)",
84
+ "description": "your database type (postgres, mysql, mssql, oracle, snowflake, bigquery)",
85
85
  "name": "database-type",
86
86
  "required": true
87
87
  },
@@ -92,7 +92,7 @@
92
92
  }
93
93
  },
94
94
  "description": "Generate DBML directly from a database",
95
- "examples": "Postgres:\n $ db2dbml postgres 'postgresql://user:password@localhost:5432/dbname?schemas=schema1,schema2'\nMySQL:\n $ db2dbml mysql 'mysql://user:password@localhost:3306/dbname'\nMSSQL:\n $ db2dbml mssql 'Server=localhost,1433;Database=master;User Id=sa;Password=your_password;Encrypt=true;TrustServerCertificate=true;Schemas=schema1,schema2;'\nSnowflake:\n Password-based authentication:\n $ db2dbml snowflake 'SERVER=<account_identifier>.<region>;UID=<your_username>;PWD=<your_password>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2;'\n Key pair authentication:\n $ db2dbml snowflake 'SERVER=<account_identifier>.<region>;UID=<your_username>;AUTHENTICATOR=SNOWFLAKE_JWT;PRIVATE_KEY_PATH=<path_to_your_private_key.p8>;PASSPHRASE=<your_private_key_passphrase>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2;'\n \n Note: If you did not use passphrase to encrypt your private key, you can leave the \"PASSPHRASE\" empty.\n \nBigQuery:\n $ db2dbml bigquery /path_to_json_credential.json\n \n Note: Your JSON credential file must contain:\n {\n \"project_id\": \"your-project-id\",\n \"client_email\": \"your-client-email\",\n \"private_key\": \"your-private-key\",\n \"datasets\": [\"dataset_1\", \"dataset_2\", ...]\n }\n If \"datasets\" key is not provided or is empty, it will fetch all datasets.",
95
+ "examples": "Postgres:\n $ db2dbml postgres 'postgresql://user:password@localhost:5432/dbname?schemas=schema1,schema2'\nMySQL:\n $ db2dbml mysql 'mysql://user:password@localhost:3306/dbname'\nMSSQL:\n $ db2dbml mssql 'Server=localhost,1433;Database=master;User Id=sa;Password=your_password;Encrypt=true;TrustServerCertificate=true;Schemas=schema1,schema2;'\nOracle:\n $ db2dbml oracle 'your_username/your_password@localhost:1521/dbname'\nSnowflake:\n Password-based authentication:\n $ db2dbml snowflake 'SERVER=<account_identifier>.<region>;UID=<your_username>;PWD=<your_password>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2;'\n Key pair authentication:\n $ db2dbml snowflake 'SERVER=<account_identifier>.<region>;UID=<your_username>;AUTHENTICATOR=SNOWFLAKE_JWT;PRIVATE_KEY_PATH=<path_to_your_private_key.p8>;PASSPHRASE=<your_private_key_passphrase>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2;'\n \n Note: If you did not use passphrase to encrypt your private key, you can leave the \"PASSPHRASE\" empty.\n \nBigQuery:\n $ db2dbml bigquery /path_to_json_credential.json\n \n Note: Your JSON credential file must contain:\n {\n \"project_id\": \"your-project-id\",\n \"client_email\": \"your-client-email\",\n \"private_key\": \"your-private-key\",\n \"datasets\": [\"dataset_1\", \"dataset_2\", ...]\n }\n If \"datasets\" key is not provided or is empty, it will fetch all datasets.",
96
96
  "flags": {
97
97
  "outFile": {
98
98
  "char": "o",
@@ -379,5 +379,5 @@
379
379
  ]
380
380
  }
381
381
  },
382
- "version": "0.18.0"
382
+ "version": "0.19.1"
383
383
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dbdocs",
3
- "version": "0.18.0",
3
+ "version": "0.19.1",
4
4
  "author": "@holistics",
5
5
  "bin": {
6
6
  "dbdocs": "./bin/run"
7
7
  },
8
8
  "dependencies": {
9
- "@dbml/connector": "5.2.0",
10
- "@dbml/core": "5.2.0",
9
+ "@dbml/connector": "5.3.1",
10
+ "@dbml/core": "5.3.1",
11
11
  "@oclif/core": "1.26.2",
12
12
  "@oclif/plugin-help": "6.2.32",
13
13
  "axios": "^1.12.0",
@@ -51,7 +51,7 @@ Db2dbmlCommand.description = 'Generate DBML directly from a database';
51
51
  Db2dbmlCommand.args = [
52
52
  {
53
53
  name: 'database-type',
54
- description: 'your database type (postgres, mysql, mssql, snowflake, bigquery)',
54
+ description: 'your database type (postgres, mysql, mssql, oracle, snowflake, bigquery)',
55
55
  required: true,
56
56
  },
57
57
  {
@@ -76,6 +76,8 @@ Db2dbmlCommand.examples = [
76
76
  " $ db2dbml mysql 'mysql://user:password@localhost:3306/dbname'",
77
77
  'MSSQL:',
78
78
  " $ db2dbml mssql 'Server=localhost,1433;Database=master;User Id=sa;Password=your_password;Encrypt=true;TrustServerCertificate=true;Schemas=schema1,schema2;'",
79
+ 'Oracle:',
80
+ " $ db2dbml oracle 'your_username/your_password@localhost:1521/dbname'",
79
81
  'Snowflake:',
80
82
  ' Password-based authentication:',
81
83
  " $ db2dbml snowflake 'SERVER=<account_identifier>.<region>;UID=<your_username>;PWD=<your_password>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2;'",
@@ -113,10 +115,11 @@ function getConnectionOpt (argv) {
113
115
  }
114
116
 
115
117
  // Check if the arg is a connection string using regex
116
- const connectionStringRegex = /^.*[:;]/;
118
+ const connectionStringRegex = /^.*[:;@]/;
117
119
  if (connectionStringRegex.test(arg)) {
118
120
  // Example: jdbc:mysql://localhost:3306/mydatabase
119
121
  // Example: odbc:Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
122
+ // Example (oracle): username/password@[//]host[:port][/service_name]
120
123
  connectionOpt.connection = arg;
121
124
  }
122
125
 
@@ -1 +1 @@
1
- {"BUILD_COUNT":1}
1
+ {"BUILD_COUNT":2}
@@ -19,7 +19,7 @@ const LOGIN_METHODS = {
19
19
  GITHUB_GOOGLE: 'GitHub/Google',
20
20
  };
21
21
 
22
- const SUPPORTED_DATABASE_CONNECTORS = ['postgres', 'mysql', 'mssql', 'snowflake', 'bigquery'];
22
+ const SUPPORTED_DATABASE_CONNECTORS = ['postgres', 'mysql', 'mssql', 'oracle', 'snowflake', 'bigquery'];
23
23
 
24
24
  /**
25
25
  * Match window path