@hypequery/cli 1.1.0 → 1.1.2

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.
@@ -48,68 +48,43 @@ import { logger } from './logger.js';
48
48
  var noop = function () { return undefined; };
49
49
  // Configure prompts to not exit on cancel
50
50
  prompts.override({ onCancel: noop });
51
- /**
52
- * Prompt for database type selection
53
- */
54
- export function promptDatabaseType() {
55
- return __awaiter(this, void 0, void 0, function () {
56
- var response;
57
- return __generator(this, function (_a) {
58
- switch (_a.label) {
59
- case 0: return [4 /*yield*/, prompts({
60
- type: 'select',
61
- name: 'database',
62
- message: 'Which database are you using?',
63
- choices: [
64
- { title: 'ClickHouse', value: 'clickhouse' },
65
- { title: 'BigQuery (coming soon)', value: 'bigquery', disabled: true },
66
- ],
67
- initial: 0,
68
- })];
69
- case 1:
70
- response = _a.sent();
71
- return [2 /*return*/, response.database || null];
72
- }
73
- });
74
- });
75
- }
76
51
  /**
77
52
  * Prompt for ClickHouse connection details
78
53
  */
79
54
  export function promptClickHouseConnection() {
80
55
  return __awaiter(this, void 0, void 0, function () {
81
56
  var response;
82
- var _a, _b, _c, _d;
83
- return __generator(this, function (_e) {
84
- switch (_e.label) {
57
+ var _a, _b, _c, _d, _e;
58
+ return __generator(this, function (_f) {
59
+ switch (_f.label) {
85
60
  case 0: return [4 /*yield*/, prompts([
86
61
  {
87
62
  type: 'text',
88
63
  name: 'host',
89
- message: 'ClickHouse host (or skip to configure later):',
90
- initial: (_a = process.env.CLICKHOUSE_HOST) !== null && _a !== void 0 ? _a : '',
64
+ message: 'ClickHouse URL (or skip to configure later):',
65
+ initial: (_b = (_a = process.env.CLICKHOUSE_URL) !== null && _a !== void 0 ? _a : process.env.CLICKHOUSE_HOST) !== null && _b !== void 0 ? _b : '',
91
66
  },
92
67
  {
93
68
  type: 'text',
94
69
  name: 'database',
95
70
  message: 'Database:',
96
- initial: (_b = process.env.CLICKHOUSE_DATABASE) !== null && _b !== void 0 ? _b : '',
71
+ initial: (_c = process.env.CLICKHOUSE_DATABASE) !== null && _c !== void 0 ? _c : '',
97
72
  },
98
73
  {
99
74
  type: 'text',
100
75
  name: 'username',
101
76
  message: 'Username:',
102
- initial: (_c = process.env.CLICKHOUSE_USERNAME) !== null && _c !== void 0 ? _c : '',
77
+ initial: (_d = process.env.CLICKHOUSE_USERNAME) !== null && _d !== void 0 ? _d : '',
103
78
  },
104
79
  {
105
80
  type: 'password',
106
81
  name: 'password',
107
82
  message: 'Password:',
108
- initial: (_d = process.env.CLICKHOUSE_PASSWORD) !== null && _d !== void 0 ? _d : '',
83
+ initial: (_e = process.env.CLICKHOUSE_PASSWORD) !== null && _e !== void 0 ? _e : '',
109
84
  },
110
85
  ])];
111
86
  case 1:
112
- response = _e.sent();
87
+ response = _f.sent();
113
88
  // If user cancelled or skipped
114
89
  if (!response.host) {
115
90
  return [2 /*return*/, null];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Command-line interface for hypequery",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  "dist"
12
12
  ],
13
13
  "dependencies": {
14
- "@clickhouse/client": "^1.16.0",
14
+ "@clickhouse/client": "^1.18.3",
15
15
  "chalk": "^5.3.0",
16
16
  "commander": "^12.0.0",
17
17
  "dotenv": "^16.4.7",
@@ -22,11 +22,15 @@
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@hypequery/clickhouse": "*",
25
+ "@hypequery/schema": "*",
25
26
  "@hypequery/serve": "*"
26
27
  },
27
28
  "peerDependenciesMeta": {
28
29
  "@hypequery/clickhouse": {
29
30
  "optional": true
31
+ },
32
+ "@hypequery/schema": {
33
+ "optional": true
30
34
  }
31
35
  },
32
36
  "devDependencies": {
@@ -35,8 +39,9 @@
35
39
  "@vitest/coverage-v8": "^2.1.6",
36
40
  "typescript": "^5.7.3",
37
41
  "vitest": "^2.1.6",
38
- "@hypequery/clickhouse": "1.6.0",
39
- "@hypequery/serve": "0.2.0"
42
+ "@hypequery/schema": "0.0.0",
43
+ "@hypequery/serve": "0.2.0",
44
+ "@hypequery/clickhouse": "2.0.0"
40
45
  },
41
46
  "repository": {
42
47
  "type": "git",