@dbml/cli 7.1.2 → 8.0.0-alpha.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.
Files changed (89) hide show
  1. package/__tests__/db2dbml/mssql/dbml-error.log +330 -0
  2. package/__tests__/db2dbml/mysql/dbml-error.log +429 -0
  3. package/__tests__/db2dbml/oracle/dbml-error.log +462 -0
  4. package/__tests__/db2dbml/postgres/dbml-error.log +231 -0
  5. package/__tests__/dbml2sql/filename --mysql --out-file/dbml-error.log +0 -0
  6. package/__tests__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +65 -0
  7. package/__tests__/dbml2sql/filename --mysql stdout/dbml-error.log +0 -0
  8. package/__tests__/dbml2sql/filename --oracle --out-file/dbml-error.log +0 -0
  9. package/__tests__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +61 -0
  10. package/__tests__/dbml2sql/filename --oracle stdout/dbml-error.log +0 -0
  11. package/__tests__/dbml2sql/filename --out-file/dbml-error.log +0 -0
  12. package/__tests__/dbml2sql/filename --out-file/out-files/schema.sql +77 -0
  13. package/__tests__/dbml2sql/filename --postgres --out-file/dbml-error.log +0 -0
  14. package/__tests__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +77 -0
  15. package/__tests__/dbml2sql/filename --postgres stdout/dbml-error.log +0 -0
  16. package/__tests__/dbml2sql/filename stdout/dbml-error.log +0 -0
  17. package/__tests__/dbml2sql/filenames --mysql --out-file/dbml-error.log +0 -0
  18. package/__tests__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +172 -0
  19. package/__tests__/dbml2sql/filenames --mysql stdout/dbml-error.log +0 -0
  20. package/__tests__/dbml2sql/filenames --oracle --out-file/dbml-error.log +0 -0
  21. package/__tests__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +172 -0
  22. package/__tests__/dbml2sql/filenames --oracle stdout/dbml-error.log +0 -0
  23. package/__tests__/dbml2sql/filenames --out-file/dbml-error.log +0 -0
  24. package/__tests__/dbml2sql/filenames --out-file/out-files/schema.sql +172 -0
  25. package/__tests__/dbml2sql/filenames --postgres --out-file/dbml-error.log +0 -0
  26. package/__tests__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +172 -0
  27. package/__tests__/dbml2sql/filenames --postgres stdout/dbml-error.log +0 -0
  28. package/__tests__/dbml2sql/filenames stdout/dbml-error.log +0 -0
  29. package/__tests__/dbml2sql/multifile complex stdout/dbml-error.log +0 -0
  30. package/__tests__/dbml2sql/multifile complex stdout/in-files/auth.dbml +4 -0
  31. package/__tests__/dbml2sql/multifile complex stdout/in-files/catalog.dbml +10 -0
  32. package/__tests__/dbml2sql/multifile complex stdout/in-files/enums.dbml +5 -0
  33. package/__tests__/dbml2sql/multifile complex stdout/in-files/main.dbml +15 -0
  34. package/__tests__/dbml2sql/multifile complex stdout/options.json +3 -0
  35. package/__tests__/dbml2sql/multifile complex stdout/stdout.txt +32 -0
  36. package/__tests__/dbml2sql/multiple_schema_mssql/dbml-error.log +30 -0
  37. package/__tests__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +62 -0
  38. package/__tests__/dbml2sql/multiple_schema_mysql/dbml-error.log +30 -0
  39. package/__tests__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +50 -0
  40. package/__tests__/dbml2sql/multiple_schema_oracle/dbml-error.log +0 -0
  41. package/__tests__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +88 -0
  42. package/__tests__/dbml2sql/multiple_schema_pg/dbml-error.log +30 -0
  43. package/__tests__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +67 -0
  44. package/__tests__/dbml2sql/syntax-error/dbml-error.log +102 -0
  45. package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log +108 -0
  46. package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/dbml-error.log +108 -0
  47. package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log +108 -0
  48. package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log +108 -0
  49. package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log +108 -0
  50. package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log +108 -0
  51. package/__tests__/sql2dbml/filename --mssql --out-file/dbml-error.log +0 -0
  52. package/__tests__/sql2dbml/filename --mssql --out-file/out-files/schema.dbml +25 -0
  53. package/__tests__/sql2dbml/filename --mysql --out-file/dbml-error.log +0 -0
  54. package/__tests__/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +74 -0
  55. package/__tests__/sql2dbml/filename --mysql stdout/dbml-error.log +0 -0
  56. package/__tests__/sql2dbml/filename --oracle --out-file/dbml-error.log +0 -0
  57. package/__tests__/sql2dbml/filename --oracle --out-file/out-files/schema.dbml +83 -0
  58. package/__tests__/sql2dbml/filename --out-file/dbml-error.log +0 -0
  59. package/__tests__/sql2dbml/filename --out-file/out-files/schema.dbml +74 -0
  60. package/__tests__/sql2dbml/filename --postgres --out-file/dbml-error.log +0 -0
  61. package/__tests__/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +74 -0
  62. package/__tests__/sql2dbml/filename --postgres stdout/dbml-error.log +0 -0
  63. package/__tests__/sql2dbml/filename --snowflake stdout/dbml-error.log +0 -0
  64. package/__tests__/sql2dbml/filename stdout/dbml-error.log +0 -0
  65. package/__tests__/sql2dbml/filenames --mysql --out-file/dbml-error.log +0 -0
  66. package/__tests__/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +170 -0
  67. package/__tests__/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -0
  68. package/__tests__/sql2dbml/filenames --out-file/dbml-error.log +0 -0
  69. package/__tests__/sql2dbml/filenames --out-file/out-files/schema.dbml +170 -0
  70. package/__tests__/sql2dbml/filenames --postgres --out-file/dbml-error.log +0 -0
  71. package/__tests__/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +170 -0
  72. package/__tests__/sql2dbml/filenames --postgres stdout/dbml-error.log +0 -0
  73. package/__tests__/sql2dbml/filenames stdout/dbml-error.log +0 -0
  74. package/__tests__/sql2dbml/multiple_schema_mssql/dbml-error.log +0 -0
  75. package/__tests__/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +58 -0
  76. package/__tests__/sql2dbml/multiple_schema_mysql/dbml-error.log +0 -0
  77. package/__tests__/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +136 -0
  78. package/__tests__/sql2dbml/multiple_schema_pg/dbml-error.log +0 -0
  79. package/__tests__/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +101 -0
  80. package/__tests__/sql2dbml/syntax-error/dbml-error.log +102 -0
  81. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +99 -0
  82. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +99 -0
  83. package/dbml-error.log +1 -276
  84. package/lib/index.js +129 -42
  85. package/package.json +5 -5
  86. package/src/NodeProjectLayout.ts +125 -0
  87. package/src/cli/export.ts +59 -35
  88. package/vite.config.ts +1 -0
  89. package/snowflake.log +0 -129
