chkit 0.1.0-beta.18 → 0.1.0-beta.19

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.
@@ -241,7 +241,7 @@ async function cmdMigrate(ctx) {
241
241
  });
242
242
  for (let i = 0; i < statements.length; i++) {
243
243
  const statement = statements[i];
244
- await db.execute(statement);
244
+ await db.command(statement);
245
245
  const operation = operationSummaries[i];
246
246
  if (operation) {
247
247
  await waitForDDLPropagation(db, operation.type, operation.key);
@@ -50,7 +50,7 @@ SETTINGS index_granularity = 1`;
50
50
  // Table does not exist yet – create it below.
51
51
  }
52
52
  try {
53
- await db.execute(createTableSql);
53
+ await db.command(createTableSql);
54
54
  }
55
55
  catch (error) {
56
56
  if (isUnknownDatabaseError(error)) {
@@ -83,7 +83,7 @@ SETTINGS index_granularity = 1`;
83
83
  return { version: 1, applied: [] };
84
84
  }
85
85
  try {
86
- await db.execute(`SYSTEM SYNC REPLICA ${journalTable}`);
86
+ await db.command(`SYSTEM SYNC REPLICA ${journalTable}`);
87
87
  }
88
88
  catch {
89
89
  // Non-replicated or single-node setups don't support SYSTEM SYNC REPLICA.
@@ -110,7 +110,7 @@ SETTINGS index_granularity = 1`;
110
110
  const maxAttempts = 5;
111
111
  for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
112
112
  try {
113
- await db.execute(insertSql);
113
+ await db.command(insertSql);
114
114
  break;
115
115
  }
116
116
  catch (error) {
@@ -121,7 +121,7 @@ SETTINGS index_granularity = 1`;
121
121
  }
122
122
  }
123
123
  try {
124
- await db.execute(`SYSTEM SYNC REPLICA ${journalTable}`);
124
+ await db.command(`SYSTEM SYNC REPLICA ${journalTable}`);
125
125
  }
126
126
  catch {
127
127
  // Non-replicated or single-node setups don't support SYSTEM SYNC REPLICA.
@@ -1,3 +1,3 @@
1
- import { type SchemaDefinition } from '@chkit/core';
1
+ import type { SchemaDefinition } from '@chkit/core';
2
2
  export declare function loadSchemaDefinitions(schemaGlobs: string | string[]): Promise<SchemaDefinition[]>;
3
3
  //# sourceMappingURL=schema-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-loader.d.ts","sourceRoot":"","sources":["../../src/bin/schema-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0D,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE3G,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAEvG"}
1
+ {"version":3,"file":"schema-loader.d.ts","sourceRoot":"","sources":["../../src/bin/schema-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAEvG"}
@@ -1,5 +1,5 @@
1
1
  import process from 'node:process';
2
- import { loadSchemaDefinitions as loadSchemaDefinitionsFromCore } from '@chkit/core';
2
+ import { loadSchemaDefinitions as loadSchemaDefinitionsFromCore } from '@chkit/core/schema-loader';
3
3
  export async function loadSchemaDefinitions(schemaGlobs) {
4
4
  return loadSchemaDefinitionsFromCore(schemaGlobs, { cwd: process.cwd() });
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schema-loader.js","sourceRoot":"","sources":["../../src/bin/schema-loader.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,OAAO,EAAE,qBAAqB,IAAI,6BAA6B,EAAyB,MAAM,aAAa,CAAA;AAE3G,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,WAA8B;IACxE,OAAO,6BAA6B,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AAC3E,CAAC"}
1
+ {"version":3,"file":"schema-loader.js","sourceRoot":"","sources":["../../src/bin/schema-loader.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,OAAO,EAAE,qBAAqB,IAAI,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAGlG,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,WAA8B;IACxE,OAAO,6BAA6B,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AAC3E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chkit",
3
- "version": "0.1.0-beta.18",
3
+ "version": "0.1.0-beta.19",
4
4
  "description": "ClickHouse schema and migration CLI for TypeScript projects",
5
5
  "license": "MIT",
6
6
  "author": "ObsessionDB",
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@clickhouse/client": "^1.11.0",
43
- "@chkit/clickhouse": "0.1.0-beta.18",
44
- "@chkit/codegen": "0.1.0-beta.18",
45
- "@chkit/core": "0.1.0-beta.18",
43
+ "@chkit/clickhouse": "0.1.0-beta.19",
44
+ "@chkit/codegen": "0.1.0-beta.19",
45
+ "@chkit/core": "0.1.0-beta.19",
46
46
  "fast-glob": "^3.3.2"
47
47
  }
48
48
  }