@pikku/kysely 0.12.0 → 0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  ## 0.12.0
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e04531f: Code quality improvements: resolve oxlint warnings and apply autofixes across the codebase (unused bindings, unnecessary constructors, prefer `const` over `let`, etc.). No behaviour changes.
8
+ - Updated dependencies [62a8725]
9
+ - Updated dependencies [a3bdb0d]
10
+ - Updated dependencies [e0349ff]
11
+ - Updated dependencies [62a8725]
12
+ - Updated dependencies [e04531f]
13
+ - Updated dependencies [62a8725]
14
+ - Updated dependencies [a83efb8]
15
+ - Updated dependencies [8eed717]
16
+ - Updated dependencies [62a8725]
17
+ - Updated dependencies [62a8725]
18
+ - Updated dependencies [62a8725]
19
+
20
+ - @pikku/core@0.12.1
21
+
3
22
  - Updated dependencies
4
23
 
5
24
  ## 0.11.0
@@ -1,5 +1,5 @@
1
1
  import type { AIThread, AIMessage, AgentRunRow, AgentRunService } from '@pikku/core/ai-agent';
2
- import { Kysely } from 'kysely';
2
+ import type { Kysely } from 'kysely';
3
3
  import type { KyselyPikkuDB } from './kysely-tables.js';
