@sylphx/lens-server 1.3.0 → 1.3.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { query, mutation, router, QueryBuilder, MutationBuilder, QueryDef as QueryDef2, MutationDef as MutationDef2, RouterDef as RouterDef2, RouterRoutes, ResolverFn, ResolverContext, InferRouterContext as InferRouterContext2 } from "@sylphx/lens-core";
2
2
  import { ContextValue, EntityDef, EntityDefinition, EntityResolvers, EntityResolversDefinition, InferRouterContext, MutationDef, QueryDef, RelationDef, RelationTypeWithForeignKey, RouterDef } from "@sylphx/lens-core";
3
- import { EntityKey, Update, EmitCommand, InternalFieldUpdate, ArrayOperation } from "@sylphx/lens-core";
3
+ import { ArrayOperation, EmitCommand, EntityKey, InternalFieldUpdate, Update } from "@sylphx/lens-core";
4
4
  /** Client connection interface */
5
5
  interface StateClient {
6
6
  id: string;
package/dist/index.js CHANGED
@@ -19,8 +19,8 @@ import {
19
19
 
20
20
  // src/state/graph-state-manager.ts
21
21
  import {
22
- createUpdate,
23
22
  applyUpdate,
23
+ createUpdate,
24
24
  makeEntityKey
25
25
  } from "@sylphx/lens-core";
26
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/lens-server",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Server runtime for Lens API framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "author": "SylphxAI",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@sylphx/lens-core": "^1.3.0"
32
+ "@sylphx/lens-core": "^1.3.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^5.9.3",
@@ -10,7 +10,6 @@
10
10
 
11
11
  import {
12
12
  type ContextValue,
13
- type Emit,
14
13
  type EmitCommand,
15
14
  type EntityDef,
16
15
  type EntityDefinition,
@@ -679,7 +678,10 @@ class LensServerImpl<
679
678
  const entityName = this.getEntityNameFromOutput(queryDef._output);
680
679
  if (entityName) {
681
680
  // For entity-typed outputs, use GraphStateManager
682
- const entities = this.extractEntities(entityName, command.type === "full" ? command.data : {});
681
+ const entities = this.extractEntities(
682
+ entityName,
683
+ command.type === "full" ? command.data : {},
684
+ );
683
685
  for (const { entity, id } of entities) {
684
686
  this.stateManager.processCommand(entity, id, command);
685
687
  }
@@ -1630,5 +1632,7 @@ export function createServer<
1630
1632
  ): LensServer & { _types: { queries: Q; mutations: M; context: TContext } } {
1631
1633
  const server = new LensServerImpl(config) as LensServerImpl<Q, M, TContext>;
1632
1634
  // Attach type marker for inference (stripped at runtime)
1633
- return server as unknown as LensServer & { _types: { queries: Q; mutations: M; context: TContext } };
1635
+ return server as unknown as LensServer & {
1636
+ _types: { queries: Q; mutations: M; context: TContext };
1637
+ };
1634
1638
  }
@@ -10,13 +10,13 @@
10
10
  */
11
11
 
12
12
  import {
13
- type EntityKey,
14
- type Update,
13
+ type ArrayOperation,
15
14
  type EmitCommand,
15
+ type EntityKey,
16
16
  type InternalFieldUpdate,
17
- type ArrayOperation,
18
- createUpdate,
17
+ type Update,
19
18
  applyUpdate,
19
+ createUpdate,
20
20
  makeEntityKey,
21
21
  } from "@sylphx/lens-core";
22
22