@mastra/clickhouse 0.13.0-alpha.0 → 0.13.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.
@@ -1,7 +1,7 @@
1
1
  import type { ClickHouseClient } from '@clickhouse/client';
2
2
  import { LegacyEvalsStorage } from '@mastra/core/storage';
3
3
  import type { EvalRow, PaginationArgs, PaginationInfo } from '@mastra/core/storage';
4
- import type { StoreOperationsClickhouse } from '../operations';
4
+ import type { StoreOperationsClickhouse } from '../operations/index.js';
5
5
  export declare class LegacyEvalsStorageClickhouse extends LegacyEvalsStorage {
6
6
  protected client: ClickHouseClient;
7
7
  protected operations: StoreOperationsClickhouse;
@@ -3,7 +3,7 @@ import type { MastraMessageContentV2 } from '@mastra/core/agent';
3
3
  import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
4
4
  import type { PaginationInfo, StorageGetMessagesArg, StorageResourceType } from '@mastra/core/storage';
5
5
  import { MemoryStorage } from '@mastra/core/storage';
6
- import type { StoreOperationsClickhouse } from '../operations';
6
+ import type { StoreOperationsClickhouse } from '../operations/index.js';
7
7
  export declare class MemoryStorageClickhouse extends MemoryStorage {
8
8
  protected client: ClickHouseClient;
9
9
  protected operations: StoreOperationsClickhouse;
@@ -1,7 +1,7 @@
1
1
  import type { ClickHouseClient } from '@clickhouse/client';
2
2
  import { StoreOperations } from '@mastra/core/storage';
3
3
  import type { StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
4
- import type { ClickhouseConfig } from '../utils';
4
+ import type { ClickhouseConfig } from '../utils.js';
5
5
  export declare class StoreOperationsClickhouse extends StoreOperations {
6
6
  protected ttl: ClickhouseConfig['ttl'];
7
7
  protected client: ClickHouseClient;
@@ -2,7 +2,7 @@ import type { ClickHouseClient } from '@clickhouse/client';
2
2
  import type { ScoreRowData } from '@mastra/core/scores';
3
3
  import { ScoresStorage } from '@mastra/core/storage';
4
4
  import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
5
- import type { StoreOperationsClickhouse } from '../operations';
5
+ import type { StoreOperationsClickhouse } from '../operations/index.js';
6
6
  export declare class ScoresStorageClickhouse extends ScoresStorage {
7
7
  protected client: ClickHouseClient;
8
8
  protected operations: StoreOperationsClickhouse;
@@ -2,7 +2,7 @@ import type { ClickHouseClient } from '@clickhouse/client';
2
2
  import { TracesStorage } from '@mastra/core/storage';
3
3
  import type { PaginationInfo, StorageGetTracesPaginatedArg, StorageGetTracesArg } from '@mastra/core/storage';
4
4
  import type { Trace } from '@mastra/core/telemetry';
5
- import type { StoreOperationsClickhouse } from '../operations';
5
+ import type { StoreOperationsClickhouse } from '../operations/index.js';
6
6
  export declare class TracesStorageClickhouse extends TracesStorage {
7
7
  protected client: ClickHouseClient;
8
8
  protected operations: StoreOperationsClickhouse;
@@ -2,7 +2,7 @@ import type { ClickHouseClient } from '@clickhouse/client';
2
2
  import { WorkflowsStorage } from '@mastra/core/storage';
3
3
  import type { WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
4
4
  import type { WorkflowRunState } from '@mastra/core/workflows';
5
- import type { StoreOperationsClickhouse } from '../operations';
5
+ import type { StoreOperationsClickhouse } from '../operations/index.js';
6
6
  export declare class WorkflowsStorageClickhouse extends WorkflowsStorage {
7
7
  protected client: ClickHouseClient;
8
8
  protected operations: StoreOperationsClickhouse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/clickhouse",
3
- "version": "0.13.0-alpha.0",
3
+ "version": "0.13.0",
4
4
  "description": "Clickhouse provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,7 +12,7 @@
12
12
  "default": "./dist/index.js"
13
13
  },
14
14
  "require": {
15
- "types": "./dist/index.d.cts",
15
+ "types": "./dist/index.d.ts",
16
16
  "default": "./dist/index.cjs"
17
17
  }
18
18
  },
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@clickhouse/client": "^1.11.2"
23
+ "@clickhouse/client": "^1.12.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@microsoft/api-extractor": "^7.52.8",
@@ -29,12 +29,13 @@
29
29
  "tsup": "^8.5.0",
30
30
  "typescript": "^5.8.3",
31
31
  "vitest": "^3.2.4",
32
- "@internal/lint": "0.0.26",
33
- "@internal/storage-test-utils": "0.0.22",
34
- "@mastra/core": "0.13.0-alpha.1"
32
+ "@internal/storage-test-utils": "0.0.23",
33
+ "@internal/lint": "0.0.27",
34
+ "@mastra/core": "0.13.0",
35
+ "@internal/types-builder": "0.0.2"
35
36
  },
36
37
  "peerDependencies": {
37
- "@mastra/core": ">=0.10.7-0 <0.13.0-0"
38
+ "@mastra/core": ">=0.13.0-0 <0.14.0-0"
38
39
  },
39
40
  "scripts": {
40
41
  "build": "tsup --silent --config tsup.config.ts",
@@ -112,13 +112,13 @@ export class TracesStorageClickhouse extends TracesStorage {
112
112
  name: row.name,
113
113
  scope: row.scope,
114
114
  kind: row.kind,
115
- status: safelyParseJSON(row.status as string),
116
- events: safelyParseJSON(row.events as string),
117
- links: safelyParseJSON(row.links as string),
118
- attributes: safelyParseJSON(row.attributes as string),
115
+ status: safelyParseJSON(row.status),
116
+ events: safelyParseJSON(row.events),
117
+ links: safelyParseJSON(row.links),
118
+ attributes: safelyParseJSON(row.attributes),
119
119
  startTime: row.startTime,
120
120
  endTime: row.endTime,
121
- other: safelyParseJSON(row.other as string),
121
+ other: safelyParseJSON(row.other),
122
122
  createdAt: row.createdAt,
123
123
  }));
124
124
 
@@ -235,13 +235,13 @@ export class TracesStorageClickhouse extends TracesStorage {
235
235
  name: row.name,
236
236
  scope: row.scope,
237
237
  kind: row.kind,
238
- status: safelyParseJSON(row.status as string),
239
- events: safelyParseJSON(row.events as string),
240
- links: safelyParseJSON(row.links as string),
241
- attributes: safelyParseJSON(row.attributes as string),
238
+ status: safelyParseJSON(row.status),
239
+ events: safelyParseJSON(row.events),
240
+ links: safelyParseJSON(row.links),
241
+ attributes: safelyParseJSON(row.attributes),
242
242
  startTime: row.startTime,
243
243
  endTime: row.endTime,
244
- other: safelyParseJSON(row.other as string),
244
+ other: safelyParseJSON(row.other),
245
245
  createdAt: row.createdAt,
246
246
  }));
247
247
  } catch (error: any) {
package/tsup.config.ts CHANGED
@@ -1,9 +1,6 @@
1
- import { spawn } from 'child_process';
2
- import { promisify } from 'util';
1
+ import { generateTypes } from '@internal/types-builder';
3
2
  import { defineConfig } from 'tsup';
4
3
 
5
- const exec = promisify(spawn);
6
-
7
4
  export default defineConfig({
8
5
  entry: ['src/index.ts'],
9
6
  format: ['esm', 'cjs'],
@@ -15,8 +12,6 @@ export default defineConfig({
15
12
  },
16
13
  sourcemap: true,
17
14
  onSuccess: async () => {
18
- await exec('pnpm', ['tsc', '-p', 'tsconfig.build.json'], {
19
- stdio: 'inherit',
20
- });
15
+ await generateTypes(process.cwd());
21
16
  },
22
17
  });