4
4
  export declare class KyselyAgentRunService implements AgentRunService {
5
5
  private db;
@@ -1,6 +1,6 @@
1
1
  import type { AIStorageService, AIRunStateService, CreateRunInput } from '@pikku/core/services';
2
2
  import type { AIThread, AIMessage, AgentRunState } from '@pikku/core/ai-agent';
3
- import { Kysely } from 'kysely';
3
+ import type { Kysely } from 'kysely';
4
4
  import type { KyselyPikkuDB } from './kysely-tables.js';
5
5
  export declare class KyselyAIStorageService implements AIStorageService, AIRunStateService {
6
6
  private db;
@@ -192,16 +192,17 @@ export class KyselyAIStorageService {
192
192
  msgQuery = msgQuery.where('created_at', '<', cursorRow.created_at);
193
193
  }
194
194
  }
195
+ let msgResult;
195
196
  if (options?.cursor || options?.lastN) {
196
197
  const innerResult = await msgQuery
197
198
  .orderBy('created_at', 'desc')
198
199
  .limit(options?.lastN ?? 50)
199
200
  .execute();
200
201
  innerResult.reverse();
201
- var msgResult = innerResult;
202
+ msgResult = innerResult;
202
203
  }
203
204
  else {
204
- var msgResult = await msgQuery.orderBy('created_at', 'asc').execute();
205
+ msgResult = await msgQuery.orderBy('created_at', 'asc').execute();
205
206
  }
206
207
  const tcResult = await this.db
207
208
  .selectFrom('ai_tool_call')
@@ -1,6 +1,7 @@
1
- import { CoreUserSession } from '@pikku/core';
2
- import { Channel, ChannelStore } from '@pikku/core/channel';
3
- import { Kysely } from 'kysely';
1
+ import type { CoreUserSession } from '@pikku/core';
2
+ import type { Channel } from '@pikku/core/channel';
3
+ import { ChannelStore } from '@pikku/core/channel';
4
+ import type { Kysely } from 'kysely';
4
5
  import type { KyselyPikkuDB } from './kysely-tables.js';
5
6
  export declare class KyselyChannelStore extends ChannelStore {
6
7
  private db;
@@ -1,5 +1,5 @@
1
1
  import type { DeploymentService, DeploymentServiceConfig, DeploymentConfig, DeploymentInfo } from '@pikku/core/services';
2
- import { Kysely } from 'kysely';
2
+ import type { Kysely } from 'kysely';
3
3
  import type { KyselyPikkuDB } from './kysely-tables.js';
4
4
  export declare class KyselyDeploymentService implements DeploymentService {
5
5
  private db;
@@ -1,5 +1,5 @@
1
1
  import { EventHubStore } from '@pikku/core/channel';
2
- import { Kysely } from 'kysely';
2
+ import type { Kysely } from 'kysely';
3
3
  import type { KyselyPikkuDB } from './kysely-tables.js';
4
4
  export declare class KyselyEventHubStore extends EventHubStore {
5
5
  private db;
@@ -1,5 +1,5 @@
1
1
  import type { WorkflowRun, StepState, WorkflowRunService } from '@pikku/core/workflow';
2
- import { Kysely } from 'kysely';
2
+ import type { Kysely } from 'kysely';
3
3
  import type { KyselyPikkuDB } from './kysely-tables.js';
4
4
  export declare class KyselyWorkflowRunService implements WorkflowRunService {
5
5
  private db;
@@ -1,6 +1,6 @@
1
1
  import type { SerializedError } from '@pikku/core';
2
2
  import { PikkuWorkflowService, type WorkflowRun, type WorkflowRunWire, type StepState, type WorkflowStatus } from '@pikku/core/workflow';
3
- import { Kysely } from 'kysely';
3
+ import type { Kysely } from 'kysely';
4
4
  import type { KyselyPikkuDB } from './kysely-tables.js';
5
5
  export declare class KyselyWorkflowService extends PikkuWorkflowService {
6
6
  private db;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/kysely",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "MIT",
6
6
  "module": "dist/src/index.js",
@@ -19,7 +19,7 @@
19
19
  "release": "npm run build && npm test"
20
20
  },
21
21
  "peerDependencies": {
22
- "@pikku/core": "^0.12.0"
22
+ "@pikku/core": "^0.12.1"
23
23
  },
24
24
  "dependencies": {
25
25
  "kysely": "^0.28.11",
@@ -4,7 +4,7 @@ import type {
4
4
  AgentRunRow,
5
5
  AgentRunService,
6
6
  } from '@pikku/core/ai-agent'
7
- import { Kysely } from 'kysely'
7
+ import type { Kysely } from 'kysely'
8
8
  import type { KyselyPikkuDB } from './kysely-tables.js'
9
9
  import { parseJson } from './kysely-json.js'
10
10
 
@@ -4,7 +4,8 @@ import type {
4
4
  CreateRunInput,
5
5
  } from '@pikku/core/services'
6
6
  import type { AIThread, AIMessage, AgentRunState } from '@pikku/core/ai-agent'
7
- import { Kysely, sql } from 'kysely'
7
+ import type { Kysely } from 'kysely'
8
+ import { sql } from 'kysely'
8
9
  import type { KyselyPikkuDB } from './kysely-tables.js'
9
10
  import { parseJson } from './kysely-json.js'
10
11
 
@@ -261,15 +262,16 @@ export class KyselyAIStorageService
261
262
  }
262
263
  }
263
264
 
265
+ let msgResult
264
266
  if (options?.cursor || options?.lastN) {
265
267
  const innerResult = await msgQuery
266
268
  .orderBy('created_at', 'desc')
267
269
  .limit(options?.lastN ?? 50)
268
270
  .execute()
269
271
  innerResult.reverse()
270
- var msgResult = innerResult
272
+ msgResult = innerResult
271
273
  } else {
272
- var msgResult = await msgQuery.orderBy('created_at', 'asc').execute()
274
+ msgResult = await msgQuery.orderBy('created_at', 'asc').execute()
273
275
  }
274
276
 
275
277
  const tcResult = await this.db
@@ -1,6 +1,8 @@
1
- import { CoreUserSession } from '@pikku/core'
2
- import { Channel, ChannelStore } from '@pikku/core/channel'
3
- import { Kysely, sql } from 'kysely'
1
+ import type { CoreUserSession } from '@pikku/core'
2
+ import type { Channel } from '@pikku/core/channel'
3
+ import { ChannelStore } from '@pikku/core/channel'
4
+ import type { Kysely } from 'kysely'
5
+ import { sql } from 'kysely'
4
6
  import type { KyselyPikkuDB } from './kysely-tables.js'
5
7
  import { parseJson } from './kysely-json.js'
6
8
 
@@ -5,7 +5,8 @@ import type {
5
5
  DeploymentInfo,
6
6
  } from '@pikku/core/services'
7
7
  import { getAllFunctionNames } from '@pikku/core/function'
8
- import { Kysely, sql } from 'kysely'
8
+ import type { Kysely } from 'kysely'
9
+ import { sql } from 'kysely'
9
10
  import type { KyselyPikkuDB } from './kysely-tables.js'
10
11
 
11
12
  export class KyselyDeploymentService implements DeploymentService {
@@ -1,5 +1,5 @@
1
1
  import { EventHubStore } from '@pikku/core/channel'
2
- import { Kysely } from 'kysely'
2
+ import type { Kysely } from 'kysely'
3
3
  import type { KyselyPikkuDB } from './kysely-tables.js'
4
4
 
5
5
  export class KyselyEventHubStore extends EventHubStore {
@@ -4,7 +4,7 @@ import type {
4
4
  WorkflowStatus,
5
5
  WorkflowRunService,
6
6
  } from '@pikku/core/workflow'
7
- import { Kysely } from 'kysely'
7
+ import type { Kysely } from 'kysely'
8
8
  import type { KyselyPikkuDB } from './kysely-tables.js'
9
9
  import { parseJson } from './kysely-json.js'
10
10
 
@@ -6,7 +6,8 @@ import {
6
6
  type StepState,
7
7
  type WorkflowStatus,
8
8
  } from '@pikku/core/workflow'
9
- import { Kysely, sql } from 'kysely'
9
+ import type { Kysely } from 'kysely'
10
+ import { sql } from 'kysely'
10
11
  import type { KyselyPikkuDB } from './kysely-tables.js'
11
12
  import { KyselyWorkflowRunService } from './kysely-workflow-run-service.js'
12
13
  import { parseJson } from './kysely-json.js'