@@ -0,0 +1,125 @@
1
+ import {
2
+ existsSync, readFileSync, readdirSync, statSync,
3
+ } from 'node:fs';
4
+ import {
5
+ type DbmlProjectLayout, Filepath,
6
+ } from '@dbml/parse';
7
+
8
+ /**
9
+ * A DbmlProjectLayout backed by the Node.js filesystem.
10
+ * Reads source files on demand from disk; setSource/deleteSource maintain an
11
+ * in-memory overlay (e.g. for unsaved edits) without touching the real FS.
12
+ */
13
+ export class NodeProjectLayout implements DbmlProjectLayout {
14
+ // Overlay is an overriding map of file absolute paths to file content
15
+ // `null`: The file is deleted
16
+ private overlay = new Map<string, string | null>();
17
+ private entryPoints: Filepath[];
18
+
19
+ constructor (entryPoints: Filepath[]) {
20
+ this.entryPoints = [...entryPoints];
21
+ }
22
+
23
+ setSource (filePath: Filepath, content: string): void {
24
+ this.overlay.set(filePath.absolute, content);
25
+ }
26
+
27
+ getSource (filePath: Filepath): string | undefined {
28
+ const absolutePath = filePath.absolute;
29
+
30
+ // If overlay already has the file,
31
+ // return its content
32
+ if (this.overlay.has(absolutePath)) {
33
+ const value = this.overlay.get(absolutePath);
34
+ return value ?? undefined; // null (deleted) -> undefined
35
+ }
36
+ try {
37
+ return readFileSync(absolutePath, 'utf-8');
38
+ } catch {
39
+ return undefined;
40
+ }
41
+ }
42
+
43
+ deleteSource (filePath: Filepath): void {
44
+ this.overlay.set(filePath.absolute, null);
45
+ }
46
+
47
+ clearSource (): void {
48
+ this.overlay.clear();
49
+ this.entryPoints = [];
50
+ }
51
+
52
+ exists (filePath: Filepath): boolean {
53
+ return this.isFile(filePath) || this.isDirectory(filePath);
54
+ }
55
+
56
+ isFile (filePath: Filepath): boolean {
57
+ const absolutePath = filePath.absolute;
58
+
59
+ if (this.overlay.has(absolutePath)) return this.overlay.get(absolutePath) !== null;
60
+
61
+ try {
62
+ // `statSync` (not lstatSync) so symlinks resolve to their target, matching
63
+ // how node reads the file on disk.
64
+ return statSync(absolutePath).isFile();
65
+ } catch {
66
+ return false;
67
+ }
68
+ }
69
+
70
+ isDirectory (filePath: Filepath): boolean {
71
+ const absolutePath = filePath.absolute;
72
+
73
+ try {
74
+ // Exist in filesystem
75
+ if (statSync(absolutePath).isDirectory()) return true;
76
+ } catch {
77
+ // fall through: the path may exist only in the overlay
78
+ }
79
+ for (const [overlayPath, content] of this.overlay) {
80
+ if (content === null) continue;
81
+ if (overlayPath.startsWith(absolutePath)) return true;
82
+ }
83
+ return false;
84
+ }
85
+
86
+ listDirectory (dirPath?: Filepath): Filepath[] {
87
+ const basePath = dirPath?.absolute ?? '/';
88
+ const results = new Set<string>();
89
+
90
+ try {
91
+ // Filesystem entries
92
+ for (const entry of readdirSync(basePath)) {
93
+ results.add(basePath + entry);
94
+ }
95
+ } catch {
96
+ // Not a readable directory - ignore
97
+ }
98
+
99
+ // Overlay additions: non-deleted files directly under base
100
+ for (const [abs, content] of this.overlay) {
101
+ if (content === null) continue;
102
+ if (!abs.startsWith(basePath)) continue;
103
+ if (!abs.slice(basePath.length).includes('/')) results.add(abs);
104
+ }
105
+
106
+ // Remove overlay-deleted paths
107
+ for (const [overlayPath, content] of this.overlay) {
108
+ if (content === null) results.delete(overlayPath);
109
+ }
110
+
111
+ return [...results].sort().map(Filepath.from);
112
+ }
113
+
114
+ getEntryPoints (): Filepath[] {
115
+ return this.entryPoints.filter((fp) => this.exists(fp));
116
+ }
117
+
118
+ clone (): NodeProjectLayout {
119
+ const copy = new NodeProjectLayout([...this.entryPoints]);
120
+ for (const [overlayPath, content] of this.overlay) {
121
+ copy.overlay.set(overlayPath, content);
122
+ }
123
+ return copy;
124
+ }
125
+ }
package/src/cli/export.ts CHANGED
@@ -1,24 +1,23 @@
1
1
  import path from 'path';
