@hypequery/cli 1.12.0 → 1.12.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.
@@ -1,6 +1,6 @@
1
1
  import type { DatabaseType } from '../utils/detect-database.js';
2
- import { type ClickHouseGeneratorOptions } from './clickhouse.js';
3
- import { type ChdbGeneratorOptions } from './chdb.js';
2
+ import type { ClickHouseGeneratorOptions } from './clickhouse.js';
3
+ import type { ChdbGeneratorOptions } from './chdb.js';
4
4
  export type TypeGeneratorOptions = ClickHouseGeneratorOptions & ChdbGeneratorOptions;
5
5
  type GeneratorFn = (options: TypeGeneratorOptions) => Promise<void>;
6
6
  export declare function getTypeGenerator(dbType: DatabaseType): GeneratorFn;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAA2B,KAAK,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG,oBAAoB,CAAC;AAErF,KAAK,WAAW,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAOpE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CAYlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG,oBAAoB,CAAC;AAErF,KAAK,WAAW,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAiBpE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CAYlE"}
@@ -1,8 +1,16 @@
1
- import { generateClickHouseTypes } from './clickhouse.js';
2
- import { generateChdbTypes } from './chdb.js';
1
+ // Loaded on demand. Both generators pull in `@hypequery/clickhouse/cli`, and importing
2
+ // that eagerly puts it on the module graph of every command — a resolution failure there
3
+ // took down even `hypequery --help`. Deferring it keeps the blast radius on the commands
4
+ // that actually generate types.
3
5
  const generators = {
4
- clickhouse: generateClickHouseTypes,
5
- chdb: generateChdbTypes,
6
+ clickhouse: async (options) => {
7
+ const { generateClickHouseTypes } = await import('./clickhouse.js');
8
+ await generateClickHouseTypes(options);
9
+ },
10
+ chdb: async (options) => {
11
+ const { generateChdbTypes } = await import('./chdb.js');
12
+ await generateChdbTypes(options);
13
+ },
6
14
  };
7
15
  export function getTypeGenerator(dbType) {
8
16
  const generator = generators[dbType];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/cli",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Command-line interface for hypequery",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -20,27 +20,21 @@
20
20
  "ora": "^8.0.1",
21
21
  "prompts": "^2.4.2",
22
22
  "@hypequery/deployment": "0.6.0",
23
- "@hypequery/protocol": "0.9.0"
23
+ "@hypequery/protocol": "0.9.0",
24
+ "@hypequery/clickhouse": "2.5.2"
24
25
  },
25
26
  "optionalDependencies": {
26
27
  "@napi-rs/keyring": "1.3.0"
27
28
  },
28
29
  "peerDependencies": {
29
- "@hypequery/clickhouse": "*",
30
30
  "@hypequery/serve": "*"
31
31
  },
32
- "peerDependenciesMeta": {
33
- "@hypequery/clickhouse": {
34
- "optional": true
35
- }
36
- },
37
32
  "devDependencies": {
38
33
  "@types/node": "^20.11.30",
39
34
  "@types/prompts": "^2.4.9",
40
35
  "@vitest/coverage-v8": "^3.2.6",
41
36
  "typescript": "^5.7.3",
42
37
  "vitest": "^3.2.6",
43
- "@hypequery/clickhouse": "2.5.2",
44
38
  "@hypequery/serve": "0.14.0"
45
39
  },
46
40
  "repository": {