2
2
  import {
3
- CompilerError, exporter,
4
- } from '@dbml/core';
5
- import type {
6
- ExportFormat,
3
+ ModelExporter, Parser,
7
4
  } from '@dbml/core';
5
+ import {
6
+ Compiler, Filepath,
7
+ } from '@dbml/parse';
8
8
  import chalk from 'chalk';
9
9
  import type {
10
10
  Command,
11
11
  } from 'commander';
12
12
  import figures from 'figures';
13
13
  import {
14
- SyntaxError,
15
- } from '../errors';
14
+ NodeProjectLayout,
15
+ } from '../NodeProjectLayout';
16
16
  import logger from '../helpers/logger';
17
17
  import config from './config';
18
18
  import OutputConsolePlugin from './outputPlugins/outputConsolePlugin';
19
19
  import OutputFilePlugin from './outputPlugins/outputFilePlugin';
20
20
  import {
21
- generate,
22
21
  getFormatOpt,
23
22
  resolvePaths,
24
23
  validateInputFilePaths,
@@ -27,35 +26,60 @@ import {
27
26
  validateFilePlugin,
28
27
  } from './validatePlugins/validatePlugins';
29
28
 
30
- export default async function exportHandler (program: Command) {
31
- try {
32
- const inputPaths = resolvePaths(program.args);
33
- validateInputFilePaths(inputPaths, validateFilePlugin);
34
- const opts = program.opts();
35
-
36
- const format = getFormatOpt(opts) as ExportFormat;
37
-
38
- if (!opts.outFile && !opts.outDir) {
39
- generate(inputPaths, (dbml) => exporter.export(dbml, format), OutputConsolePlugin);
40
- } else if (opts.outFile) {
41
- const header = [
42
- '-- SQL dump generated using DBML (dbml.dbdiagram.io)\n',
43
- `-- Database: ${config[format].name}\n`,
44
- `-- Generated at: ${new Date().toISOString()}\n\n`,
45
- ].join('');
46
-
47
- generate(
48
- inputPaths,
49
- (dbml) => exporter.export(dbml, format),
50
- new OutputFilePlugin(resolvePaths(opts.outFile), header),
51
- );
29
+ export default async function exportHandler (program: Command): Promise<void> {
30
+ const inputPaths = resolvePaths(program.args);
31
+ validateInputFilePaths(inputPaths, validateFilePlugin);
32
+ const opts = program.opts();
33
+ const format = getFormatOpt(opts);
34
+
35
+ const entryPoints = inputPaths.map((p: string) => new Filepath(p));
36
+ const compiler = new Compiler();
37
+ compiler.layout = new NodeProjectLayout(entryPoints);
38
+
39
+ const outputPlugin = opts.outFile
40
+ ? new OutputFilePlugin(
41
+ resolvePaths(opts.outFile as string),
42
+ [
43
+ '-- SQL dump generated using DBML (dbml.dbdiagram.io)\n',
44
+ `-- Database: ${(config as any)[format].name}\n`,
45
+ `-- Generated at: ${new Date().toISOString()}\n\n`,
46
+ ].join(''),
47
+ )
48
+ : OutputConsolePlugin;
49
+
50
+ let hasErrors = false;
52
51
 
53
- console.log(` ${chalk.green(figures.main.tick)} Generated SQL dump file (${config[format].name}): ${path.basename(opts.outFile)}`);
52
+ for (const filepath of entryPoints) {
53
+ const result = compiler.interpretFile(filepath);
54
+ const errors = result.getErrors();
55
+
56
+ if (errors.length > 0) {
57
+ hasErrors = true;
58
+ const isMultifile = compiler.reachableFiles(filepath).length > 1;
59
+ logger.error(
60
+ `\n ${errors
61
+ .map((e) => {
62
+ const pos = e.nodeOrToken.startPos;
63
+ const line = pos.line + 1;
64
+ const col = pos.column + 1;
65
+ if (isMultifile) {
66
+ return `${e.filepath.basename}(${line},${col}): ${e.message}`;
67
+ }
68
+ return `You have a syntax error at "${e.filepath.basename}" line ${line} column ${col}. ${e.message}`;
69
+ })
70
+ .join('\n ')}`,
71
+ );
72
+ continue;
54
73
  }
55
- } catch (error) {
56
- const e = error as CompilerError;
57
- logger.error(`\n ${e.diags.map((diag) => new SyntaxError(diag.filepath ?? '', diag)).map(({
58
- message,
59
- }) => message).join('\n ')}`);
74
+
75
+ const db = result.getValue();
76
+ if (!db) continue;
77
+
78
+ const sql = ModelExporter.export(Parser.parseJSONToDatabase(db as any), format);
79
+ outputPlugin.write(sql);
80
+ }
81
+
82
+ if (!hasErrors && opts.outFile) {
83
+ console.log(` ${chalk.green(figures.main.tick)} Generated SQL dump file (${(config as any)[format].name}): ${path.basename(opts.outFile)}`);
60
84
  }
61
85
  }
package/vite.config.ts CHANGED
@@ -25,6 +25,7 @@ export default defineConfig({
25
25
  external: [
26
26
  '@dbml/connector',
27
27
  '@dbml/core',
28
+ '@dbml/parse',
28
29
  'bluebird',
29
30
  'chalk',
30
31
  'commander',
package/snowflake.log DELETED
@@ -1,129 +0,0 @@
1
- {"level":"INFO","message":"[6:14:52.313 PM]: Connecting to GLOBAL Snowflake domain"}
2
- {"level":"INFO","message":"[6:14:52.317 PM]: Trying to initialize Easy Logging"}
3
- {"level":"INFO","message":"[6:14:52.319 PM]: No client config file found in default directories"}
4
- {"level":"INFO","message":"[6:14:52.319 PM]: Easy Logging is disabled as no config has been found"}
5
- {"level":"INFO","message":"[3:18:47.992 PM]: Connecting to GLOBAL Snowflake domain"}
6
- {"level":"INFO","message":"[3:18:47.996 PM]: Trying to initialize Easy Logging"}
7
- {"level":"INFO","message":"[3:18:47.998 PM]: No client config file found in default directories"}
8
- {"level":"INFO","message":"[3:18:47.999 PM]: Easy Logging is disabled as no config has been found"}
9
- {"level":"INFO","message":"[2:44:09.684 PM]: Connecting to GLOBAL Snowflake domain"}
10
- {"level":"INFO","message":"[2:44:09.690 PM]: Trying to initialize Easy Logging"}
11
- {"level":"INFO","message":"[2:44:09.692 PM]: No client config file found in default directories"}
12
- {"level":"INFO","message":"[2:44:09.692 PM]: Easy Logging is disabled as no config has been found"}
13
- {"level":"INFO","message":"[4:26:49.324 PM]: Connecting to GLOBAL Snowflake domain"}
14
- {"level":"INFO","message":"[4:26:49.327 PM]: Trying to initialize Easy Logging"}
15
- {"level":"INFO","message":"[4:26:49.329 PM]: No client config file found in default directories"}
16
- {"level":"INFO","message":"[4:26:49.330 PM]: Easy Logging is disabled as no config has been found"}
17
- {"level":"INFO","message":"[4:27:05.301 PM]: Connecting to GLOBAL Snowflake domain"}
18
- {"level":"INFO","message":"[4:27:05.303 PM]: Trying to initialize Easy Logging"}
19
- {"level":"INFO","message":"[4:27:05.306 PM]: No client config file found in default directories"}
20
- {"level":"INFO","message":"[4:27:05.306 PM]: Easy Logging is disabled as no config has been found"}
21
- {"level":"INFO","message":"[4:27:13.459 PM]: Connecting to GLOBAL Snowflake domain"}
22
- {"level":"INFO","message":"[4:27:13.462 PM]: Trying to initialize Easy Logging"}
23
- {"level":"INFO","message":"[4:27:13.464 PM]: No client config file found in default directories"}
24
- {"level":"INFO","message":"[4:27:13.464 PM]: Easy Logging is disabled as no config has been found"}
25
- {"level":"INFO","message":"[4:27:26.410 PM]: Connecting to GLOBAL Snowflake domain"}
26
- {"level":"INFO","message":"[4:27:26.413 PM]: Trying to initialize Easy Logging"}
27
- {"level":"INFO","message":"[4:27:26.415 PM]: No client config file found in default directories"}
28
- {"level":"INFO","message":"[4:27:26.415 PM]: Easy Logging is disabled as no config has been found"}
29
- {"level":"INFO","message":"[4:27:42.518 PM]: Connecting to GLOBAL Snowflake domain"}
30
- {"level":"INFO","message":"[4:27:42.520 PM]: Trying to initialize Easy Logging"}
31
- {"level":"INFO","message":"[4:27:42.524 PM]: No client config file found in default directories"}
32
- {"level":"INFO","message":"[4:27:42.524 PM]: Easy Logging is disabled as no config has been found"}
33
- {"level":"INFO","message":"[4:28:10.030 PM]: Connecting to GLOBAL Snowflake domain"}
34
- {"level":"INFO","message":"[4:28:10.032 PM]: Trying to initialize Easy Logging"}
35
- {"level":"INFO","message":"[4:28:10.035 PM]: No client config file found in default directories"}
36
- {"level":"INFO","message":"[4:28:10.035 PM]: Easy Logging is disabled as no config has been found"}
37
- {"level":"INFO","message":"[3:47:47.869 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
38
- {"level":"INFO","message":"[3:47:47.871 PM]: Creating new connection object"}
39
- {"level":"INFO","message":"[3:50:39.098 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
40
- {"level":"INFO","message":"[3:50:39.100 PM]: Creating new connection object"}
41
- {"level":"INFO","message":"[3:51:47.763 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
42
- {"level":"INFO","message":"[3:51:47.765 PM]: Creating new connection object"}
43
- {"level":"INFO","message":"[3:52:51.188 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
44
- {"level":"INFO","message":"[3:52:51.189 PM]: Creating new connection object"}
45
- {"level":"INFO","message":"[3:53:45.381 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
46
- {"level":"INFO","message":"[3:53:45.382 PM]: Creating new connection object"}
47
- {"level":"INFO","message":"[3:53:45.384 PM]: Creating Connection[id: b1dcc16b-b552-4996-a0ee-fbd45e2a275b] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
48
- {"level":"INFO","message":"[3:53:45.384 PM]: Connection[id: b1dcc16b-b552-4996-a0ee-fbd45e2a275b] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: \"/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8\", private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
49
- {"level":"INFO","message":"[3:53:45.384 PM]: Connection[id: b1dcc16b-b552-4996-a0ee-fbd45e2a275b] - connection object created successfully."}
50
- {"level":"INFO","message":"[3:53:45.385 PM]: Connection[id: b1dcc16b-b552-4996-a0ee-fbd45e2a275b] - connecting. Associated Snowflake domain: GLOBAL"}
51
- {"level":"ERROR","message":"[3:53:45.386 PM]: Connection[id: b1dcc16b-b552-4996-a0ee-fbd45e2a275b] - authentication failed. Error: Error: ENOENT: no such file or directory, open '\"/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8\"'\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/a"}
52
- {"level":"INFO","message":"[3:54:15.329 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
53
- {"level":"INFO","message":"[3:54:15.331 PM]: Creating new connection object"}
54
- {"level":"INFO","message":"[3:54:15.332 PM]: Creating Connection[id: 51c4875c-7f78-4811-8e52-4c611c253542] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
55
- {"level":"INFO","message":"[3:54:15.332 PM]: Connection[id: 51c4875c-7f78-4811-8e52-4c611c253542] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: /Users/huylm/code/work/dbml/packages/dbml-cli/key.p8, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
56
- {"level":"INFO","message":"[3:54:15.332 PM]: Connection[id: 51c4875c-7f78-4811-8e52-4c611c253542] - connection object created successfully."}
57
- {"level":"INFO","message":"[3:54:15.333 PM]: Connection[id: 51c4875c-7f78-4811-8e52-4c611c253542] - connecting. Associated Snowflake domain: GLOBAL"}
58
- {"level":"INFO","message":"[3:54:15.339 PM]: Connection[id: 51c4875c-7f78-4811-8e52-4c611c253542] - authentication successful using: SNOWFLAKE_JWT"}
59
- {"level":"INFO","message":"[3:54:15.339 PM]: Trying to initialize Easy Logging"}
60
- {"level":"INFO","message":"[3:54:15.340 PM]: No client config detected."}
61
- {"level":"INFO","message":"[3:54:15.341 PM]: No config file path found. Client config will not be used."}
62
- {"level":"INFO","message":"[3:54:15.341 PM]: Easy Logging is disabled as no config has been found"}
63
- {"level":"INFO","message":"[3:54:15.342 PM]: Connection[id: 51c4875c-7f78-4811-8e52-4c611c253542] - connected successfully after 9.428709030151367 milliseconds"}
64
- {"level":"INFO","message":"[3:55:14.152 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
65
- {"level":"INFO","message":"[3:55:14.154 PM]: Creating new connection object"}
66
- {"level":"INFO","message":"[3:55:14.156 PM]: Creating Connection[id: 9f57ac79-5c29-4ed7-a84b-988ae9c1e342] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
67
- {"level":"INFO","message":"[3:55:14.156 PM]: Connection[id: 9f57ac79-5c29-4ed7-a84b-988ae9c1e342] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: /Users/huylm/code/work/dbml/packages/dbml-cli/key.p8.PASSPHRASE=, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
68
- {"level":"INFO","message":"[3:55:14.157 PM]: Connection[id: 9f57ac79-5c29-4ed7-a84b-988ae9c1e342] - connection object created successfully."}
69
- {"level":"INFO","message":"[3:55:14.157 PM]: Connection[id: 9f57ac79-5c29-4ed7-a84b-988ae9c1e342] - connecting. Associated Snowflake domain: GLOBAL"}
70
- {"level":"ERROR","message":"[3:55:14.159 PM]: Connection[id: 9f57ac79-5c29-4ed7-a84b-988ae9c1e342] - authentication failed. Error: Error: ENOENT: no such file or directory, open '/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8.PASSPHRASE='\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authen"}
71
- {"level":"INFO","message":"[3:55:30.146 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
72
- {"level":"INFO","message":"[3:55:30.148 PM]: Creating new connection object"}
73
- {"level":"INFO","message":"[3:55:30.149 PM]: Creating Connection[id: b9b1ced6-4a99-45ab-b337-1b8062a8b1c1] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
74
- {"level":"INFO","message":"[3:55:30.150 PM]: Connection[id: b9b1ced6-4a99-45ab-b337-1b8062a8b1c1] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: ~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8.PASSPHRASE=, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
75
- {"level":"INFO","message":"[3:55:30.150 PM]: Connection[id: b9b1ced6-4a99-45ab-b337-1b8062a8b1c1] - connection object created successfully."}
76
- {"level":"INFO","message":"[3:55:30.150 PM]: Connection[id: b9b1ced6-4a99-45ab-b337-1b8062a8b1c1] - connecting. Associated Snowflake domain: GLOBAL"}
77
- {"level":"ERROR","message":"[3:55:30.152 PM]: Connection[id: b9b1ced6-4a99-45ab-b337-1b8062a8b1c1] - authentication failed. Error: Error: ENOENT: no such file or directory, open '~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8.PASSPHRASE='\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authe"}
78
- {"level":"INFO","message":"[3:55:41.874 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
79
- {"level":"INFO","message":"[3:55:41.876 PM]: Creating new connection object"}
80
- {"level":"INFO","message":"[3:55:41.877 PM]: Creating Connection[id: 14727e10-9737-45f6-a8c4-ecc1fa1d8f2b] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
81
- {"level":"INFO","message":"[3:55:41.877 PM]: Connection[id: 14727e10-9737-45f6-a8c4-ecc1fa1d8f2b] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: ~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
82
- {"level":"INFO","message":"[3:55:41.878 PM]: Connection[id: 14727e10-9737-45f6-a8c4-ecc1fa1d8f2b] - connection object created successfully."}
83
- {"level":"INFO","message":"[3:55:41.878 PM]: Connection[id: 14727e10-9737-45f6-a8c4-ecc1fa1d8f2b] - connecting. Associated Snowflake domain: GLOBAL"}
84
- {"level":"ERROR","message":"[3:55:41.880 PM]: Connection[id: 14727e10-9737-45f6-a8c4-ecc1fa1d8f2b] - authentication failed. Error: Error: ENOENT: no such file or directory, open '~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8'\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/au"}
85
- {"level":"INFO","message":"[3:56:21.800 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
86
- {"level":"INFO","message":"[3:56:21.801 PM]: Creating new connection object"}
87
- {"level":"INFO","message":"[3:56:21.802 PM]: Creating Connection[id: bc93ab34-9b42-4938-8c31-9c25024c6b93] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
88
- {"level":"INFO","message":"[3:56:21.803 PM]: Connection[id: bc93ab34-9b42-4938-8c31-9c25024c6b93] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: \"~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8\", private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
89
- {"level":"INFO","message":"[3:56:21.803 PM]: Connection[id: bc93ab34-9b42-4938-8c31-9c25024c6b93] - connection object created successfully."}
90
- {"level":"INFO","message":"[3:56:21.804 PM]: Connection[id: bc93ab34-9b42-4938-8c31-9c25024c6b93] - connecting. Associated Snowflake domain: GLOBAL"}
91
- {"level":"ERROR","message":"[3:56:21.805 PM]: Connection[id: bc93ab34-9b42-4938-8c31-9c25024c6b93] - authentication failed. Error: Error: ENOENT: no such file or directory, open '\"~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8\"'\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/"}
92
- {"level":"INFO","message":"[3:56:29.711 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
93
- {"level":"INFO","message":"[3:56:29.712 PM]: Creating new connection object"}
94
- {"level":"INFO","message":"[3:56:29.714 PM]: Creating Connection[id: 87d2271d-ca23-4a0e-9fff-c0c2fc548582] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
95
- {"level":"INFO","message":"[3:56:29.714 PM]: Connection[id: 87d2271d-ca23-4a0e-9fff-c0c2fc548582] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: ~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
96
- {"level":"INFO","message":"[3:56:29.714 PM]: Connection[id: 87d2271d-ca23-4a0e-9fff-c0c2fc548582] - connection object created successfully."}
97
- {"level":"INFO","message":"[3:56:29.715 PM]: Connection[id: 87d2271d-ca23-4a0e-9fff-c0c2fc548582] - connecting. Associated Snowflake domain: GLOBAL"}
98
- {"level":"ERROR","message":"[3:56:29.716 PM]: Connection[id: 87d2271d-ca23-4a0e-9fff-c0c2fc548582] - authentication failed. Error: Error: ENOENT: no such file or directory, open '~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8'\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/au"}
99
- {"level":"INFO","message":"[3:56:39.522 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
100
- {"level":"INFO","message":"[3:56:39.524 PM]: Creating new connection object"}
101
- {"level":"INFO","message":"[3:56:39.525 PM]: Creating Connection[id: 962a5094-38c2-4058-b5e6-4edccc1522d6] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
102
- {"level":"INFO","message":"[3:56:39.525 PM]: Connection[id: 962a5094-38c2-4058-b5e6-4edccc1522d6] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: ~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
103
- {"level":"INFO","message":"[3:56:39.526 PM]: Connection[id: 962a5094-38c2-4058-b5e6-4edccc1522d6] - connection object created successfully."}
104
- {"level":"INFO","message":"[3:56:39.526 PM]: Connection[id: 962a5094-38c2-4058-b5e6-4edccc1522d6] - connecting. Associated Snowflake domain: GLOBAL"}
105
- {"level":"ERROR","message":"[3:56:39.528 PM]: Connection[id: 962a5094-38c2-4058-b5e6-4edccc1522d6] - authentication failed. Error: Error: ENOENT: no such file or directory, open '~/Users/huylm/code/work/dbml/packages/dbml-cli/key.p8'\n at Object.openSync (node:fs:603:3)\n at Object.readFileSync (node:fs:471:35)\n at loadPrivateKey (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/auth_keypair.js:54:31)\n at AuthKeypair.authenticate (/Users/huylm/code/work/dbml/node_modules/snowflake-sdk/lib/authentication/au"}
106
- {"level":"INFO","message":"[3:57:02.017 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
107
- {"level":"INFO","message":"[3:57:02.018 PM]: Creating new connection object"}
108
- {"level":"INFO","message":"[3:57:02.020 PM]: Creating Connection[id: 42bc0678-0b7e-464e-9c0f-317873103503] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
109
- {"level":"INFO","message":"[3:57:02.020 PM]: Connection[id: 42bc0678-0b7e-464e-9c0f-317873103503] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: /Users/huylm/code/work/dbml/packages/dbml-cli/key.p8, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
110
- {"level":"INFO","message":"[3:57:02.020 PM]: Connection[id: 42bc0678-0b7e-464e-9c0f-317873103503] - connection object created successfully."}
111
- {"level":"INFO","message":"[3:57:02.021 PM]: Connection[id: 42bc0678-0b7e-464e-9c0f-317873103503] - connecting. Associated Snowflake domain: GLOBAL"}
112
- {"level":"INFO","message":"[3:57:02.027 PM]: Connection[id: 42bc0678-0b7e-464e-9c0f-317873103503] - authentication successful using: SNOWFLAKE_JWT"}
113
- {"level":"INFO","message":"[3:57:02.028 PM]: Trying to initialize Easy Logging"}
114
- {"level":"INFO","message":"[3:57:02.029 PM]: No client config detected."}
115
- {"level":"INFO","message":"[3:57:02.029 PM]: No config file path found. Client config will not be used."}
116
- {"level":"INFO","message":"[3:57:02.029 PM]: Easy Logging is disabled as no config has been found"}
117
- {"level":"INFO","message":"[3:57:02.031 PM]: Connection[id: 42bc0678-0b7e-464e-9c0f-317873103503] - connected successfully after 10.33554196357727 milliseconds"}
118
- {"level":"INFO","message":"[3:57:15.585 PM]: Configuring logger with level: 2, filePath: undefined, additionalLogToConsole: false"}
119
- {"level":"INFO","message":"[3:57:15.587 PM]: Creating new connection object"}
120
- {"level":"INFO","message":"[3:57:15.588 PM]: Creating Connection[id: 7ecfbb6b-0f84-4ea2-a5a8-7e5c264d452e] with host: holistics.ap-southeast-2.snowflakecomputing.com, account: holistics, accessUrl: https://holistics.ap-southeast-2.snowflakecomputing.com, user: HOLISTICS_USER, role: undefined, database: TEST_DB, schema: undefined, warehouse: DEMO_WH, proxy was not configured, password is not provided, region: ap-southeast-2, authenticator: SNOWFLAKE_JWT, ocsp mode: FAIL_OPEN, os: darwin, os version: 24.3.0"}
121
- {"level":"INFO","message":"[3:57:15.588 PM]: Connection[id: 7ecfbb6b-0f84-4ea2-a5a8-7e5c264d452e] additional details: passcode in password is provided, passcode is not provided, private key is not provided, application: undefined, client name: snowflake-sdk, client version: 2.0.3, retry timeout: 300, private key path: /Users/huylm/code/work/dbml/packages/dbml-cli/key.p8, private key pass is not provided, client store temporary credential: false, browser response timeout: 120000"}
122
- {"level":"INFO","message":"[3:57:15.589 PM]: Connection[id: 7ecfbb6b-0f84-4ea2-a5a8-7e5c264d452e] - connection object created successfully."}
123
- {"level":"INFO","message":"[3:57:15.589 PM]: Connection[id: 7ecfbb6b-0f84-4ea2-a5a8-7e5c264d452e] - connecting. Associated Snowflake domain: GLOBAL"}
124
- {"level":"INFO","message":"[3:57:15.596 PM]: Connection[id: 7ecfbb6b-0f84-4ea2-a5a8-7e5c264d452e] - authentication successful using: SNOWFLAKE_JWT"}
125
- {"level":"INFO","message":"[3:57:15.596 PM]: Trying to initialize Easy Logging"}
126
- {"level":"INFO","message":"[3:57:15.597 PM]: No client config detected."}
127
- {"level":"INFO","message":"[3:57:15.598 PM]: No config file path found. Client config will not be used."}
128
- {"level":"INFO","message":"[3:57:15.598 PM]: Easy Logging is disabled as no config has been found"}
129
- {"level":"INFO","message":"[3:57:15.599 PM]: Connection[id: 7ecfbb6b-0f84-4ea2-a5a8-7e5c264d452e] - connected successfully after 10.343082904815674 milliseconds"}